BarCount Indicator and boundaries for new template
Posted: Mon Jan 16, 2023 4:39 pm
I am creating an indicator for a template. I need to begin a calculation after a certain number of bars from the beginning of the data series (daily close) and then reset the bar count after certain conditions are met.
I am getting an error code from this script:
Bar:= BarCount+1;
Error code CS0103 The name 'BARCOUNT' does not exist in the current context.
I have a template to show historical data for a single stock and the column with Barcount displays the correct info. Can someone explain why I get an error when I use it within an indicator and if there's a different indicator or script I can use.
I have modified existing templates to build custom ones. I noticed that if I add additional columns to the right of the last column with data the indicators I've added don't calculate. If I add columns to the left of the rightmost column the indicators I've added work correctly. Is this a quirk of ER?
I am getting an error code from this script:
Bar:= BarCount+1;
Error code CS0103 The name 'BARCOUNT' does not exist in the current context.
I have a template to show historical data for a single stock and the column with Barcount displays the correct info. Can someone explain why I get an error when I use it within an indicator and if there's a different indicator or script I can use.
I have modified existing templates to build custom ones. I noticed that if I add additional columns to the right of the last column with data the indicators I've added don't calculate. If I add columns to the left of the rightmost column the indicators I've added work correctly. Is this a quirk of ER?