Reply To: moving average direction help

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

#45483
DarrenDarren
  • Topics: 55
  • Replies: 463
  • Posts: 518

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

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close