Average of a Bar  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
TopGuy
Posts: 16
Joined: 20 Nov 2012
Has thanked: 1 time
Been thanked: 7 times

Average of a Bar

Postby TopGuy » 21 Nov 2012

I looked at the code of the moving average indicator and it is using Bar.Close to calculate the average.

There is no Bar.Average or Bar.Data properties (where the data is a collection of the individual ticks, so I could calculate the average myself).

Is there any way to calculate the average of a bar?

Dru
Posts: 107
Joined: 28 Aug 2007
Has thanked: 4 times
Been thanked: 171 times

Re: Average of a Bar

Postby Dru » 22 Nov 2012

There is no Bar.Average or Bar.Data properties (where the data is a collection of the individual ticks, so I could calculate the average myself).
In general there is no tick detalization for bars with minute or higher resolution.

TopGuy
Posts: 16
Joined: 20 Nov 2012
Has thanked: 1 time
Been thanked: 7 times

Re: Average of a Bar

Postby TopGuy » 22 Nov 2012

Thanks Dru, I am on tick charts (100 tick per bar).

The logic says, if MC.NET had a way of constructing the bar and showing me the tick movements as they appear, then I should have access to this data through some API, even in non-aggregated format.

Dru
Posts: 107
Joined: 28 Aug 2007
Has thanked: 4 times
Been thanked: 171 times

Re: Average of a Bar  [SOLVED]

Postby Dru » 27 Nov 2012

There are 2 ways:
1) add the same instrument to the chart but with 1 tick resolution (or the one you need) and access ticks via BarsOfData
2) use IDataLoader


Return to “MultiCharts .NET”