Back

Mean Reversion using MACD signal StopLimit not working

hello everyone, can someone please look at my trades and help me figure out why my stop limits get cancelled? You will see that my algo places trades and then a stop limit that subsequently gets cancelled.  I want my stoplosses to prevent me from ever loosing more than 2%. If pair goes down more than 0.9991 % from where i purchased it, the stop limit order should trigger and buy back or sell my lots. You will see this in the  variable called twoPercent. 

i know that i am setholdings to 10% of my portfolio but my stoplimit is for 500,000 lots. how do i make sure my stoplimit is ordering whatever allocation of the pair i have in my portfolio at the time?

Update Backtest








so funny enough i figured this out that my numbers were wrong. i have to get better at calculating and not being lazy. so i fixed my stoplimit issue. i still had a couple days where i lost 30%. i guess that is because of my setholdings quantity not matching my stoplimit quantity. 

0

I forgot to attach the backtest. but here i added a variable so that the setholdings would order the same amount as my stoplimit but that's not happening. any suggestions anyone?

0


i think i fixed it. sorry for triple posting. i just don't want you all to do extra work if i have alrready solved the issue. i don't know how to delete my previous posts

0


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