different stops on the basis of different signals

 
Hi,
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.
 
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
 
Thank you very much. I`ll try.
Reason: