When doing a test with Bars.LastBarOnChart on a tick chart, the block seems never executed. On a minute chart, it works. The code is :
Code: Select all
public class test_debugLastBarOnChart : IndicatorObject {
private IPlotObject plot1;
public test_debugLastBarOnChart(object _ctx):base(_ctx){}
protected override void Create() {
plot1 = AddPlot(new PlotAttributes("", EPlotShapes.Line, Color.Black));
}
protected override void StartCalc() {
}
protected override void CalcBar(){
if (Bars.LastBarOnChart)
Output.WriteLine("Never written with a tick chart");
plot1.Set(Bars.Close[0]);
}
}
Regards.