顺水外汇EA交易网MT4
标题:
求助:一个RSI的报警指标,求修改
[打印本页]
作者:
人生需要拼
时间:
2018-1-11 11:51
标题:
求助:一个RSI的报警指标,求修改
下面是一个RSI的报警指标,想把它改成Stochastic的报警指标,求大神指点
#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 White
#property indicator_color2 Red
#property indicator_color3 Blue
extern int RSIPeriod = 14;
extern int UpLevel = 80;
extern int DownLevel = 20;
extern bool AlertFlag = TRUE;
double G_ibuf_92[];
double G_ibuf_96[];
double G_ibuf_100[];
bool Gi_104 = FALSE;
bool Gi_108 = FALSE;
int init() {
IndicatorBuffers(3);
SetIndexStyle(0, DRAW_LINE);
SetIndexBuffer(0, G_ibuf_92);
SetIndexStyle(1, DRAW_ARROW);
SetIndexArrow(1, 233);
SetIndexBuffer(1, G_ibuf_96);
SetIndexStyle(2, DRAW_ARROW);
SetIndexArrow(2, 234);
SetIndexBuffer(2, G_ibuf_100);
return (0);
}
int start() {
int Li_0 = IndicatorCounted();
if (Li_0 0) Li_0--;
int Li_4 = Bars - Li_0;
for (int Li_8 = Li_4; Li_8 >= 0; Li_8--) {
G_ibuf_92[Li_8] = iRSI(NULL, 0, RSIPeriod, PRICE_CLOSE, Li_8);
if (G_ibuf_92[Li_8 + 1] UpLevel) {
G_ibuf_96[Li_8] = G_ibuf_92[Li_8];
if (AlertFlag) {
if (Li_8 == 0 && Gi_104 == FALSE) {
Alert(Symbol() + " " + Period() + " RSI发生上穿" + UpLevel + "!");
Gi_104 = TRUE;
Gi_108 = FALSE;
}
}
} else {
if (G_ibuf_92[Li_8 + 1] > DownLevel && G_ibuf_92[Li_8] < DownLevel) {
G_ibuf_100[Li_8] = G_ibuf_92[Li_8];
if (AlertFlag) {
if (Li_8 == 0 && Gi_108 == FALSE) {
Alert(Symbol() + " " + Period() + " RSI发生下穿" + DownLevel + "!");
Gi_108 = TRUE;
Gi_104 = FALSE;
}
}
}
}
}
return (0);
}
作者:
zhu3662860
时间:
2018-1-11 12:34
看不懂··········································
作者:
senli1206
时间:
2018-1-11 13:48
帮顶!!!!!!!!!!
作者:
la9046111
时间:
2018-1-11 15:21
帮顶》》》》》》》》》
作者:
yuhen368
时间:
2018-1-11 16:55
帮忙顶 @@@@@@@@
作者:
maikuraki1028
时间:
2018-1-11 18:15
谢谢分享!
作者:
我是打飞
时间:
2018-1-11 19:52
完全看不懂代码
作者:
飘梦
时间:
2018-1-11 19:59
!!!!!
作者:
15806593088
时间:
2018-1-11 20:35
谢谢楼主分享!!!
欢迎光临 顺水外汇EA交易网MT4 (http://waterforex.com/)
Powered by Discuz! X3.2