Hello,
I have noticed that tags are changed by LEAN. I'm not sure if this is a bug, but my system wont work since it depends on order TAGs. Event message is appended at the end of the tags for some reason. For example if the tag was "2023541587_abc", it ends up being "2023541587_abc - Binance Order Event Buy"
How can we disable this behaviour? Thanks
Gorkem
Ok, I just learned that this behavior is expected and cannot be disabled. Something like code below should do the trick.
Mia Alissi
Yes, Gorkem's solution is a good approach to handle this situation. The provided code snippet will split the tag string at the first space and only keep the first part. This way, any appended information by LEAN will be ignored. Here is how it works:
In this line, the
split(' ')
function splits the tag string into a list of substrings whenever it encounters a space. The*_
syntax in the left part of the assignment is a way to ignore the rest of the items in the list. So,tag
will only hold the first substring before the space, effectively removing any appended information.Remember to apply this operation whenever you are processing your tags.
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.
Gorkem
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!