Still no-go unfortunately. The stop loss I don't think is quite right, but regardless, it doesn't actually exit the trade anyway. There is a red triangle with a grey border but, according to the backtester, the trade still only exits at the yearly/100 day low.
Trouble is, the more I tweak the...
Thanks Trash.
I've backtested your code and I can see trades getting stopped out (which is good). Unfortunately what I want is that the stop loss only applies when 'Sellfilter' is true (XAO closes below its 75 MA). Also, when the filter turns off again, the stop loss value resets/goes to...
Thanks for your help Trash.
I'll have a look to see if those extra '=' are still in there. I remember making that mistake at least once so I may have left one in (conversely, I may have already fixed them up and posted early,bug-riddled code).
It seems from what you're saying its more...
Thanks Trash,
I've tried those lines of code and unfortunately it still didn't work. I actually modelled my stop loss loop on the link you provided. The stop loss plot looks correct and there is even a red arrow over the bar where it should have exited. It just doesn't exit the trade. I've...
Hi guys,
Fantastic thread.
I'm having a problem with a Sell within a FOR loop. I use the FOR loop as a kind of trailing stop. I have the statement 'Sell[i] = 1' within the loop but the trade never closes. Through some debugging, I know that it gets to that part of the code but I'm not sure...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.