opened Buy order - remember the Ticket of this order
set a SellStop Order - write the Ticket of the Buy Order in the Magik of this Order...
---
call the function at the start to check if the buy order is in the magik in the SellStops...
if there is no buy order - delete SellStop...
15 lines of code...
I'm sorry for being blunt, but how do I memorise it, it's just that there's probably more than one and there are five of them to memorise at once when the EA is running.
at start - call the function to check if there is a buy order in the SellStop order loop... and remove it - if there is no buy order amongst the open orders...
I have a 427th build of the terminal. I've sketched out a small script:
datetime VremaOrdera= InitsializeRealMasterOrders();
string SSStroka;
SSStroka=StringConcatenate(TimeYear(VremaOrdera),".",TimeDay(VremaOrdera)," ",TimeHour(VremaOrdera),":",TimeMinute(VremaOrdera)," :",TimeSeconds(VremaOrdera));
Alert("Поступило время ордера = ",VremaOrdera," что соответствует времени ",SSStroka);
The script produced the following:
But alas, the order is open:
What kind of glitch is this? The script returned the time - zero hours, zero minutes and zero seconds.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
so you've been told, haven't you?
Open a Buy order - remember the Ticket of this order
set a SellStop order - write the Ticket of this order in the Magik of this order...
---
call the function at the start to check the presence of the buy order according to the magik in the SellStops...
if there is no such an order (buy) - delete the SellStop...
it only takes 15 lines of code...
Gentlemen, I haven't been able to get an inch closer to solving this problem all day long.
How to implement this algorithm into code?
Is there a condition if the market is 2, then the pending order is deleted?
ZS - if the code isn't big... put it all in here... maybe I'll take the trouble to insert these lines....
Maybe you won't be too lazy to look at my indicator code too, code posted above.
so you were already told, weren't you?
opened Buy order - remember the Ticket of this order
set a SellStop Order - write the Ticket of the Buy Order in the Magik of this Order...
---
call the function at the start to check if the buy order is in the magik in the SellStops...
if there is no buy order - delete SellStop...
15 lines of code...
I have so far only with Bai))
well, for starters, opening trades with their ticket memorized in magik...
get rid of unnecessary checks... - if real - we should add a couple of seconds break between orders.... for a tester - doesn't matter.
Although we should get rid of the extra flags... from Z... if nowhere else is used...
Question for the developers:
I have a 427th build of the terminal. I've sketched out a small script:
The script produced the following:
But alas, the order is open:
What kind of glitch is this? The script returned the time - zero hours, zero minutes and zero seconds.