Hello team,
in a custom indicator/strategy, I'm using two differents timeframes.
1/ the first one is the one used by the actual candles => M1.
2/ the second one is used by Ichimoku => M5
Both are working ok. My issue is when I want to make them work together.
As an example, I would like to have a signal when my candle (M1) crosses the Kijun (M5).
My issue is that the Kijun seems to be calculated after 5xM1 Candles and not after the last one. Yes, I have to call ICH.TL[bSource5:size()-1] (bSource5 being the m5 stream) instead of ICH.TL[period] to not have an out of index error.
So if the kijun is all flat, it works because ICH.TL[bSource5:size()-1] gives me the value of the Kijun given by the last M5 Kijun calculation.
But if we have a powerfull ascending/descending candle between 2 Kijun calculation, we miss it.
I don't see how I can do it, if it's even possible. I can calculate the Kijun update just after the close of the M1 Candle but maybe there is an easier solution.
Any help would be greatly appreciated,
Mag