Hello,

I would like to calculate the 'Stop Loss', Buy/Sell price differences from the last trade and to be more clear here is an example:

Buy
Hold_Buy
Hold_Buy
Hold_Buy
Hold_Buy
Hold_Buy
No_Trade
No_Trade
No_Trade
No_Trade
Sell
Hold_Sell
Hold_Sell
Hold_Sell
Hold_Sell
Hold_Sell
etc...

When Buy is hit, to exit if Stop Loss is hit (opposite for Sell);
To calculate the difference of the last Hold_Buy and the previous Buy (opposite for Sell);

If someone could help me out how to solve this problem, I would be very grateful.
Thank you.