Thank you Quant Trader for your replies....
just to make sure... i create the 2 consolidators:
public override void Initialize(){
AddEquity("SPY", Resolution.Minute);
var fiveMinutes = new TradeBarConsolidator(TimeSpan.FromMinutes(5));
fiveMinutes.DataConsolidated += OnFiveMinutes;
SubscriptionManager.AddConsolidator("SPY", fiveMinutes);
var dailyMinutes = new TradeBarConsolidator(TimeSpan.FromMinutes(1440));
dailyMinutes.DataConsolidated += OnDaily;
SubscriptionManager.AddConsolidator("SPY", dailyMinutes);
}
public void OnFiveMinutes(object sender, TradeBar bar)
{
// how do i use rolling windows here to get previous 5min bars close high low etc?
//do i implement entry and exit here or on OnData method?
}
public void OnDaily(object sender, TradeBar bar)
{
// how do i use rolling windows here to get previous days close high low etc?
//do i implement entry and exit here or on OnData method?
}