Is there a way to use something like SetIndexShift() to render an OBJECT ahead of the most current candle? I'd like to draw something like an OBJ_RECTANGLE, and locate it by replacing Time as an argument with a X candle index shift forward from the most current candle.
I tried to do the following:
int Kijun = 26;
ObjectCreate("KumoLeadMarker" + iObjTotal,OBJ_RECTANGLE,0,(Time+(60*60*4*Kijun)),iIchimoku(NULL, 0, Tenkan, Kijun, Senkou, MODE_SENKOUSPANA, -Kijun) - 0.00200,(Time+(60*60*4*Kijun)),iIchimoku(NULL, 0, Tenkan, Kijun, Senkou, MODE_SENKOUSPANA, -Kijun) + 0.00200);
If Time and the result of added to Time both fall within the same week, then this works fine. If they fall within two different weeks, then it does not work correctly. The shift forward is not one of an absolute time, but one of X candles.
Any help is most appreciated!!!
there is no setting to tell MT4 about weekends
So, if you want to set things x bars into the future and avoid weekends you have to calculate it out.
Phy - I was afraid of that ..hehe.. thanks for the reply. I guess it will just come down to some creative math.