指标: 平滑指标 RSI .

 

平滑指标 RSI .:

平滑指标 RSI ,超过50水平时声音信号提醒。

Author: IURII TOKMAN

 

非常好的一款指标!平滑.变色.报警.非常好!!!!!!!!

同时也非常感谢您的发布!

您的辛勤劳动会使很多人受益!谢谢!!

不过指标中的报警非常频繁,有时让人不知所措;故,在此请教您:如何去掉指标中的报警?

因为,我认为平滑和变色已经很高端了.当然在使用上也是因人而异.

 

回答解疑:如有冒犯作者请谅解!不过指标中的报警非常频繁,有时让人不知所措;故,在此请教您:如何去掉指标中的报警?

我对以上问题给你回答!请打开 找到指标源码 extern bool Sound = false; // false不报警 true报警

//+------------------------------------------------------------------+
//| OSMA.mq4 |
//| 10 眍狃 2008? Yuriy Tokman |
//| ICQ#:481-971-287 yuriytokman@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Yuriy Tokman"
#property link "yuriytokman@gmail.com"

#property indicator_separate_window

#property indicator_buffers 3

#property indicator_color1 Lime
#property indicator_color2 Red
#property indicator_level1 50
#property indicator_levelcolor DarkBlue


extern int period_RSI = 14;
extern int applied_price_RSI = 0;
extern int period_MA = 5;
extern int ma_method = 3;
extern bool Sound = false; // false不报警 true报警

double Buf0[];
double Buf1[];
double Buf2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexBuffer(0,Buf0);
SetIndexBuffer(1,Buf1);
SetIndexBuffer(2,Buf2);

SetIndexStyle(0,DRAW_LINE,0,2);
SetIndexStyle(1,DRAW_LINE,0,2);
SetIndexStyle(2,DRAW_NONE);

//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int i=0; i<limit; i++)
{
Buf2[i]=iRSI(NULL,0,period_RSI,applied_price_RSI,i);
}

for(i=0; i<limit; i++)
{
double r = iMAOnArray(Buf2,0,period_MA,0,ma_method,i) ;
double r1 = iMAOnArray(Buf2,0,period_MA,0,ma_method,i+1) ;
if (r<53) Buf1[i]=r ;
if (r>47) Buf0[i]=r ;
if (Sound == true)
{
if(r>=50 && r1<=50) {Alert("Crossing in a bottom\n\" Indicators to order e-mail: yuriytokman@gmail.com \"\nRSI= ", r);}
if(r<=50 && r1>=50) {Alert("Crossing in top\n\" Indicators to order ISQ#:481-971-287 \"\nRSI= ", r);}
}

}
return(0);
}
//+------------------------------------------------------------------+

 
xietingjin:

回答解疑:如有冒犯作者请谅解!不过指标中的报警非常频繁,有时让人不知所措;故,在此请教您:如何去掉指标中的报警?

我对以上问题给你回答!请打开 找到指标源码 extern bool Sound = false; // false不报警 true报警

//+------------------------------------------------------------------+
//| OSMA.mq4 |
//| 10 眍狃 2008? Yuriy Tokman |
//| ICQ#:481-971-287 yuriytokman@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Yuriy Tokman"
#property link "yuriytokman@gmail.com"

#property indicator_separate_window

#property indicator_buffers 3

#property indicator_color1 Lime
#property indicator_color2 Red
#property indicator_level1 50
#property indicator_levelcolor DarkBlue


extern int period_RSI = 14;
extern int applied_price_RSI = 0;
extern int period_MA = 5;
extern int ma_method = 3;
extern bool Sound = false; // false不报警 true报警

double Buf0[];
double Buf1[];
double Buf2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexBuffer(0,Buf0);
SetIndexBuffer(1,Buf1);
SetIndexBuffer(2,Buf2);

SetIndexStyle(0,DRAW_LINE,0,2);
SetIndexStyle(1,DRAW_LINE,0,2);
SetIndexStyle(2,DRAW_NONE);

//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int i=0; i<limit; i++)
{
Buf2[i]=iRSI(NULL,0,period_RSI,applied_price_RSI,i);
}

for(i=0; i<limit; i++)
{
double r = iMAOnArray(Buf2,0,period_MA,0,ma_method,i) ;
double r1 = iMAOnArray(Buf2,0,period_MA,0,ma_method,i+1) ;
if (r<53) Buf1[i]=r ;
if (r>47) Buf0[i]=r ;
if (Sound == true)
{
if(r>=50 && r1<=50) {Alert("Crossing in a bottom\n\" Indicators to order e-mail: yuriytokman@gmail.com \"\nRSI= ", r);}
if(r<=50 && r1>=50) {Alert("Crossing in top\n\" Indicators to order ISQ#:481-971-287 \"\nRSI= ", r);}
}

}
return(0);
}
//+------------------------------------------------------------------+

非常感谢!

 

林焕才201146日阅,谢谢提供

 

下载来学习一下

原因: