Hi please help,
I'm looking for a mql4 formula for a red and green candle for the heiken ash indicator. I'm currently using an icustom for the HA indicator but this this slows the system especially during testing. Grateful if someone could give me a calculation in mql4 code.
thanks Taras Slobodyanik:so for a red candle
red candle = haOpen< haClose , is this correct? Also if i want to see the red candle for the previous bar ( shift 1) how do i amend the above formulas?
Thanks very much.
haOpen < haClose = bullish candlehaOpen > haClose = bearish candle
I think it's best to count the whole history, because the current data depends on the previous ones. So you need to count four buffers -
And then you can take any necessary values from the buffers.