Hello,
I'm wondering if someone could help me learn how to add Log method calls to the attached backtest. I tried live paper trading it with different a few different equites today and yesterday, and it only places trades sometimes. I'm trying to figure out why it works and places trades sometimes, but not other times. Any references or help is greatly appreciated!
Thanks
Sean
Varad Kabade
Hi Sean,
To Log information about a Order's life cycle we recommend implementing the OnOrder event handler method in the above algorithm Refer to the following code snippet
and to log information about the conditions when insights are emitted we can log it Update method:
Also we recommend using the TrailingStopRiskManagementModel to implement trailing stop loss in the algorithm framework:
Refer to the attached backtest for the above mentioned changes.
Best,
Varad Kabade
S O'Keeffe
Thank you Varad! This issue hasn't happened in the last two days now, but I will keep an eye out and try these methods if I see it return. I really appreciate it
Sean
S O'Keeffe
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!