But more importantly how can I check that the SMA was rising X bars ago
when I do
if( Rising( SMA(20)[5] ))
It will not compile. (for the obvious reason that sending it a double instead of data series will not work) So how can I send the data series from X bars ago.

, yes that was the problem, i changed the code the way you suggested and now works properly .
Comment