My onBarUpdate looks like this snippet: Note the barPropertiesList.Add(newBar); and the print statement following it to show the count of the list. I get no errors from my try catch but nothing is added to the list. see below for the print output showing this.Any ideas how to get this working again? the problem started after I renamed an indicator.
thanks
protected override void OnBarUpdate()
{
if (CurrentBar == 0)
ClearOutputWindow();
try
{
if (BarsInProgress == 0)
{
BarProperties newBar = new BarProperties(
barIndex: CurrentBar,
open: Open[0],
high: High[0],
low: Low[0],
close: Close[0],
volume: Volume[0],
time: Time[0].TimeOfDay,
date: Time[0].Date,
dateTime: Time[0]
);
barPropertiesList.Add(newBar);
Print($"{CurrentBar} count: {barPropertiesList.Count} ");
}
Print output:
0 count: 0
1 count: 0
2 count: 0
3 count: 0
4 count: 0
5 count: 0
6 count: 0
7 count: 0

Comment