Calling OrderSend does not garantee that the order will be executed, you need to check if the position exists and then execute the logic you want.
People usually use magic numbers to easily identify positions created by an EA.
Documentation on MQL5: Trade Functions / OrderSend
- www.mql5.com
OrderSend - Trade Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Alexandre Borela:
Calling OrderSend does not garantee that the order will be executed, you need to check if the position exists and then execute the logic you want.
People usually use magic numbers to easily identify positions created by an EA.
This answer doesn't make sense about the question, moreover this is MQL5.
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
I have to make declaration of Buy or Sell Positions>0 into the main loop to make the advisor work.
It was supposed to be some buy or sell behind this lines. Does anyone know something about this?