Hi, I'm really strugling understanding how to use the Delay() indicator. It is a usual case to want to look at the value of an indicator X bars ago. This is my usual algorithm template. Running the sample below throws the following error pointing at the RegisterIndicator() line. Thanks for any comments/recommendations/criticisms:

 

20171119 23:49:30.893 ERROR:: ConsoleSetupHandler.Setup(): System.ArgumentException: Type mismatch found between consolidator and indicator for symbol: BTCUSD.Consolidator outputs type TradeBar but indicator expects input type IndicatorDataPointusing System;
using System.Collections.Generic;
using System.Linq;
using QuantConnect.Brokerages;
using QuantConnect.Data.Consolidators;
using QuantConnect.Data.Market;
using QuantConnect.Indicators;

namespace QuantConnect.Algorithm.CSharp
{
public class TestMACD: QCAlgorithm
{
protected Symbol btcusd = QuantConnect.Symbol.Create("BTCUSD", SecurityType.Crypto, Market.GDAX);
private MovingAverageConvergenceDivergence MacD;
private List<MovingAverageConvergenceDivergence> MacDs;

private Delay delay;
private Delay delayedMacD;

private void ConsolidatedBarHandler(object sender, TradeBar data)
{
if (!MacD.IsReady) return;
Debug(String.Format("{0} -> {1}",data.Time.ToString(), data.EndTime.ToString()));
}

public override void Initialize()
{
// set up our analysis span
SetStartDate(2014, 1, 1);
SetEndDate(2015, 1, 1);
SetCash(1e6);
SetBenchmark(btcusd);
// SetBrokerageModel(BrokerageName.GDAX, AccountType.Cash);
SetWarmUp(TimeSpan.FromMinutes(60));

AddCrypto(btcusd, Resolution.Minute);


var consolidator = new TradeBarConsolidator(TimeSpan.FromMinutes(60));
consolidator.DataConsolidated += ConsolidatedBarHandler;
SubscriptionManager.AddConsolidator(btcusd, consolidator);

MacD = MACD(btcusd, 26, 12, 9, MovingAverageType.Exponential, Resolution.Hour, Field.Close);

var MacD2 = new MovingAverageConvergenceDivergence(btcusd, 26, 12, 9, MovingAverageType.Exponential);
delay = new Delay(2);
delayedMacD = delay.Of(MacD2);
RegisterIndicator("BTCUSD", delayedMacD, Resolution.Minute);

}

public void OnData(TradeBars data)
{

}
}
}