BarCount Indicator and boundaries for new template

A forum for all EdgeRater users

Moderator: Chris White

Post Reply
tomz
Posts: 7
Joined: Mon Jul 25, 2016 7:00 pm

BarCount Indicator and boundaries for new template

Post by tomz »

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?
tomz
Posts: 7
Joined: Mon Jul 25, 2016 7:00 pm

Re: BarCount Indicator and boundaries for new template

Post by tomz »

I found that I misspelled the indicator. It should be BarsCount not Barcount. When I run Bar:= BarCount(C)+1 I don't get an error.

Please address second question re added columns.
nibor200
Posts: 63
Joined: Wed Oct 22, 2014 11:03 am

Re: BarCount Indicator and boundaries for new template

Post by nibor200 »

@Tomz,

Did you get your January questions answered?
Thanks,
Ed S.
Post Reply