I use the SetProfitTarget() order type to set my profit target for my 1st half position.
In the attached picture I use the following symbols.
The blue arrow is the "set position" where the trade is entered with a "next day" order. In this case is a long trade.
The yellow triangles are the "stop loss" prices.
The green triangle is the "profit target" price
The picture shows that we have reached our setup position indicated by the blue arrow, and the next day 2 orders are entered for the same quantity. When the first order (half position) reaches the profit target the stop loss price for the following day is updated to the entry price (breakeven point) as shown in the picture.
The issue I am reporting is that in the case illustrated the first half position is closed at the profit target price even if that value was not reached in the trading day as there was a gap. I don't think this what would have happened in real time.
Is this because the "simulated" process is not available when setting a Profit Target?
Is there a solution to this problem?
Thanks
Comment