Below indicator displays up/ down arrows when MACD histogram changes direction. I am trying to get it to change the arrow to display on the current bar (0) as opposed to bar 1. i.e. when MACD changes direction and candle closes I would like arrow to be displayed on the following candle as opposed to that one. I have tried changing last two if statements 'i' but have had no luck... I feel like the solution should be an easy one but am unable to find an answer.
Any help or advice much appreciated.
The main loop ends at 1.
I have tried changing to what you suggested but arrows stay displayed in the same place... any other suggestions?
EMAs aren't bar dependent, so the lower rates_total-n is, the longer it would take to get the correct value. In this case, use a rates total check instead.