how to read the BigPointValue for current instrument?
I tried like
double aa = PowerLanguage.IInstrumentSettings.BigPointValue;
or double aa = PowerLanguage.IInstrumentSettings.BigPointValue.get;
but all failed.
Sometimes there may be two instruments in a chart window. how to read the 2 BigPointValue seperately?
how to read the BigPointValue for current instrument?
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: how to read the BigPointValue for current instrument?
Hello viresearch,
You need to use:
Bars.Info.BigPointValue.
BarsOfData(2).Info.BigPointValue.
Source: MC .Net Wiki, MC .Net FAQ
You need to use:
Bars.Info.BigPointValue.
BarsOfData(2).Info.BigPointValue.
Source: MC .Net Wiki, MC .Net FAQ
Code: Select all
using System;
using System.Drawing;
using System.Linq;
using PowerLanguage.Function;
namespace PowerLanguage.Indicator
{
public class Test_StringPlot : IndicatorObject {
public Test_StringPlot(object _ctx):base(_ctx){}
private IPlotObjectStr plot1;
private IPlotObjectStr plot2;
protected override void Create()
{
plot1 = AddPlot(new StringPlotAttributes("", Color.Red));
plot2 = AddPlot(new StringPlotAttributes("", Color.Blue));
}
protected override void StartCalc()
{
}
protected override void CalcBar()
{
plot1.Set(Bars.Info.BigPointValue.ToString());
plot2.Set(BarsOfData(2).Info.BigPointValue.ToString());
}
}
}