Code: Select all
namespace PowerLanguage.Indicator{
public class test1_zb : IndicatorObject {
private Function.HighD m_kbarD;
private VariableSeries<Double> Value1;
private IPlotObject plot1;
public test1_zb(object _ctx):base(_ctx){}
protected override void Create() {
plot1 = AddPlot(new PlotAttributes("", EPlotShapes.Line, Color.Red));
m_kbarD = new Function.HighD(this);
Value1=new VariableSeries<Double>(this);
}
protected override void StartCalc() {
m_kbarD.periodsago=2;
}
protected override void CalcBar(){
[b]if(Bars.TimeValue.TimeOfDay>=new TimeSpan(10,00,00))m_kbarD.periodsago=3;[/b]
Value1.Value=m_kbarD[0];
plot1.Set(0, Value1.Value);
}
}
}