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

MQL4 Experts Other

Job finished

Execution time 20 hours
Feedback from customer
Быстро и качественно.
Feedback from employee
Отличный заказчик!

Specification

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

}

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



Responded

1
Developer 1
Rating
(106)
Projects
189
46%
Arbitration
34
24% / 41%
Overdue
58
31%
Free
2
Developer 2
Rating
(241)
Projects
387
51%
Arbitration
14
14% / 14%
Overdue
43
11%
Free
3
Developer 3
Rating
(558)
Projects
1344
59%
Arbitration
28
82% / 0%
Overdue
10
1%
Working
4
Developer 4
Rating
(280)
Projects
650
28%
Arbitration
111
19% / 61%
Overdue
319
49%
Free
5
Developer 5
Rating
(1102)
Projects
1459
45%
Arbitration
49
73% / 12%
Overdue
36
2%
Free
6
Developer 6
Rating
(351)
Projects
679
56%
Arbitration
33
15% / 39%
Overdue
63
9%
Free
7
Developer 7
Rating
(254)
Projects
573
36%
Arbitration
64
20% / 58%
Overdue
147
26%
Free
8
Developer 8
Rating
(10)
Projects
17
24%
Arbitration
7
14% / 86%
Overdue
2
12%
Free
9
Developer 9
Rating
(565)
Projects
779
46%
Arbitration
23
39% / 13%
Overdue
63
8%
Loaded
10
Developer 10
Rating
(30)
Projects
45
16%
Arbitration
2
0% / 100%
Overdue
4
9%
Free
11
Developer 11
Rating
(4)
Projects
12
0%
Arbitration
0
Overdue
3
25%
Free
12
Developer 12
Rating
(229)
Projects
339
49%
Arbitration
21
5% / 33%
Overdue
24
7%
Free
13
Developer 13
Rating
(14)
Projects
22
59%
Arbitration
2
0% / 50%
Overdue
2
9%
Free
14
Developer 14
Rating
(356)
Projects
632
26%
Arbitration
89
73% / 13%
Overdue
12
2%
Free
15
Developer 15
Rating
(142)
Projects
280
42%
Arbitration
18
61% / 6%
Overdue
29
10%
Free
16
Developer 16
Rating
(586)
Projects
1048
49%
Arbitration
39
28% / 41%
Overdue
49
5%
Working
17
Developer 17
Rating
(66)
Projects
143
34%
Arbitration
10
10% / 60%
Overdue
26
18%
Free
18
Developer 18
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
19
Developer 19
Rating
(1100)
Projects
1782
61%
Arbitration
14
64% / 7%
Overdue
84
5%
Free
20
Developer 20
Rating
(45)
Projects
59
42%
Arbitration
5
0% / 60%
Overdue
12
20%
Free

Project information

Budget
30 - 40 USD
For the developer
27 - 36 USD
Deadline
from 3 to 7 day(s)