Hello everyone! Please bear with me, I searched everywhere and tried to fix this for many days now. Still no luck.
When adding handles to other indicators from within custom indicator by calling either iMA(), iCustom or Trend.mqh class, the indicator often shows junk arrows when changing timeframes. How to avoid that?
Apparently, although I already emptied the buffers inside OnInit()
//--- indicator buffers mapping
I also have to empty each cell inside the main loop too.This solved the issue.
for (int bar=bars_to_calculate; bar>=0 && !IsStopped(); bar--)
ext_bullish_buffer[bar] = EMPTY_VALUE;
ext_bearish_buffer[bar] = EMPTY_VALUE;
ext_bullish_buffer[bar] = low[bar];
ext_bearish_buffer[bar] = high[bar];