Evaluating Values on a study from a previous bar

Questions about MultiCharts .NET and user contributed studies.
JosephIM
Posts: 10
Joined: 21 Nov 2012
Been thanked: 1 time

Evaluating Values on a study from a previous bar

Postby JosephIM » 07 Dec 2012

So basically I cant determine a way to look back and reference values with my study from a previous bar.

Is there a way to do this? Is this the context for use of the VariableSeries object?

User avatar
Henry MultiСharts
Posts: 8383
Joined: 25 Aug 2011
Has thanked: 1200 times
Been thanked: 2679 times

Re: Evaluating Values on a study from a previous bar

Postby Henry MultiСharts » 10 Dec 2012

Hello JosephIM,

You can reference previous bar's values like that (ex. previous bar's close):

Code: Select all

Bars.Close[1]
You can reference previous study values like that (ex. previous moving average value):

Code: Select all

m_avg[1]


Return to “MultiCharts .NET”