Current position size in AFL

How can I know the current position size of an open position in an AFL? There is an open position, say of quantity 1000. Based on some conditions, I scale out the position by 400 and the current position size is 600. How can I find out in the AFL the current position size (600 in this case)? Is there any variable that can be used? Or any code snippet would also help.

If you are using pi bridge , as new new pi bridge has two way communication with pi, you can get the position status and details into amibroker afl, please check the complete documentation of pi bridge in your q.zerodha.com/pi

Use detailed logging in Backtester settings. It will give you the exact position size for any particular period.

This may not be possible while backtesting.

Detailed logging gives exact position. However I need to know the current position size inside the AFL and do further calculations based on that.