Hi everyone, just wondering if this is possible. I'm using the Coarse filter to do universe selection, filtering by price, fundamental data, etc, and then sorting by some things like dollar volume, etc. The Coarse filter function then returns a list of symbols in a specific sorted order.
In other methods, such as OnSecuritiesChanged or OnData, is it possible to access that universe of securities returned by Coarse filter in the exact same sorted order?
Whenever I look at objects such as AddedSecurites or ActiveSecurities, it seems to be in a random order, and just wondering if I can maintain that original sort order when looping through them.
Thanks,
Chetan
Nico Xenox
Hey Chetan Prabhu,
not sure if there's a thing for that but you could try the following thing:
I tested it with the debugger and it seems to work as expected.
Hope it helps ;)
Chetan Prabhu
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!