SuperTrend indicator goes wrong in Strategy Tester

 

Hi, I downloaded the fabulous SuperTrend indicator a while ago right here: https://www.mql5.com/en/code/8268

Now, I made a EA and I'm trying to test it, made a "tester" template with the SuperTrend indicator on it, but unfortunately it doesn't look good.

Since a picture tells a thousand, as you can see on the right of the attached chart, after the test has started the indicator fails completely.

The indicator stays green for the whole test and loses the "step structure" for lack of a better term.

I can't get my head around it, didn't experience any problems with another custom indicator in de tester.

Anyone any idea what's the problem here ?  Thanks.


ST chart

SuperTrend
SuperTrend
  • www.mql5.com
The SuperTrend indicator here is based on the one in ProRealTime. It has the same parameters: Nbr Periods and Multiplier, and works in the same way.
 
funske:

Hi, I downloaded the fabulous SuperTrend indicator a while ago right here: https://www.mql5.com/en/code/8268

Now, I made a EA and I'm trying to test it, made a "tester" template with the SuperTrend indicator on it, but unfortunately it doesn't look good.

Since a picture tells a thousand, as you can see on the right of the attached chart, after the test has started the indicator fails completely.

The indicator stays green for the whole test and loses the "step structure" for lack of a better term.

I can't get my head around it, didn't experience any problems with another custom indicator in de tester.

Anyone any idea what's the problem here ?  Thanks.



Try a different version

Supertrend Link

 

Thanks for the link Keith. But a few minutes ago I actually slightly modified an ATR trailing stop indicator I picked up somewhere so that it works the same as the SuperTrend indicator I had trouble with. And it works fine in the Strategy Tester!!!

BTW This being said as a non-programmer, I think the SuperTrend indicator fails from the start because it has to look back to determine what trend we're in (trend change occurs when a close happens above/below the SuperTrend lines, so initially it has to look back).  

Anyway problem solved, I'm happy, Thanks. :)

The Fundamentals of Testing in MetaTrader 5
The Fundamentals of Testing in MetaTrader 5
  • www.mql5.com
The idea of ​​automated trading is appealing by the fact that the trading robot can work non-stop for 24 hours a day, seven days a week. The robot does not get tired, doubtful or scared, it's is totally free from any psychological problems. It is sufficient enough to clearly formalize the trading rules and implement them in the algorithms, and...
Reason: