ataba;
go through all your open orders with OrdersTotal() and OrderSelect(..) functions. Look your eas magic to find your eas positions.
then ask OrderOpenTime, then look via while() function all bars back and compare bars datetime with order entry datetime you got from OrderOpenTime. Depends on your shift value you know how many bars ago you opened the position. Since iTime also offers timeframe parameter this way would also be timeframe safe.
regards
fx1.net
ataba;
go through all your open orders with OrdersTotal() and OrderSelect(..) functions. Look your eas magic to find your eas positions.
then ask OrderOpenTime, then look via while() function all bars back and compare bars datetime with order entry datetime you got from OrderOpenTime. Depends on your shift value you know how many bars ago you opened the position. Since iTime also offers timeframe parameter this way would also be timeframe safe.
regards
fx1.net
thanks a lot...

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I want to manage my position based on timing.When using TimeCurrent() function my E.A skips weekends and code doesn't work properly.Is there a more
safe timing way using bar counting? What type of a code should I use when for example;
modify an order 10 bars later after OrderOpentime,
sending an order xxx hour later if-when (condition =True)?
thanks..