Optuma Forums › Optuma Scripting › 252 day EMA trending up script › Reply To: 252 day EMA trending up script
November 30, 2021 at 8:46 pm
#66791
- Topics: 70
- Replies: 827
- Posts: 897
Here’s another option using the Linear Regression Slope tool, which is a little more forgiving if there’s a small blip in the EMA direction, but the overall trend is up over the last 22 days:
1 2 3 4 5 |
V1 = MA(BARS=252, STYLE=Exponential, CALC=Close); //Is the slope of the MA positive over the BARS period?; LRSLOPE(V1, BARS=22) > 0 |