/// <summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
/// </summary>
protected override void Initialize()
{
Add(new Plot(Color.Firebrick, PlotStyle.Bar, "Spread"));
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
Value.Set(GetCurrentAsk() - GetCurrentBid());
}
I works perfectly if I add it in one of the columns. However the reason why I wanted to use it is that I wanted to a column to keep track of the difference between the advancing and declining issued on NYSE and NASDAQ. For some reason the indicator does not make the calculation for the two indexes but it does for all the other insutruments, as shown in the picture.
Comment