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

MQL4 Experts Autre

Tâche terminée

Temps d'exécution 20 heures
Commentaires du client
Быстро и качественно.
Commentaires de l'employé
Отличный заказчик!

Spécifications

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

}

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



Répondu

1
Développeur 1
Évaluation
(106)
Projets
189
46%
Arbitrage
34
24% / 41%
En retard
58
31%
Gratuit
Publié : 12 codes
2
Développeur 2
Évaluation
(241)
Projets
387
51%
Arbitrage
14
14% / 14%
En retard
43
11%
Gratuit
Publié : 1 article, 1 code
3
Développeur 3
Évaluation
(618)
Projets
1428
59%
Arbitrage
31
81% / 0%
En retard
10
1%
Gratuit
4
Développeur 4
Évaluation
(281)
Projets
650
28%
Arbitrage
112
19% / 62%
En retard
319
49%
Gratuit
5
Développeur 5
Évaluation
(1303)
Projets
1731
49%
Arbitrage
53
70% / 13%
En retard
38
2%
Gratuit
6
Développeur 6
Évaluation
(351)
Projets
679
56%
Arbitrage
33
15% / 39%
En retard
63
9%
Gratuit
7
Développeur 7
Évaluation
(268)
Projets
600
35%
Arbitrage
64
20% / 58%
En retard
147
25%
Travail
Publié : 1 article, 22 codes
8
Développeur 8
Évaluation
(10)
Projets
17
24%
Arbitrage
7
14% / 86%
En retard
1
6%
Gratuit
9
Développeur 9
Évaluation
(640)
Projets
864
48%
Arbitrage
29
38% / 17%
En retard
63
7%
Travail
10
Développeur 10
Évaluation
(30)
Projets
45
16%
Arbitrage
2
0% / 100%
En retard
4
9%
Gratuit
11
Développeur 11
Évaluation
(4)
Projets
12
0%
Arbitrage
0
En retard
3
25%
Gratuit
12
Développeur 12
Évaluation
(229)
Projets
339
49%
Arbitrage
21
5% / 33%
En retard
24
7%
Gratuit
13
Développeur 13
Évaluation
(14)
Projets
22
59%
Arbitrage
2
0% / 50%
En retard
2
9%
Gratuit
Publié : 1 code
14
Développeur 14
Évaluation
(361)
Projets
644
26%
Arbitrage
92
72% / 14%
En retard
12
2%
Travail
Publié : 1 code
15
Développeur 15
Évaluation
(144)
Projets
285
42%
Arbitrage
19
63% / 5%
En retard
29
10%
Gratuit
Publié : 2 codes
16
Développeur 16
Évaluation
(589)
Projets
1068
50%
Arbitrage
39
28% / 41%
En retard
49
5%
Travail
Publié : 1 article, 8 codes
17
Développeur 17
Évaluation
(69)
Projets
146
34%
Arbitrage
13
8% / 62%
En retard
26
18%
Gratuit
Publié : 6 codes
18
Développeur 18
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
19
Développeur 19
Évaluation
(1125)
Projets
1813
61%
Arbitrage
14
64% / 7%
En retard
84
5%
Gratuit
20
Développeur 20
Évaluation
(45)
Projets
59
42%
Arbitrage
5
0% / 60%
En retard
12
20%
Gratuit

Informations sur le projet

Budget
30 - 40 USD
Délais
de 3 à 7 jour(s)