- ORDER_TIME_SETUP
- ORDER_COMMENT
thanks for your response!
interesting... I´m not sure if I get it though. can you expand on that?
are you suggesting that I write the ORDER_TIME_SETUP value on a comment when placing the Order,
then check if there are any orders with this particular comment to be deleted?
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi there!
I'm working on an EA that uses pending orders and I need them to expire x bars after they are created but my broker/symbol doesn´t support GTC or Time Specified Expiration.
this is the workaround I´ve created:
When conditions are met, it creates a pending order and stores the Expiration Time as a variable (using the number of bars that I input and converting it into seconds), like this:
And then it deletes it when timeCurrent() is greater than Expiration, like this:
the function I created for deleting pending orders is the following:
it works fine but the thing is that I realised that sometimes I have more then one pending order active and each one must expire at a different moment. and the way i did it it will always cancel all of them when expiration time is reached.
Can anyone help me out here? Do you have any ideas on how I can do this?
I need to create different pending orders with different expiration values (always 2 bars after they are created) without using Time Specified Expiration.
Thanks!