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

MQL4 エキスパート その他

仕事が完了した

実行時間20 時間
依頼者からのフィードバック
Быстро и качественно.
開発者からのフィードバック
Отличный заказчик!

指定

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

}

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



応答済み

1
開発者 1
評価
(106)
プロジェクト
189
46%
仲裁
34
24% / 41%
期限切れ
58
31%
パブリッシュした人: 12 codes
2
開発者 2
評価
(241)
プロジェクト
387
51%
仲裁
14
14% / 14%
期限切れ
43
11%
パブリッシュした人: 1 article, 1 code
3
開発者 3
評価
(618)
プロジェクト
1428
59%
仲裁
31
81% / 0%
期限切れ
10
1%
4
開発者 4
評価
(281)
プロジェクト
650
28%
仲裁
112
19% / 62%
期限切れ
319
49%
5
開発者 5
評価
(1303)
プロジェクト
1731
49%
仲裁
53
70% / 13%
期限切れ
38
2%
6
開発者 6
評価
(351)
プロジェクト
679
56%
仲裁
33
15% / 39%
期限切れ
63
9%
7
開発者 7
評価
(268)
プロジェクト
600
35%
仲裁
64
20% / 58%
期限切れ
147
25%
仕事中
パブリッシュした人: 1 article, 22 codes
8
開発者 8
評価
(10)
プロジェクト
17
24%
仲裁
7
14% / 86%
期限切れ
1
6%
9
開発者 9
評価
(640)
プロジェクト
864
48%
仲裁
29
38% / 17%
期限切れ
63
7%
仕事中
10
開発者 10
評価
(30)
プロジェクト
45
16%
仲裁
2
0% / 100%
期限切れ
4
9%
11
開発者 11
評価
(4)
プロジェクト
12
0%
仲裁
0
期限切れ
3
25%
12
開発者 12
評価
(229)
プロジェクト
339
49%
仲裁
21
5% / 33%
期限切れ
24
7%
13
開発者 13
評価
(14)
プロジェクト
22
59%
仲裁
2
0% / 50%
期限切れ
2
9%
パブリッシュした人: 1 code
14
開発者 14
評価
(361)
プロジェクト
644
26%
仲裁
92
72% / 14%
期限切れ
12
2%
仕事中
パブリッシュした人: 1 code
15
開発者 15
評価
(144)
プロジェクト
285
42%
仲裁
19
63% / 5%
期限切れ
29
10%
パブリッシュした人: 2 codes
16
開発者 16
評価
(589)
プロジェクト
1068
50%
仲裁
39
28% / 41%
期限切れ
49
5%
仕事中
パブリッシュした人: 1 article, 8 codes
17
開発者 17
評価
(69)
プロジェクト
146
34%
仲裁
13
8% / 62%
期限切れ
26
18%
パブリッシュした人: 6 codes
18
開発者 18
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
19
開発者 19
評価
(1125)
プロジェクト
1813
61%
仲裁
14
64% / 7%
期限切れ
84
5%
20
開発者 20
評価
(45)
プロジェクト
59
42%
仲裁
5
0% / 60%
期限切れ
12
20%

プロジェクト情報

予算
30 - 40 USD
締め切り
最低 3 最高 7 日