Back

Tagging on Sell?

Is there a way to add a tag to a Sell order? Loving the tag for the buy, but it doesn't seem complete if I can't also add a tag to the Liquidate.

I might be using it wrong, but I'm attaching statistical info on the buy as a tag so that when reviewing the orders in a backtest, I can see why orders were bought. It would be cool also to attach some info on the sell that ties back to the original buy such as profit/loss and other interesting data.

I originally put all this sort of info in the Log, but I run out of space too quickly for it to be reliable.
Update Backtest








Hey Levi, happy to help but please please post an example of this not working if you can.
0

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.


I'm reviving this old thread because I'm in the exact same situation. when I use a simple line such as the one below, I see the sale process in the Trades log of the backtest, but the Tag column is blank. The tag works perfectly using the SetHoldings method. Levitikon, did you find a solution for this?

Liquidate(symbl, "test");

0

For anyone else who is interested, the solution I came up with is to just use SetHoldings, but assign a value of 0.

SetHoldings(symbl, 0, false, "Your Tag Here");

0

We have submitted a patch to fix that issue. Thank you for the report.

0

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.


Update Backtest





0

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.


Loading...

This discussion is closed