For example, I am trying to practice developing by creating a basic indicator that displays my daily and weekly PNL on the chart. But, whenever I use:
protected override void OnBarUpdate()
{
// Check if it's a new day
if (Time[0].Date > lastDailyReset)
{
dailyProfitLoss = SystemPerformance.AllTrades.TradesPerformace.Gross Profit;
dailyPNL = dailyProfitLoss; //Set daily PNL for the new day
lastDailyReset = Time[0].Date;
}
}
I end up getting CS0120 error. Am I supposed to create a reference to SystemPerformace?
I'm really confused so if anyone could help I would greatly appreciate it.

Comment