I'm getting an exception when I attempt the following:
protected override void Initialize()
{
try
{
CalculateOnBarClose = true;
EntriesPerDirection = 20;
EntryHandling = EntryHandling.AllEntries;
ExitOnClose = true;
TraceOrders = true;
SyncAccountPosition = true;
Unmanaged = true;
myIndicator1 = Indicator1(parameters);
myIndicator2 = Indicator2(BarsArray[1]);
Add(PeriodType.Tick, BarsPeriod.Value * this.HigherTimeframeMultiple);
Add(myIndicator1);
}
catch (Exception ex)
{
Debug.WriteLine(ex);
}
}
"'BarsArray' property can't be accessed from within 'Initialize' method"
So my question is, where can I instantiate this indicator once? The alternative is calling it on every bar update -
Second question, somewhat of a derivative of this, is how do I display this higher time frame indicator on the same chart as the base time frame indicator?

Comment