I have problem displaying plot for multi-instrument when date range of primary instrument less than Data Start Date. E.g.: IBM data exist only from 1/1/2004, but our Start Date is 1/1/2003.
However, if we change the Start Date to greater than minimum primary date, the plot come out correctly.
Following lines are my simple example of the code:
Thanks for your feedback..
(see example below)
// ----------
#region Variables
// Wizard generated variables
private int myInput0 = 1; // Default setting for MyInput0
// User defined variables (add any user defined variables below)
private string secondInstrument = @"SPX"; // Default setting for SecondInstrument
#endregion
/// <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(secondInstrument, PeriodType.Day, 1);
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Dot, "Plot0"));
Overlay = false;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
Plot0.Set(Close[0]);
}
// ------------

Comment