How to see individual scale-in transactions in backtesting?

I enabled scaling-in of buying positions inside backtesting using the code below;
PositionSize = -20; Buy = IIf(BuyBar, sigScaleIn, 0);

From the back-testing results, I am not able to see the scale-in transactions although I am able to see the first transaction that took place. From the column "Scale In/Out", I can see that scale-in transactions took place.
Here is the screenshot of my backtest results.
scale-in

Is it possible to view the individual scale-in transactions like the entry date and exit date?

Hi @thankyou18
You can see detail of scale in trades by changing Back-tester Settings Tab to Detailed Log as per
image
The Scale in Report will look similar to this
image

You an also show trade arrows on you chart to show where scale ins occur:

with something like this

// Plot Signals
shape1 = (Buy == 1) * shapeUpArrow + (Sell >= 1) * shapeDownArrow ;
Shape2 = (Buy > 0 AND Cover > 0) * shapeStar + (Sell > 0 AND Short > 0) * shapeHollowStar;
Shape3 = (Sell == 2) * shapeDownArrow + (Cover == 2) * shapeHollowUPArrow ;
Shape4 = (Buy > 1) *  shapeUpArrow + (Short > 1) * shapeHollowDownArrow ;
Shape5 =  (Short == 1) * shapeHollowDownArrow + (Cover == 1) * shapeHollowUpArrow  ;
PlotShapes( shape1, IIf((Buy > 0), 43, IIf((Sell > 0), 32,43)), 0,  IIf((Buy > 0), Low, IIf((Sell > 0),High, IIf(( Short > 0 ), High, IIf (( Cover > 0), Low,Low )))) ,-30,0);//43 is brightGreen
plotShapes(Shape2, IIf ((Buy > 0 AND Cover > 0),28,25), 0,IIf((Buy > 0),Low ,High ) ,120,0);
plotShapes(Shape3, IIf ((Sell == 2), 45, iif ((Cover == 2),45,17)), 0,IIf((Sell == 2),High , iif ((Cover == 2), Low,High ) ),offset = -60,0);
plotShapes(Shape4, IIf ((Buy > 1), 43, iif ((Short > 1),32,17)), 0,IIf((Buy > 1),Low , iif ((Short > 1), High ,High ) ),-60,0);
plotShapes(Shape5, IIf ((Short  == 1), 32, iif ((Cover == 1),43,17)), 0,IIf((Cover == 1),Low , iif ((Short  == 1), High ,High ) ),-50,0);

GraphXSpace = 5;

You can change the colors to suit your self --- scale-in is Buy > 1 normal initial buy is Buy == 1

Hope this helps

3 Likes

Hi @RichardScanlan,

Thanks for your answer. It works but the detailed log display is not as presentable as the trade list.

The trade list is a summary of the overall trade giving average entry price exit price and overall profit.

If you want to split out scale in components I suggest you add metrics within a loop to store each scale in component the output the scale in metrics in an exploration. This is relatively straight forward.

Cheers Richard

Hi,

another possible option to keep the trade list report is to choose SetBacktestMode( backtestRegularRawMulti ); and treat scale in/out signals as separate trades.

1 Like