I read the Help files about the Add(), BarsArray and BarsInProgress methods in order to figure out how to plot the Close of a 2097 tick Bars object in a chart of the 233 tick Bars object.
I wrote this code which does not work
public class Plot2097Ticks : Indicator
{
#region Variables
#endregion
/// <summary>
/// </summary>
protected override void Initialize()
{
// Add a 2097 tick Bars object - BarsInProgress index = 1
Add(PeriodType.Tick, 2097);
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
CalculateOnBarClose = false;
Overlay = false;
PriceTypeSupported = false;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
Plot0.Set(Closes[1][0]);
}
Gerard

Comment