A continuation idea

 

Hi, does anyone know how to check if the trend is still trending after the trailing stop was hit due to a small correction?

Please advice.

 
Define 'trend' Define 'still trending' Once you have a concrete definitions, the coding will be easy.
 

Yes, it seems my question was too "wide".Thanks for the reply WHRoeder,i've thought about it for the last two hours and i think i have a strategy.

So here is the more to the point question: How do I check if an order was closed due to a stop loss?

Thank you.

 
t0mbfunk:

Yes, it seems my question was too "wide".Thanks for the reply WHRoeder,i've thought about it for the last two hours and i think i have a strategy.

So here is the more to the point question: How do I check if an order was closed due to a stop loss?

Thank you.

Select the Order, compare the price it closed at,  OrderClosePrice() to it's OrderStopLoss()  if it's close then there is a good chance it was closed by the SL
 
Also, in the terminal, the trade's SL or TP will be lit up (red or green respectively) if that was the cause for closing the trade... or at least it is on mine :]
Reason: