Double Smoothed Stochastic

MQL4 Indicadores

Trabalho concluído

Tempo de execução 17 horas

Termos de Referência

I have a Double smoothed Stochastic as shown in the attached image. It has a ton of errors when i compile it and i need someone to fix it and also add the option of sound and email alerts. Heres the code below.


//------------------------------------------------------------------
#property copyright "www.forex-tsd.com"
#property link      "www.forex-tsd.com"
//------------------------------------------------------------------
#property indicator_separate_window
#property indicator_buffers 5
#property indicator_color1  DarkGray
#property indicator_color2  LimeGreen
#property indicator_color3  Green
#property indicator_color4  LightPink
#property indicator_color5  PaleVioletRed
#property indicator_width1  1
#property indicator_width2  2
#property indicator_width3  2
#property indicator_width4  2
#property indicator_width5  2
#property indicator_minimum 0
#property indicator_maximum 100

//
//
//
//
//

extern int    Stochastic.Period    = 55;
extern int    Ema.Smoothing.Period = 15;
extern double Up.Level             = 80;
extern double Down.Level           = 20;
extern string Unique.ID            = "DSS1";
extern color  Zone.Color           = C'255,238,210';

double sto[];
double stoUa[];
double stoUb[];
double stoDa[];
double stoDb[];
double inZone[];
double slope[];
string shortName;

//------------------------------------------------------------------
//
//------------------------------------------------------------------
//
//
//
//
//

int init()
{
   IndicatorBuffers(7);
   SetIndexBuffer(0,sto);
   SetIndexBuffer(1,stoUa); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,159);
   SetIndexBuffer(2,stoUb); SetIndexStyle(2,DRAW_ARROW); SetIndexArrow(2,159);
   SetIndexBuffer(3,stoDa); SetIndexStyle(3,DRAW_ARROW); SetIndexArrow(3,159);
   SetIndexBuffer(4,stoDb); SetIndexStyle(4,DRAW_ARROW); SetIndexArrow(4,159);
   SetIndexBuffer(5,inZone);
   SetIndexBuffer(6,slope);
      SetLevelValue(0,Up.Level);
      SetLevelValue(1,Down.Level);
         shortName = Unique.ID+" Double smoothed stochastic ("+Stochastic.Period+","+Ema.Smoothing.Period+")";
         IndicatorShortName(shortName);
   return(0);
}
int deinit() { ObjectDelete(Unique.ID); return(0); }


//------------------------------------------------------------------
//
//------------------------------------------------------------------
//
//
//
//
//

int start()
{
   int counted_bars=IndicatorCounted();
      if (counted_bars<0) return(0);
      if (counted_bars>0) counted_bars--;
            int limit=MathMin(Bars-counted_bars,Bars-1);
           
            static bool initialized = false;
            if (!initialized)
            {
               initialized = true;
               int window = WindowFind(shortName);
                  ObjectCreate(Unique.ID,OBJ_RECTANGLE,window,0,0,0,0);
                     ObjectSet(Unique.ID,OBJPROP_COLOR,Zone.Color);
                     ObjectSet(Unique.ID,OBJPROP_TIME1,Time[Bars-1]);
                     ObjectSet(Unique.ID,OBJPROP_PRICE1,Up.Level);
                     ObjectSet(Unique.ID,OBJPROP_PRICE2,Down.Level);
                     ObjectSet(Unique.ID,OBJPROP_BACK,true);
            }
            if (ObjectFind(Unique.ID)>-1) ObjectSet(Unique.ID,OBJPROP_TIME2,Time[0]);
 
   //
   //
   //
   //
   //
 
   for(int i=limit; i>=0; i--)
   {
      stoUa[i]  = EMPTY_VALUE;
      stoUb[i]  = EMPTY_VALUE;
      stoDa[i]  = EMPTY_VALUE;
      stoDb[i]  = EMPTY_VALUE;
      sto[i]    = iDss(Stochastic.Period,Ema.Smoothing.Period,i);
      inZone[i] = inZone[i+1];
         if (sto[i]>sto[i+1])                      slope[i]  =  1;
         if (sto[i]<sto[i+1])                      slope[i]  = -1;
         if (sto[i]>Up.Level)                      inZone[i] =  1;
         if (sto[i]<Down.Level)                    inZone[i] = -1;
         if (sto[i]<Up.Level && sto[i]>Down.Level) inZone[i] =  0;
         if (inZone[i]== 1 && slope[i]== 1) stoUa[i] = sto[i];
         if (inZone[i]== 1 && slope[i]==-1) stoUb[i] = sto[i];
         if (inZone[i]==-1 && slope[i]== 1) stoDb[i] = sto[i];
         if (inZone[i]==-1 && slope[i]==-1) stoDa[i] = sto[i];
   }
   return(0);
}


//------------------------------------------------------------------
//
//------------------------------------------------------------------
//
//
//
//
//

double workDss[][2];
double iDss(int StochasticPeriod, int EMAPeriod, int i, int instanceNo=0)
{
   if (ArrayRange(workDss,0) != Bars) ArrayResize(workDss,Bars); int r=Bars-i-1; instanceNo*=2;

   //
   //
   //
   //
   //

      double alpha = 2.0/(1.0+EMAPeriod);
      double sto   = 0;
      double max   = High[i];
      double min   = Low[i];
         for(int k=1; k<StochasticPeriod; k++)
         {
            max = MathMax(max,High[i+k]);
            min = MathMin(min,Low [i+k]);
         }           
         if (max!=min) sto = (Close[i]-min)/(max-min)*100.00;

         workDss[r][instanceNo] = workDss[r-1][instanceNo]+alpha*(sto-workDss[r-1][instanceNo]);
     
         //
         //
         //
         //
         //
     
         sto = 0;
         max = workDss[r][instanceNo];
         min = workDss[r][instanceNo];
            for(k=1; k<StochasticPeriod; k++)
            {
               max = MathMax(max,workDss[r-k][instanceNo]);
               min = MathMin(min,workDss[r-k][instanceNo]);
            }
            if (max!=min) sto = (workDss[r][instanceNo]-min)/(max-min)*100.00;

         workDss[r][instanceNo+1] = workDss[r-1][instanceNo+1]+alpha*(sto-workDss[r-1][instanceNo+1]);

         //
         //
         //
         //
         //
        
   return(workDss[r][instanceNo+1]);

}






Arquivos anexados:

GIF
DST.gif
48.9 Kb

Respondido

1
Desenvolvedor 1
Classificação
(439)
Projetos
545
25%
Arbitragem
21
38% / 38%
Expirado
83
15%
Livre
2
Desenvolvedor 2
Classificação
(512)
Projetos
773
63%
Arbitragem
33
27% / 45%
Expirado
23
3%
Livre
3
Desenvolvedor 3
Classificação
(128)
Projetos
206
49%
Arbitragem
29
28% / 48%
Expirado
33
16%
Livre
4
Desenvolvedor 4
Classificação
(195)
Projetos
395
28%
Arbitragem
155
20% / 52%
Expirado
112
28%
Livre
5
Desenvolvedor 5
Classificação
(2428)
Projetos
3057
66%
Arbitragem
77
48% / 14%
Expirado
340
11%
Trabalhando
Pedidos semelhantes
I would like to modify the RSI Epert Avisor with a developer. I would like to use the RSI Expert on the inverse mode and the base setting doesnt conatain this strategy mode
EA DEJA FABRIQUE ? MODIFIER QUELQUE LIGNE POUR LE RENDRE RENTABLE /////////////////////++++++++++++++++++++++++++++++++++ EA AVEC UN SYTEME SIMPLE ; SEULEMENT A MODIFIER %%%%%%%%%%%%%%%%%% SI PERSONNE SACHANT CODER CORRECTEMENT , CE TRAVAIL EST POUR TOI
Buy an sell symbols and guide showing entry to buy or sell setups and I need it gives and tell me to enter buy or to enter sell by automation nnnnnnnnnn fgggghhuuuiijh hhrddfhuuufffff yygggg hhgt hiidcb hygdfbby gyytdv uttrdd. Httdd hyyydv. Yhygf. Uu juhgff uyttt uuuytdbhy uuuyyy hhhff jjueeiivhgffdgu hyuu7trg yyyyffj yyytd u6tttf uuyrrrhi uytrrfh utterly jyrfgkkttv uhyybhhyy hytfgivuyt utfbh utghjio7t. Uuytg uytru
Utilizing the MQL5 MetaEditor Wizard, I created an Expert Advisor, having the following Signal indicators: I was able to optimize the EA and reached a backtest with the following specifications: I was able to reach a profit level of 30K, as indicated below. However, the Bot is not without faults and following the backtest, I started a forward test with real live data and the results were not so great. The EA took a
Connect from Mt5 via binary deriv account api I have mt5 indicator, need to connect with binary deriv account through api. If anyone can setup via API then contact me. everything control mt5
Hello I am looking for a developer to create an 50% retracement Indicator of the previous candle . So once a candle close the Indicator is supposed to take the full candle size from high to low and make a 61% and 50% level on that candle and I would like the candle to show until the next previous candle is done creating. After this I would look to create an ea with it possibly
Hi, I have 2 indicators which are based on the super trend , the alerts on indicator (1) does not work at all , and on the other indicator the alerts do not come on time on time, which is kind of delayed. see attached file below
Looking for an experienced developer to modify my existing TDI strategy , want to add filter for Buy and Sell Signals, Arrows are displayed on chart and what only to leave high accurate arrows Source code to be provided
I have the mq5 file, I need a buffer adding to the indicator, so it appears in the data window so I can reference it later in an EA. As the below screenshot shows, there is a median ray line from yesterday (the dashed horizontal line) - I want this value in the data window called Median Ray. I want this to be a single value per day, so todays Median Ray would be 17868, and so on each day. So I want all the Developing
I would like to develop my own indicator on metatrader 4 and tradingview. We would start with a basic version that we would improve later. It is an indicator based on several analyses and which would provide several indications. I am looking for someone who can develop on MT4 and Mt5, initially I would like to do it on mt4 and then on mt5. If you have expertise in pinescript it is a plus because I would like to

Informações sobre o projeto

Orçamento
10 - 11 USD
Desenvolvedor
9 - 9.9 USD
Prazo
de 1 para 2 dias