Creating a Flag with the bar number

Questions about MultiCharts .NET and user contributed studies.
Tartalognion
Posts: 23
Joined: 17 Mar 2010
Has thanked: 20 times
Been thanked: 2 times

Creating a Flag with the bar number

Postby Tartalognion » 10 Oct 2018

Hello,

I use 1 tick charts and I'd like to create a boolean flag with the bar number as it is unique.

Although I thought it would be easy, I've been struggling for hours with that newbie question (sorry) :shock: :lol:

Either with Bars.FullSymbolData.Current or Bars.CurrentBar.

Any idea?

Thank you

User avatar
ABC
Posts: 634
Joined: 16 Dec 2006
Has thanked: 120 times
Been thanked: 359 times
Contact:

Re: Creating a Flag with the bar number

Postby ABC » 11 Oct 2018

Tartalognion,

both are fine. You need an additional variable and whenever Bars.CurrentBar is different than what you have stored in your variable, you update the value stored in your variable.
However when you operate on 1 tick charts and only compute your code with incoming ticks, you might not even need such a flag.

Regards,

ABC


Return to “MultiCharts .NET”