Нужен советник на основе индикатора

MQL4 Asesores Expertos Lo demás

Trabajo finalizado

Plazo de ejecución 20 horas
Comentario del Cliente
Быстро и качественно.
Comentario del Ejecutor
Отличный заказчик!

Tarea técnica

property indicator_chart_window

#property indicator_buffers 3

#property indicator_color1 Yellow

#property indicator_color2 Green

#property indicator_color3 Red

#property indicator_width1 2

#property indicator_width2 2

#property indicator_width3 2


//---- input parameters

extern int period=16;

extern int method=3; // MODE_SMA

extern int price=0; // PRICE_CLOSE

extern int sdvig=0;


extern bool bPlaySound=true; // Включение звука при смене цвета

extern bool bAllert=true; // Включение звука при смене цвета

extern string SoundName="alert.wav"; // Звуковой файл

extern int CheckBar=1;

//---- buffers


double Uptrend[];

double Dntrend[];

double ExtMapBuffer[];


double vect[];


static bool bs=false,ba=false;

static int bTime=0;

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

IndicatorBuffers(4);

SetIndexBuffer(0,ExtMapBuffer);

SetIndexBuffer(1,Uptrend);

SetIndexBuffer(2,Dntrend);

SetIndexBuffer(3,vect);


SetIndexStyle(0,DRAW_LINE);

SetIndexStyle(1,DRAW_LINE);

SetIndexStyle(2,DRAW_LINE);


SetIndexDrawBegin(0,1*period);

SetIndexDrawBegin(1,2*period);

SetIndexDrawBegin(2,3*period);


IndicatorShortName("Signal Line("+period+")");

SetIndexLabel(1,"UP");

SetIndexLabel(2,"DN");


bs=false;

ba=false;

bTime=0;


return(0);

}


//+------------------------------------------------------------------+

//| Custor indicator deinitialization function |

//+------------------------------------------------------------------+

int deinit() { return(0); }


//+------------------------------------------------------------------+

//| ?????????? ??????? |

//+------------------------------------------------------------------+

double WMA(int x,int p) { return(iMA(NULL,0,p,0,method,price,x+sdvig)); }

//+------------------------------------------------------------------+

//| Custom indicator iteration function |

//+------------------------------------------------------------------+

int start()

{

int p=MathSqrt(period);


int i,limit0,limit1,limit2;

int counted_bars = IndicatorCounted();

if(counted_bars < 0) return(-1);

if(counted_bars > 0) counted_bars--;

limit2 = Bars - counted_bars;

if(counted_bars==0) limit2--;

limit1=limit2;

limit0=limit1;


if(counted_bars==0)

{

limit1-=(period);

limit2-=(2*period);

}


for(i = limit0; i >= 0; i--) vect[i] = 2*WMA(i, period/2) - WMA(i, period);

for(i = limit1; i >= 0; i--) ExtMapBuffer[i] = iMAOnArray(vect, 0, p, 0, method, i);

for(i=limit2; i>=0; i--)

{

Uptrend[i] = EMPTY_VALUE; if(ExtMapBuffer[i]> ExtMapBuffer[i+1]) {Uptrend[i+1] = ExtMapBuffer[i+1]; Uptrend[i] = ExtMapBuffer[i]; }

Dntrend[i] = EMPTY_VALUE; if(ExtMapBuffer[i]< ExtMapBuffer[i+1]) {Dntrend[i+1] = ExtMapBuffer[i+1]; Dntrend[i] = ExtMapBuffer[i]; }

}

if(bTime!=Time[0])

{

bTime=Time[0];

bs=false;

ba=false;

}

if((ExtMapBuffer[CheckBar+2]-ExtMapBuffer[CheckBar+1])*(ExtMapBuffer[CheckBar+1]-ExtMapBuffer[CheckBar])<0)

{

if(bPlaySound && !bs) PlaySound(SoundName);

bs=true;

if(bAllert && !ba)

{

string mes="";

if(ExtMapBuffer[CheckBar]-ExtMapBuffer[CheckBar+1]>0) mes="Смена тренда, восходящий";

if(ExtMapBuffer[CheckBar]-ExtMapBuffer[CheckBar+1]<0) mes="Смена тренда, нисходящий";

if(mes!="") Alert(mes+": "+Symbol()+"; "+Period_toStr()+"; "+DoubleToStr(Bid,Digits));

}

ba=true;

}

return(0);

}

//+------------------------------------------------------------------+



Han respondido

1
Desarrollador 1
Evaluación
(106)
Proyectos
189
46%
Arbitraje
34
24% / 41%
Caducado
58
31%
Libre
Ha publicado: 12 ejemplos
2
Desarrollador 2
Evaluación
(241)
Proyectos
387
51%
Arbitraje
14
14% / 14%
Caducado
43
11%
Libre
Ha publicado: 1 artículo, 1 ejemplo
3
Desarrollador 3
Evaluación
(618)
Proyectos
1428
59%
Arbitraje
31
81% / 0%
Caducado
10
1%
Libre
4
Desarrollador 4
Evaluación
(281)
Proyectos
650
28%
Arbitraje
112
19% / 62%
Caducado
319
49%
Libre
5
Desarrollador 5
Evaluación
(1303)
Proyectos
1731
49%
Arbitraje
53
70% / 13%
Caducado
38
2%
Libre
6
Desarrollador 6
Evaluación
(351)
Proyectos
679
56%
Arbitraje
33
15% / 39%
Caducado
63
9%
Libre
7
Desarrollador 7
Evaluación
(268)
Proyectos
600
35%
Arbitraje
64
20% / 58%
Caducado
147
25%
Trabaja
Ha publicado: 1 artículo, 22 ejemplos
8
Desarrollador 8
Evaluación
(10)
Proyectos
17
24%
Arbitraje
7
14% / 86%
Caducado
1
6%
Libre
9
Desarrollador 9
Evaluación
(640)
Proyectos
864
48%
Arbitraje
29
38% / 17%
Caducado
63
7%
Trabaja
10
Desarrollador 10
Evaluación
(30)
Proyectos
45
16%
Arbitraje
2
0% / 100%
Caducado
4
9%
Libre
11
Desarrollador 11
Evaluación
(4)
Proyectos
12
0%
Arbitraje
0
Caducado
3
25%
Libre
12
Desarrollador 12
Evaluación
(229)
Proyectos
339
49%
Arbitraje
21
5% / 33%
Caducado
24
7%
Libre
13
Desarrollador 13
Evaluación
(14)
Proyectos
22
59%
Arbitraje
2
0% / 50%
Caducado
2
9%
Libre
Ha publicado: 1 ejemplo
14
Desarrollador 14
Evaluación
(361)
Proyectos
644
26%
Arbitraje
92
72% / 14%
Caducado
12
2%
Trabaja
Ha publicado: 1 ejemplo
15
Desarrollador 15
Evaluación
(144)
Proyectos
285
42%
Arbitraje
19
63% / 5%
Caducado
29
10%
Libre
Ha publicado: 2 ejemplos
16
Desarrollador 16
Evaluación
(589)
Proyectos
1068
50%
Arbitraje
39
28% / 41%
Caducado
49
5%
Trabaja
Ha publicado: 1 artículo, 8 ejemplos
17
Desarrollador 17
Evaluación
(69)
Proyectos
146
34%
Arbitraje
13
8% / 62%
Caducado
26
18%
Libre
Ha publicado: 6 ejemplos
18
Desarrollador 18
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
19
Desarrollador 19
Evaluación
(1125)
Proyectos
1813
61%
Arbitraje
14
64% / 7%
Caducado
84
5%
Libre
20
Desarrollador 20
Evaluación
(45)
Proyectos
59
42%
Arbitraje
5
0% / 60%
Caducado
12
20%
Libre

Información sobre el proyecto

Presupuesto
30 - 40 USD
Plazo límite de ejecución
de 3 a 7 día(s)