if ((SMA(100) [0] < SMA(200) [0]) && (SMA(100) [0] > SMA(100) [1]) && (EMA(13) [0] > EMA(13) [1]))
When I use [1] it works fine. But I want to compare with [5]
As soon as I replace [1] with [5], then I get ....
Error on calling OnBarUpdate method on bar 0. You are accessing an index with a value that is invalid since it is out-of-range
How do I get passed this?
I had the same problem with LinReg using CrossAbove and CrossBelow.
Comment