You can now tag orders with a short string of custom information. This lets you record critical information relating to the order which will display next to the order in the trades tab!
// Set via set holdings as the final optional argument
SetHoldings(symbol:"SPY", percentage:0.80, liquidate: false, tag:"Custom information");
//Or manually create the order:
Order(symbol:"SPY", quantity:100, type:OrderType.Market, asynchronous:false, tag:"Custom information")
Tadas Talaikis
Def returns
Is this feature only active for C# users? I'm getting an invalid syntax error trying out this format in Python, and looking at other posts and info online I can't seem to find another way to get a custom tag in the order log.
Def returns
Found it: I was just including “liquidate:”, and “tag:” before the true/false, and the tag I wanted, so wrong format.
Correct format: self.SetHoldings(symbl, 0, false, "Your Tag Here")
More on that here:
Jared Broad
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!