Reply To: moving average direction help

Optuma Forums Optuma Scripting moving average direction help Reply To: moving average direction help

#45483
Darren
  • Topics: 66
  • Replies: 661
  • Posts: 727

Hi Tim,

That example you gave is only for the direction of the slope of the MA50 – it does not look at where the price is in relation to the moving average. As such, this is all you need to set the bar colours for when the 50EMA is sloping up:

MA(BARS=50, STYLE=Exponential, CALC=Close) IsUp

Because of the way exponential moving averages are calculated (ie more weight given to the most recent bars) then it looks like the price is always below the 50EMA when the slope is down. Change to a simple moving average and you will see the difference.

Pin It on Pinterest