Knowing the profit of the last closed position - page 2

 
Hello, I built a robot that works with ma intersections, but after closing with the trailing stop, if there is no signal to the contrary, I want the last closed position to be opened again after 100 pips, how do I code it.
 
ümit gün :
Hello, I built a robot that works with ma intersections, but after closing with the trailing stop, if there is no signal to the contrary, I want the last closed position to be opened again after 100 pips, how do I code it.

You need to remember the opening price of the last position. And then calculate the difference between the current price and the saved price - this will be your step.

Reason: