sdas86:
You have to detect the "execution" of your pending order. One way is to check number of orders : count trade orders, count pending orders. When 'trades' increased by 1 and 'pendings' decreased by one, you have your trigger.
Dear all,
I am creating my system to open two pending orders - BuyStop and SellStop
Next, I want it to Close or Delete one of the Stop order when Buy or Sell is executed.
Example:
Case 1: BuyStop and SellStop are Placed
BuyStop is executed - Buy. Then, SellStop should be closed.
Case 2: BuyStop and SellStop are placed
SellStop is executed - Sell. Then, BuyStop should be closed.
Anyone knows how to code this in MetaEditor?
Thanks.
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
Dear all,
I am creating my system to open two pending orders - BuyStop and SellStop
Next, I want it to Close or Delete one of the Stop order when Buy or Sell is executed.
Example:
Case 1: BuyStop and SellStop are Placed
BuyStop is executed - Buy. Then, SellStop should be closed.
Case 2: BuyStop and SellStop are placed
SellStop is executed - Sell. Then, BuyStop should be closed.
Anyone knows how to code this in MetaEditor?
Thanks.