Hi there, 

So I've already used the framework for some investing strategies and now I'm trying to implement a simple time-series momentum swing trading strategy on commodity CFDs (Market.Oanda).

 

What I would like to happen is the following:

1) Minute/hourly resolution is used as the main data resolution (set in main.py) with multiple symbols.

2) In the AlphaModel, I would like to consolidate into Daily data and register an indicator to each symbol (example, Donchain Channel) with this consolidated data.

3) Each time (if and only if) a new daily data is consolidated (which should be at the close/open for 24/5 CFDs), check whether the close of that daily bar is higher/lower than the Donchian Channels.

4) Emit insights Up/Down for those symbols that have closed above/below the Channels. 

You can see my current progress in the attached code.

 

Problems:

1) Through Debugging, I have noticed that my current OnDataConsolidated is being called at different times (i.e. "Daily" bars are consolidating at different times). I have followed the trail and the indicators are being registered at the same time, and all contracts should open/close trading at the same time each trading day.

2) Furthermore, the "Daily bars" are all ending at "00:00:00" (bar.EndTime). This is not the "end of trading day close" that I'm after. In all cases, the "Daily bars" are giving an intra-day price (00:00:00) as the "Daily close". 

 

If someone could please help me figure out what is going wrong with my indicator + consolidator combo, and thus help me achieve the process initially outlined above, that would be very much appreciated! I'm not sure if I've explained things in the simplest manner, so please ask any further questions. 

Thanks in advance, 

Kayne.