I put together a simple example for Consolidator Indicators using: 

https://www.quantconnect.com/docs#Consolidating-Datahttps://github.com/QuantConnect/Lean/blob/master/Algorithm.Python/DataConsolidationAlgorithm.py

However, I am at a loss to get it working. I was attempting to create indicators covering the exact same time spans but at the 1 minute and 5 minute resolutions. Any help would be appreciated. I cannot post the backtest since it just produces errors, but the code is below:

 

# CryptoVolatilityTap (v4, ETHUSD, Minute, Py)
# Tap crypto volatility spikes

from clr import AddReference
AddReference("System")
AddReference("QuantConnect.Algorithm")
AddReference("QuantConnect.Indicators")
AddReference("QuantConnect.Common")

from System import *
from QuantConnect import *
from QuantConnect.Data import *
from QuantConnect.Algorithm import *
from QuantConnect.Indicators import *
from QuantConnect.Data.Consolidators import *
from datetime import datetime
import decimal as d
import numpy as np


class CVTap(QCAlgorithm):

def Initialize(self):

# define email address for buy/sell notifications
# please change prior to Live deploy
#self.email_address = 'xxxxx@gmail.com'

self.SetStartDate(2017,9,1) #Set Start Date
self.SetEndDate(2017,11,14) #Set End Date
self.SetCash(1000) #Set Strategy Cash

# define crypto we want to trade on
# ETHUSD or LTCUSD or BTCUSD
self.target_crypto = "ETHUSD"

# Set brokerage to GDAX for cryptos
self.SetBrokerageModel(BrokerageName.GDAX, AccountType.Cash)

# Add crypto at minute resolution
self.AddCrypto(self.target_crypto, Resolution.Minute)

# create consolidator for 15 minute
consFiveMin = TradeBarConsolidator(5)
consFiveMin.DataConsolidated += self.OnDataConsolidated
self.SubscriptionManager.AddConsolidator(self.target_crypto, consFiveMin)

# Define exponential moving average at 1 min resolution
self.ema_very_fast_one_min = self.EMA(self.target_crypto, 10)

# Define exponential moving average at 5 min resolution
self.ema_very_fast_five_min = self.EMA(self.target_crypto, 2, consFiveMin)

# Plot 1 Min EMAs
self.PlotIndicator(
self.target_crypto_one_min,
)

# Plot 5 Min EMAs
self.PlotIndicator(
self.target_crypto_five_min,
)


def OnDataConsolidated(self, sender, bar):
self.Debug(str(self.Time) + " > New 5 Min Bar!")


def OnData(self, data):
self.Debug(str(self.Time) + " > New 1 Min Bar!")

Author