This happens because input can be set only as a numeric value, so you need to use the IFF function. In this case, when crossover action takes place, this input will return 1 or 0 otherwise.
The code should look like as follows: return iff(CrossAbove( EMA(C,30) , EMA(C,60)),1,0);
Tradecision Support Team
I'm working on different Neural Strategies, and I need some assistance.
How can I enter a CrossOver Period as an input? I've tried, but I
get an error saying the value must be numeric. When I read about
the CrossOver Command, the output is true or false, I tried doing an
if statement to make the value a one or zero, but that didn't seem
to work either.
I'd like the neural network to take into account a crossover period.
For example, the 30-day ema moving across or below the 60-day ema.