+1 888 340 6572

MaxPositionsAgo

From MultiCharts
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Returns the number of closed positions for the strategy on the current moment.

Usage

Maxpositionsago;

Note

This function can only be used in signals.

Example

Calculate the PnL for all closed positions up to the current moment.

var: totalprofitloss(0), idx(0);
for idx = 1 to maxpositionsago begin
totalprofitloss = positionprofit(idx);
end;