Silver Trend indicator

 

Hi All,

I had been evaluating trend indicators lately. Came across Stalin, Notarius and recently Silver Trend.

Had done backtesting, and found that Silver Trend provides excellent results, with little losses on whipsaws but large winners on trends.

The backtests (manual) were done on fx and commodities.

I am interested to know if anyone else have used these indicators, what are your verdicts and whether I can convert these indicators into expert trading advisors.

Cheers, hope to hear from you soon.

Files:
 
You do know you have posted an MQL5 indicator on the MQL4 forum don't you?
 

Sorry, this is the MT4 version.

 
william.teo:

Sorry, this is the MT4 version.

Thanks for that. I ran it in the strategy tester in visual mode to see what it does.

I notice that it redraws the last arrow so that it can give a signal then change its mind. This behavior makes it look good as an indicator when checking historical charts, but that view is mis-leading on a real chart :-(

  if (CountBars>=Bars) CountBars=Bars;
   SetIndexDrawBegin(0,Bars-CountBars+SSP);
   SetIndexDrawBegin(1,Bars-CountBars+SSP);

These lines appear to belong in the init function rather than the start function (wasting processing power repeating them every tick).

 

Hi Dabbler, thanks for the valuable feedback.

I had a run on the strategy tester also. (thanks! I learned from you that I could run indicators on the Strategy Tester).

True to what you said, it changes its mind, and is misleading for real-time trading.

I did notice that the signal arrow is only confirmed (shown) at the close of a candle or bar.

Then logically, a position can be opened on the opening of the next candle or bar based on this signal.

I ran a back-test and gave up quickly - as I realized that the losses were too many compared to winner; buys were at lows and sells were at highs. It could be disastrous. The trend winners will not be able to cover the numerous stop losses.

I also looked at another indicator quite similar to this one, but the signals are vastly different and also, buys are at lows and sells are at highs. I superimposed the results on two moving averages and the entries were quite consistent with crossovers of these moving averages.

The problem is - when I ran this one on the Strategy Tester, there were no signals shown. It ran, but no show of arrows or dots.

Hope you or somebody can help to modify so that it can run properly on Strategy Tester.

I enclose the file, and rest assured, it is MT4 this time.

thanks!!

Files:
 

william.teo:

The problem is - when I ran this one on the Strategy Tester, there were no signals shown. It ran, but no show of arrows or dots.

Hope you or somebody can help to modify so that it can run properly on Strategy Tester.

I enclose the file, and rest assured, it is MT4 this time.

It is not an indicator. Try with these modifications:

   if(CB<0) return(-1); else if(NB>Bars-CB) NB=Bars-CB;
   if (NB<100) NB=100;
   for (SH=0;SH<NB;SH++)
   {
      for (R=0,i=SH;i<SH+10;i++) {R+=(10+SH-i)*(High[i]-Low[i]);}      R/=55;

      SHMax = High[Highest(NULL,0,MODE_HIGH,Per,SH)];
      SHMin = Low[Lowest(NULL,0,MODE_LOW,Per,SH)];
      if (Close[SH]<SHMin+(SHMax-SHMin)*Otstup/100 && UD!=SH_SELL) { BufU[SH]=Low[SH]-R*0.5; UD=SH_SELL; } else {BufU[SH] = EMPTY_VALUE;}
      if (Close[SH]>SHMax-(SHMax-SHMin)*Otstup/100 && UD!=SH_BUY) { BufD[SH]=High[SH]+R*0.5; UD=SH_BUY; } else {BufD[SH] = EMPTY_VALUE;}
   }
 

This will help to translate the Russian comments ...

https://www.mql5.com/en/forum/137488

 

Hi erzo

I have included your modifications.

It is still not showing the dots or arrows.

 

The most important is

for (SH=0;SH<NB;SH++)

that you forgot. The original SH=1 disables to show signals at the [0] bar, and intended to hide all the repainting scam.

 

Erzo,

Thanks for the super fast help.

It is still not working.

Why is it that it works on charts and not on the Strategy Tester??

Anyway, you guys are real experts - just a glance and you know straight away the problems and what the program is up to...

Thank you.

 

william.teo:

It is still not working.

Maybe you misunderstood me, by "not an indicator" I thought that it repaints, and not only the last signal, but it is an indicator officially.
Try the following. Start the tester on another EA, that not trading much, with visual mode (I use MACD Sample for that). When the tester starts running it's chart, drop the indicator into it and watch what the indicator paints. (MACD Sample will buy and sell, but don't care about it.)

Reason: