Hey,
Is it possible to filter tradebars from specific exchange?
Did not manage to find an 'Exchange' property, similar to Tick class .Exchange property.
Thanks!
QUANTCONNECT COMMUNITY
Hey,
Is it possible to filter tradebars from specific exchange?
Did not manage to find an 'Exchange' property, similar to Tick class .Exchange property.
Thanks!
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.
Alexandre Catarino
In order to create TradeBar from a given exchange, you need to subscribe to Tick data and only use ticks from a that exchange to consolidate the bars. In that case, you can not subcribe the consolidator:
private TickConsolidator _consolidator;
// In Initialize
_consolidator = new TickConsolidator(TimeSpan.FromMinutes(1));
_consolidator.DataConsolidated += OnMinuteData;
private void OnMinuteData(object sender, TradeBar bar)
{
// bar consolidated with ticks at OnData
}
public void OnData(Ticks ticks)
{
foreach (var tick in ticks[symbol])
{
// if filter condition met, continue
_consolidator.Update(tick);
}
}
Jared Broad
TradeBars are already pre-filtered for specific exchanges.
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.
Jenny S
Thank you both.
Jared, can you please elaborate your answer?
Where is it happening? Which exchanges are filtered? How can I select the desired exchange?
Jared Broad
Hey Jenny S sorry for the delay: you can see the filter used in our backend processing here:
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.
Jenny S
Thank you Jared.
Yes, I've done this while using tick resolution, but on second resolution it's not available.
How do you do this on resolution other than tick (second, for example)?
Is there another way except TickConsolidator which Alexandre mentioned before?
Jared Broad
- "resolution other than tick"
No -- bars are already preprocessed and stored on disk as bars.
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.
Jenny S
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!