According to the Programmer Guide PDF:
However my position is not closed. Indeed CurrentPosition.ProfitPerContract shows a value. Here is some example debug output of my CurrentPosition during a backtest (add strategy to a chart of SPY)CurrentPosition.Profit = CurrentPosition.OpenProfit – current OpenPL upon the open position or 0, if the position is closed.
CurrentPosition.ProfitPerContract – current OpenPL upon the open position per contract or 0, if the position is closed.
Code: Select all
CurrentPosition.Profit = 0
CurrentPosition.ProfitPerContract = 0.61
StrategyInfo.AvgEntryPrice = 210.33
CurrentPosition.OpenLots = 47
Thank you for your time,
-Jason