I am working on a simple bar reversal algo that uses custom bar lengths and counts the number of consecutive candles with lower highs. It then stops itsself in long after a defined number of down bars when the previous high is crossed. 

I've coded this successfully in crypto markets, but getting the data is much more involved for futures. Since I've used some default code provided in the futures consolidator samples to understand how to pull in that data, I'm getting slightly confused with my variables and syntax between methods once it's all copied in.

The issue is, I can successfully create new consolidated bars, but trying to use that bar data and trying to define the current price within different methods is getting errors in build..

I've commented out line where price is not working, (OnData block) to successgully build. I'm also not 100% sure I'm getting the single most recent contract's High and Low data correctly for my consolidated bars. (My backtest says it's too much data so I can no longer view logs)

Any help would be appreciated!

Author