Thank you. I have another question for you. I would like to read the value of this indicator in m5 (shift = 1), but using m1 chart, so I read the previous m5 close candle every m1 candle, nothing strange. I do this using the iCustom function and in backtest for some personal testing, specifically:kvak wrote: Thu Nov 03, 2022 11:31 am Yes, you are right, I forget something in code....Sorry for that, here is corrected version and tomorrow I correct previous versions...
Code: Select all
iCustom(Symbol(), PERIOD_M1, IndicatorName, PERIOD_M5, indicators parameters...., shift=1); One thinkg that I may ask you is related to the calls that you do internally on the mt4 functions, like Time, Close etc. The proper format in order to get a functional code is from
Code: Select all
Close[shift] to iClose(NULL , PERIOD_M15 , shift )I give you an example:
Example: Long when previous m5 center line is green and volumes are green or gray, Short when previous m5 center line is red and volumes are red or gray. Look at my prints and the hours.
I think that this happens because the iCustom function written in my way reads the indicator in m1 chart with m5 version
Thank you!