OrderSend has a field called "magic". This is an integer that can be used to identify the order.
int OrderSend( string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment=NULL, int magic=0, datetime expiration=0, color arrow_color=CLR_NONE)
Give the orders different magic numbers to differentiate them.
HTH.
mojo
int OrderSend( string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment=NULL, int magic=0, datetime expiration=0, color arrow_color=CLR_NONE)
Give the orders different magic numbers to differentiate them.
HTH.
mojo
Thank you very much. I`ll try.
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
How could I identify if an order comes from a signal (example1: if (Close 1 && XX) BUY) or of another one (example2: if (Close 1 && YY) BUY) to assign different SL and TP to them.
both are buy signals
If i use differents OrderSend, can i identify each one?
Thanks.