Angat, you will have to forgive me for being a bit befuddled here. I am in my usual post tea state of a bit under the affluence of incohol.
I cannot provide the whole solution, is what I am saying because I cannot work it out. I can perhaps point you in the right direction.
I wrestled with a similar problem early on in SHF's days and this snippet forms a part of all my shell codes:
Code: Select all
Code from George, to detect the shift of an order open time
int shift = iBarShift(NULL,Period(),OrderOpenTime(), false);
This provides the shift on any time frame I am investigating, of the open time of a trade. So, the trade might have opened at x on the H4, but the code will provide the shift on any other time frame should I need it. The trade opened on the last H4 candle and I do not want another opening within the next x M15 candles, the iBarShift allows me to calculate whether a trade on the M15 can open.
So, you need to know the candle open time identified by your
double HH_price=iHigh(NULL, TimeFrame, iHighest(NULL, TimeFrame, MODE_HIGH,Lookback,0));
So, if datetime CandleTime = <the open time of the candle identified by your previous code> and SomeTimeFrame = your chosen time frame
then
int shift = iBarShift(NULL,SomeTimeFrame,CandleTime, false); will give you the shift you need to draw the vertical line correctly on any chart time frame.
Sorry if this does not make a lot of sense - perhaps someone unpished can step in and explain it a tad more clearly. I am still enjoying the joysh of Christshmush. hic. I hope enough of it makes sense to point you in the right direction.
I would say that I will have another look in the morning, but it would be a miracle if I even remember that I posted this.
Fantastic to see you getting your sleeves rolled up into the, um, unintricacies of crapql4. It is something that all retail forex traders should do.
Cheershh
hic

Read the effing manual, ok?
Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.
I still suffer from OCCD. Good thing, really.
Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.
To see The Weekly Roundup of stuff you guys might have missed
Click here
My special thanks to Thomas (tomele) for all the incredible work he does here.