Scaling Out Backtesting AFL (Taking control over scale out price)


I am so far successful in writing a strategy using AFL Scale out feature. The idea is Initially buy 2 lots, Book one lot profit at the first target and second lot profit at the second target or close all the positions if my trial stop is hit.
My Question here is that how to have control of price when scaling out. Say I am scaling out 1 lot, How to have control over the price at which that 1 lot is squared off. Refer the below image. Red Solid line is my entry price line. 1st red dotted line is my first target and 2nd dotted line is my second target. Blue dotted line is the trial stop.


In the articles I referred says that assign sigSaleOut to Short or Buy array. But couldn't find how to define the exit price of the scaled out position.
Any help related to this is much appreciated..

Vinay V

BuyPrice controls price for both initial opening of long positions as any long scale in and scale out.
ShortPrice controls price for both initial opening of short positions as any short scale in and scale out.


Thanks for your response Tomasz. So when we scale out we just have to assign the BuyPrice[I] or ShortPrice[I] to whatever price accordingly. Correct ?