Double Smoothed Stochastic

MQL4 Indicatori

Lavoro terminato

Tempo di esecuzione 17 ore

Specifiche

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]);

}






File:

GIF
DST.gif
48.9 Kb

Con risposta

1
Sviluppatore 1
Valutazioni
(440)
Progetti
546
25%
Arbitraggio
21
38% / 38%
In ritardo
83
15%
In elaborazione
2
Sviluppatore 2
Valutazioni
(514)
Progetti
776
63%
Arbitraggio
33
27% / 45%
In ritardo
23
3%
Gratuito
3
Sviluppatore 3
Valutazioni
(128)
Progetti
206
49%
Arbitraggio
29
28% / 48%
In ritardo
33
16%
Gratuito
4
Sviluppatore 4
Valutazioni
(195)
Progetti
395
28%
Arbitraggio
155
20% / 52%
In ritardo
112
28%
Gratuito
5
Sviluppatore 5
Valutazioni
(2441)
Progetti
3076
66%
Arbitraggio
77
48% / 14%
In ritardo
340
11%
Gratuito
Ordini simili
I need an EA edited to make TWO main changes to conditions for how it enters trades. The EA code is written with clean code and is well commented. Will provide more info on changes in a doc in the chat
BUY AND SELL 30+ USD
Create an Expert Advisor that collaborates between these indicators ETR, MEv2 and STLv3 with these features 1. SL and TP 2. TIME FILTER 3. ETR, MEv2 and STLv3 PARAMETERS BUY ENTRY STEP 1. FIRST candle OPEN above Symphonie Trend Line STEP 2. Check Symphonie Extreme must indicate color BLUE STEP 3. Check Symphonie Emotion must indicate color BLUE STEP 4. Open trade with money management STEP 5. Trade open MUST BE 1
Hello, I have a protected Ninja trader Order Flow indicator and I was wondering if you can reverse engineer it to replicate the functionality. H ere are the specifications and indicator: https://docs.google.com/document/d/1KyYwQ7iTL2KWGhnZzxS1gObccu9LPMrGuMc9Mdk_3KY/edit?usp=sharing
I have an EA that need some changes including integrating the indicator code directly into the Expert Advisor. I will give the detailed doc once we settle on the candidate for the job . Please bid if you can work with the stated amount. Thanks
Hello, Need to convert Tradingview Indicator to MQL4 indicator. or if you have this one converted already, let me buy a copy please. If we're good, then will definitely buy it and ask to convert into EA on new order. Supertrend by KivancOzbilgic
Fix bug or modify an existing Trading view indicator to display correct. The indicator is working but not displaying/plotting all the information i want. So i want it adjusted to plot all the info
Here's a brief requirement you can use: **Description:** I am seeking an experienced MQL5 developer to create a (EA). The EA should include features for placing pending orders (Buy Stop and Sell Stop) based on market spread, managing trades effectively at the opening of new candlesticks, and implementing take profit and stop loss strategies. Additionally, I would like the option to adjust parameters based on market
I have an EA which i need to do below modifications. Variable Inputs to be added Order Type : Market , Pending Trade Type : Buy, Sell , Buy & Sell Pending Pips Step : ( Pips Value can be negative or positive to decide on what type of Pending Order ) // If trade type Buy is selected Close Type : Close All ( Bulk Close Option in MT5 ) , Close Individually Close Option : %of Equity , %of Balance , Amount $ , %of No
Add multiplier to grid recovery system. For example: Grid Trade 2-3 Spacing; 1.0 Multiplier Grid Trade 4-6 Spacing; 2.0 Multiplier Grid Trade 7+ Spacing; 1.6 Multiplier Need quick turn around. Need it done ASAP
Objects reader PIN 70 - 100 USD
Hi I have an indicator that create objects in the chart and using those following some rules the new indicator will create external global variables with value = 0 ( NONE ), = 1 ( BUY ) or = 2 ( SELL ). The global variable will use PIN external integer number . PINS are by now global variables (GV) whose name indicates the pair name and the PIN belonging and their value indicates it direction/action. PINS GV names

Informazioni sul progetto

Budget
10 - 11 USD
Per lo sviluppatore
9 - 9.9 USD
Scadenze
da 1 a 2 giorno(i)