I couldn't find mathematical functions to calculate average and standard deviation across all the values in a data series? I used the code below, but the compiler doesn't recognize average() and stdev()
CODE:
Please log in to see this code.
Also, I'm using LinerRegSlope(150) series to determine long-term trends and when the slope exceeds its average+/-standard deviation, i call it a Bullish or Bearish long-term trend.
- If there's an easier way to define long-term trend without a significant lag, pl advise .. moving average cross-over/cross-under (e.g. SMA(100), SMA(200)) don't work well because they have significant lag.
thanks
Kiran