Hello
This is the original of jr1976 ( https://www.prorealcode.com/user/jr1976/). the link for the original code is https://www.prorealcode.com/prorealtime-trading-strategies/sp500-riding-the-trend/
I have made some optimizations to make it better. But there are 5 transactions which increase drawdown. Can you help to optimize them
Thanks
The itf doesn´t work. “Variable h1 does not exist”
You can // the h1 line, it’s not needed. The bigger problem is the massive DD due to huge stoploss. 10 years ago the SP was around 1100, so SL of 241 equates to ~22%. Even today it’s over 6.5%.
Sorry Guleny, but his makes the algo fairly redundant. A 10 year buy and hold would have been more profitable (10 x ~2500 pts).