stoploss help

 

Hello,

Is there a function to check if the stoploss has been triggered.

I want to run a script when the order stoploss is executed.

Thanks.

 

To detect that an order has been stopped (by the broker via the S/L you set in the order, rather than a S/L that you implement locally in your EA), then you need to programmatically search the order history pool and react accordingly.

Please note that due to a particularly horrible bit of software design, in order to ensure that you can programmatically access all items in the history pool, you will need to ensure that the history tab in the client is set to show all items in history. Yeuch.

CB

Reason: