i >= 0
Thanks, kypa.
The reason for
i > 0
is to keep the indicator non-repainting.
Also, with
i >= 0
I found that the Chikou some of the indicator values were not being calculated.
Updating on last not yet completed bar is not repainting. In fact if you don't recalculate your indicators with it you will have repaining.
Chikou not calculating probably has to do with checking Chikou for a past bar, not for the current one. I think it's only the plot which is shifted, not the buffer values.
Updating on last not yet completed bar is not repainting. In fact if you don't recalculate your indicators with it you will have repaining.
Chikou not calculating probably has to do with checking Chikou for a past bar, not for the current one. I think it's only the plot which is shifted, not the buffer values.
For some reason, it has started updating today without any change to the code.
In any case, the arrows need to appear on the last completed bar (i=1), so I am happy to wait until the function is recalled once the current bar becomes the last bar. Seems to be working fine now.
Thanks again.
Btw, the buffer values for Chikou are shifted by the Kijun period. I did my due diligence by looking 26 bars back for each bar, printing the Chikou values and also looking at the MT4 Ichimoku custom indicator code.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I am a newbie here.
Situation:
I am trying to code an Ichimoku based custom indicator to provide a buy or sell signal based on:
Problem:
The indicator updates normally if I check for the conditions:
but not if I check for:
and vice versa for the sell conditions, replacing the > with <.
Essentially, new arrows do not appear unless I manually refresh.
However, seems to work okay in the strategy tester.
Request:
Could someone tell me what I am doing wrong so that the indicator stops updating unless refreshed manually if I check for the Chikou Bias? Thank you in advance.
Code inserted inline and also attached.