I'm getting error code 103 - The name 'Performance' does not exist in the current context
Here's my code:
protected override void OnBarUpdate()
{
if (Bars.SessionBreak)
{
priorTradesCumProfit = Performance.AllTrades.TradesPerformance.Points.Cum Profit;
}
double dailyPoints = Performance.AllTrades.TradesPerformance.Points.Cum Profit - priorTradesCumProfit;
// PLOTTING
if (dailyPoints >= 0)
{
Profit.Set(dailyPoints); //[0]
Loss.Set(0); //[1]
}
else
{
Profit.Set(0); //[0]
Loss.Set(dailyPoints); //[1]
}
} // END OnBarUpdate
Thanks.
Comment