currentPosition = Position.MarketPosition.ToString();
positionSize = Position.Quantity.ToString();
averageBarsInTrade = (SystemPerformance.RealTrades.TradesPerformance.AverageBarsInTrade).ToString();
averageEntryEfficiency = (SystemPerformance.RealTrades.TradesPerformance.AverageEntryEfficiency).ToString();
averageExitEfficiency = (SystemPerformance.RealTrades.TradesPerformance.AverageExitEfficiency).ToString();
averageTimeInMarket = (SystemPerformance.RealTrades.TradesPerformance.AverageTimeInMarket).ToString();
averageTotalEfficiency = (SystemPerformance.RealTrades.TradesPerformance.AverageTotalEfficiency).ToString();
commission = (SystemPerformance.RealTrades.TradesPerformance.TotalCommission).ToString();
grossLoss = (SystemPerformance.RealTrades.TradesPerformance.GrossLoss).ToString();
grossProfit = (SystemPerformance.RealTrades.TradesPerformance.GrossProfit).ToString();
longestFlatPeriod = (SystemPerformance.RealTrades.TradesPerformance.LongestFlatPeriod).ToString();
maxConsecutiveLoser = (SystemPerformance.RealTrades.TradesPerformance.MaxConsecutiveLoser).ToString();
maxConsecutiveWinner = (SystemPerformance.RealTrades.TradesPerformance.MaxConsecutiveWinner).ToString();
netProfit = (SystemPerformance.RealTrades.TradesPerformance.NetProfit).ToString();
profitFactor = (SystemPerformance.RealTrades.TradesPerformance.ProfitFactor).ToString();
riskFreeReturn = (SystemPerformance.RealTrades.TradesPerformance.SharpeRatio).ToString();
totalQuantity = (SystemPerformance.RealTrades.TradesPerformance.TotalQuantity).ToString();
tradesCount = (SystemPerformance.RealTrades.TradesPerformance.TradesCount).ToString();
tradesPerDay = (SystemPerformance.RealTrades.TradesPerformance.TradesPerDay).ToString();
if(State == State.Historical)
return;
Ideally, I only want to see the strategy performance for the current session. Would that be possible to filter out? Or would I have to terminate the strategy and reinitialize it every session?
Comment