Came across a youtube video that I thought would be perfect to test with my limited skills lol
I am stuck setting up the stop loss and take profit. What would be the best way to implement a stop loss that looks back at an “x” amount of candle-bars and picks the lowest low of all candle-bars? while at the same time comparing the current price of the underlying and set stop-loss and multiplying this by x1.5 for the take profit.
Video incase I wasn't clear:
Varad Kabade
Hi Andrés M,
To implement the above strategy, we recommend using the Minimum indicator of lean with the field as low to get the minimum low from the last x bars and using StopMarketOrder and LimitOrder to implement the stop loss and take profit logic. We have a created a demo algorithm for the above implementation; refer to the attached backtest.
Best,
Varad Kabade
Andrés M
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!