How to compare buy stop price of pending order with new buy signal price of EA?

 

Hi,

Please help point me in the right direction as I can't find the right terms to search for.

The signal is buy at 1.1000. The EA opens a buystop order at 1.1000. When the next bar is opened, say the signal is now 1.1100 or 1.050. In the EA, how can the buystop price be called or referenced to compare with the new buy signal?

Any help is appreciated. Thank you.

 
You can memorized the ticket number of your order and later modify it with this ticket. Or you can loop among orders, find the order of interest and then modify it if needed. See documentation about trading function.
Reason: