Hello to everyone,
I would like to create a simple EA that does the following:
- inserts 2 limit orders with SL & TP @ a specific time of the day, taking as the price for the 2 limit orders, the opening price of the candle @ the specified time plus a certain amount of pips (for the short order) and the opening price of the same candle @ the specified time minus a certain amount of pips (for the long order);
- it should let you specify the validity of the 2 orders (for example 14:00 EST);
- if none is executed by that time, both should be cancelled;
- If 1 out of 2 is executed within the time specified, the second should be automatically and immediately cancelled;
If there is anyone willing to help me, I would share a draft of an already developed OCO EA, that could be used as a good starting point.
thank you in advance much for your help
I would like to create a simple EA that does the following:
- inserts 2 limit orders with SL & TP @ a specific time of the day, taking as the price for the 2 limit orders, the opening price of the candle @ the specified time plus a certain amount of pips (for the short order) and the opening price of the same candle @ the specified time minus a certain amount of pips (for the long order);
- it should let you specify the validity of the 2 orders (for example 14:00 EST);
- if none is executed by that time, both should be cancelled;
- If 1 out of 2 is executed within the time specified, the second should be automatically and immediately cancelled;
If there is anyone willing to help me, I would share a draft of an already developed OCO EA, that could be used as a good starting point.
thank you in advance much for your help