Set values to VariableSeries

Questions about MultiCharts .NET and user contributed studies.
jaanie
Posts: 4
Joined: 13 Sep 2013
Location: The Netherlands
Has thanked: 1 time
Been thanked: 1 time

Set values to VariableSeries

Postby jaanie » 30 May 2015

I'm finding below code in NT manual online.
Setting Values - DataSeries.Set() & DataSeries.Reset()
You can set value (plug in a value) into a DataSeries object by calling the Set() method.

DataSeries.Set(double value)
Setting a value on a DataSeries object is automatically aligned to the current bar being evaluated. This ensures values across all DataSeries objects are always in sync by the CurrentBar index. The following code samples demonstrates calculating the range of each bar and storing the value in a DataSeries object.

protected override void OnBarUpdate()
{
// Calculate the range of the current bar and set the value
myDataSeries.Set(High[0] - Low[0]);
}
How is this done in Mulicharts.Net?

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Set values to VariableSeries

Postby JoshM » 30 May 2015

See this code example (and the comments in it) I posted in another thread. To summarise, you can use the VariableSeries Value property set its value for the current bar.


Return to “MultiCharts .NET”