Simple Trend Detector Indicator For MT4

Simple Trend Detector Indicator For MT4

The Simple Trend Detector Indicator For MT4 is a measure of price strength that fluctuates between 0 and 1. The indicator has its oversold and overbought areas labelled with dotted horizontal lines at 0.3 and 0.7. During sideways markets, the Simple Trend Detector Indicator For MT4 flashes a buy signal when it rises from below 0.3. A sell signal is generated when the indicator drops from above 0.7. During trending market phases, the Simple Trend Detector Indicator For MT4 should only be used to pin point trades in the direction of broader market trend.

FREE Simple Trend Detector Indicator

Download the FREE Simple Trend Detector Indicator for MT4.

To receive my email 100% sure: 
Put my email on your whitelist!

 

Partially Automated Trading Besides Your Day Job

Alerts In Real-Time When Divergences Occur

My Recommended MT4/MT5 Broker

 

Installing the Simple Trend Detector Indicator For MT4

After you downloaded the indicator via the form above you need to unzip the zip-file. Then you need to copy the file STD.mq4 into the folder MQL4\Indicators of your MT4 installation. After that please restart MT4 and then you will be able to see the indicator in the list of indicators.

Parameters of the Simple Trend Detector Indicator For MT4

The Simple Trend Detector Indicator For MT4 has 1 parameters to configure.

extern int STDPeriod=15;

Buffers of the Simple Trend Detector Indicator For MT4

The Simple Trend Detector Indicator For MT4 provides 3 buffers.

SetIndexBuffer(1,PosBuffer);
SetIndexBuffer(2,NegBuffer);
SetIndexBuffer(0,Buffer);

Main Parts Of The Code

int start()
  {
   if(!init_flag) {prepare_buffer();}
   int    i,ii,counted_bars=IndicatorCounted();
   double rel,negative,positive,Den;
   if(Bars lt =STDPeriod) return(0);
   if(counted_bars lt 1)
      for(i=1;i lt =STDPeriod;i++) Buffer[Bars-i]=0.5;
   i=Bars-STDPeriod-1;
   if(counted_bars gt =STDPeriod) i=Bars-counted_bars-1;
   ii=i;
   while(i gt =0) 
     {
      positive=0.0; negative=0.0;
      rel=Close[i]-Open[i];
      if(rel gt 0) positive = rel;
      else      negative =-rel;
      PosBuffer[i] = positive;
      NegBuffer[i] = negative;
      i--;
     }
   i=ii;
   while(i gt =0) 
     {
      positive=0.0; negative=0.0;
      for(int j=0;j lt STDPeriod;j++) 
        {
         double Norm=STDPeriod-j+1;
         positive+=Norm*PosBuffer[i+j];
         negative+=Norm*NegBuffer[i+j]; 
        }
      Den=positive+negative;
      if(Den==0.0) Buffer[i]=1.0;
      else Buffer[i]=positive/Den;
      i--;
     }
   return(0);
  }
//+------------------------------------------------------------------+

 

About Me

I'm Mike Semlitsch the owner of PerfectTrendSystem.com. My trading career started in 2007. Since 2013 I have helped thousands of traders to take their trading to the next level. Many of them are now constantly profitable traders. 

The following performance was achieved by me while trading live in front of hundreds of my clients:

Connect With Me:  

Results From 5 Months!
This service starts soon! Be the first who get's notified when it begins!

This FREE Indicator Can Transform
Your Trading!

FREE Indicator + Telegram Group


Request the Ultimate Double Top/Bottom Indicator which is used by 10,000+ traders.