Hi folks,
Does someone know how long the string length for the order tag is allowed to be? Also, are there any limitations on what data can be added to that string? I am thinking about placing some serialized json data into the tag to simulate some persistence information since there is no way to maintain state between restarts of the algo.
Cheers,
Mitch
Douglas Stridsberg
Hi Mitch,
Don't know for sure how flexible tags are, but I would be hesitant on relying on them to store anything even mildly complex.
Regarding state persistence, you can achieve this with relative ease by using Download() to fetch an external file (e.g. a Dropbox .json file) into your algorithm at start-up. You would need something that saves the state at algorithm close and then simply paste this data into the external file in question.
Myself and others are using this currently in our live deployments with no issues.
Mitch Christow
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!