I am trying to code a Multi timeframe indicator where on an intraday chart (say 5 min), I take the intraday low and add the Daily ATR. Have the following code but it does not seem to plot anything. Any help would be highly appreciated.
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Red), PlotStyle.Hash, "DayLow"));
Add(new Plot(Color.FromKnownColor(KnownColor.Crimson), PlotStyle.Hash, "LowPlusATR"));
Add(PeriodType.Day,1);
Overlay = true;
}
/// <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.
DayLow.Set(CurrentDayOHL().CurrentLow[0]);
LowPlusATR.Set(CurrentDayOHL().CurrentLow[0] + ATR(BarsArray[1], 7)[1]);
}
Comment