I have a strategy that i want to check what the current unrealized profit and based on that profit, i would like to move my stop loss up to a certain point.
How can i code this properly? I don't want to know the last trade as that trade is already closed. I want to know current open position.

Comment