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

MQL4 Experts Outros

Trabalho concluído

Tempo de execução 20 horas
Comentário do cliente
Быстро и качественно.
Comentário do desenvolvedor
Отличный заказчик!

Termos de Referência

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

}

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



Respondido

1
Desenvolvedor 1
Classificação
(106)
Projetos
189
46%
Arbitragem
34
24% / 41%
Expirado
58
31%
Livre
Publicou: 12 códigos
2
Desenvolvedor 2
Classificação
(241)
Projetos
387
51%
Arbitragem
14
14% / 14%
Expirado
43
11%
Livre
Publicou: 1 artigo, 1 código
3
Desenvolvedor 3
Classificação
(618)
Projetos
1428
59%
Arbitragem
31
81% / 0%
Expirado
10
1%
Livre
4
Desenvolvedor 4
Classificação
(281)
Projetos
650
28%
Arbitragem
112
19% / 62%
Expirado
319
49%
Livre
5
Desenvolvedor 5
Classificação
(1303)
Projetos
1731
49%
Arbitragem
53
70% / 13%
Expirado
38
2%
Livre
6
Desenvolvedor 6
Classificação
(351)
Projetos
679
56%
Arbitragem
33
15% / 39%
Expirado
63
9%
Livre
7
Desenvolvedor 7
Classificação
(268)
Projetos
600
35%
Arbitragem
64
20% / 58%
Expirado
147
25%
Trabalhando
Publicou: 1 artigo, 22 códigos
8
Desenvolvedor 8
Classificação
(10)
Projetos
17
24%
Arbitragem
7
14% / 86%
Expirado
1
6%
Livre
9
Desenvolvedor 9
Classificação
(640)
Projetos
864
48%
Arbitragem
29
38% / 17%
Expirado
63
7%
Trabalhando
10
Desenvolvedor 10
Classificação
(30)
Projetos
45
16%
Arbitragem
2
0% / 100%
Expirado
4
9%
Livre
11
Desenvolvedor 11
Classificação
(4)
Projetos
12
0%
Arbitragem
0
Expirado
3
25%
Livre
12
Desenvolvedor 12
Classificação
(229)
Projetos
339
49%
Arbitragem
21
5% / 33%
Expirado
24
7%
Livre
13
Desenvolvedor 13
Classificação
(14)
Projetos
22
59%
Arbitragem
2
0% / 50%
Expirado
2
9%
Livre
Publicou: 1 código
14
Desenvolvedor 14
Classificação
(361)
Projetos
644
26%
Arbitragem
92
72% / 14%
Expirado
12
2%
Trabalhando
Publicou: 1 código
15
Desenvolvedor 15
Classificação
(144)
Projetos
285
42%
Arbitragem
19
63% / 5%
Expirado
29
10%
Livre
Publicou: 2 códigos
16
Desenvolvedor 16
Classificação
(589)
Projetos
1068
50%
Arbitragem
39
28% / 41%
Expirado
49
5%
Trabalhando
Publicou: 1 artigo, 8 códigos
17
Desenvolvedor 17
Classificação
(69)
Projetos
146
34%
Arbitragem
13
8% / 62%
Expirado
26
18%
Livre
Publicou: 6 códigos
18
Desenvolvedor 18
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
19
Desenvolvedor 19
Classificação
(1125)
Projetos
1813
61%
Arbitragem
14
64% / 7%
Expirado
84
5%
Livre
20
Desenvolvedor 20
Classificação
(45)
Projetos
59
42%
Arbitragem
5
0% / 60%
Expirado
12
20%
Livre

Informações sobre o projeto

Orçamento
30 - 40 USD
Prazo
de 3 para 7 dias