Can one execute two scripts on the same chart, such that if the first script is executed the second one comes into effect.
Here is an example:
I set two pending trades at the start of the daily candle. A Buy stop at the hi of the previous day's candle, and a sell stop at the lo of the previous day's candle (forget spread for the moment). When a trade is triggered (buy stop say) the other trade (sell stop) is automatically cancelled (OCO-one call cancels other). I already have a script that does this. Both the buy stop and the sell stop have a set amount of Stop loss (60 pips say) and a set amount of Take profit (100 pips say).
Here is the tricky part: I now want to set a pending order, after my OCO is triggered, that takes a trade in the opposite direction, if my S/L is hit for my oco trade. This second trade will also have the S/L and T/P of 60 and 100 pips.
At the moment what I am doing is
1. Setting an oco order.
2. MT4 sends me an alert when my OCO is triggered.
3. I manually set the 2nd pending order.
Any ideas, questions or comments would be appreciated
Here is an example:
I set two pending trades at the start of the daily candle. A Buy stop at the hi of the previous day's candle, and a sell stop at the lo of the previous day's candle (forget spread for the moment). When a trade is triggered (buy stop say) the other trade (sell stop) is automatically cancelled (OCO-one call cancels other). I already have a script that does this. Both the buy stop and the sell stop have a set amount of Stop loss (60 pips say) and a set amount of Take profit (100 pips say).
Here is the tricky part: I now want to set a pending order, after my OCO is triggered, that takes a trade in the opposite direction, if my S/L is hit for my oco trade. This second trade will also have the S/L and T/P of 60 and 100 pips.
At the moment what I am doing is
1. Setting an oco order.
2. MT4 sends me an alert when my OCO is triggered.
3. I manually set the 2nd pending order.
Any ideas, questions or comments would be appreciated