Lets get maximum opened position.
MaxPositionProfit members:
// Properties
int this[int positionAgo] // returns maximum opened position including positionAgo entry
// positionAgo is counted as follows:
// MaxPosition[0] - maximum opened position including current position,
// MaxPosition[1] - maximum opened position that was on previous position and so on.