I was wondering how to get the high/low/close/open price from a quotebar after you've created a consolidator for a custom timeframe. I've only ever seen the consolidation being implemented into an indicator is is possible to obtain the quotebar prices from say a 15m consolidator?
for example: in the attached backtest im selling when the data[symbol].Low is < ExponentialMovingAverage(symbol, 13)
does the Low price come from 15minutes or from 1 minute? and if its not getting the low over the course of 15 minutes how would i go about obtaining that price?
thank you
Alexandre Catarino
Hi Mitch Carrara ,
In the shared algorithm, the consolidated QuoteBar is the bar parameter in the on_custom method. It contains the 15-minute Low (the minimum of all 1-minute bars Low values):
def on_custom(self, sender, bar): low = bar.Low
Mitch Carrara
Thank you so much Alex
One more question:
If I was working with mutliple pairs how could I go about getting the bar.Low of a specific symbol
thanks again,
Mitch
Mitch Carrara
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!