[MT4指标]RSIFilter第一版趋势指标
附图指标,RSIFilter第一版趋势指标
mt4指标类型:趋势指标
是否能用在mt4手机版上:否
是否含有未来函数:无
这个mt4的指标是属于一个rsi的变种 然后根据相应的参数显示出多空的状态
具体可以调整参数来适应自己的分析策略
///+------------------------------------------------------------------
//| RSIFilter_v1.mq4
//| Copyright ? 2006, Forex-TSD.com
//| Written by IgorAD,[email protected]
//| http://finance.groups.yahoo.com/group/TrendLaboratory
//+------------------------------------------------------------------
#property copyright "Copyright ? 2006, Forex-TSD.com "
#property link "http://www.forex-tsd.com/"
#property indicator_separate_window
#property indicator_minimum -2
#property indicator_maximum 2
#property indicator_buffers 2
#property indicator_color1 DeepSkyBlue
#property indicator_color2 Red
//---- input parameters
extern int PeriodRSI=14;
//---- indicator buffers
double UpBuffer;
double DnBuffer;
//+------------------------------------------------------------------
//| Custom indicator initialization function
//+------------------------------------------------------------------
int init()
{
string short_name;
//---- indicator line
SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,1);
SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,1);
SetIndexBuffer(0,UpBuffer);
SetIndexBuffer(1,DnBuffer);
IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS));
//---- name for DataWindow and indicator subwindow label
short_name="RSI Filter("+PeriodRSI+") (Down trade only when down bars are orange)";
IndicatorShortName(short_name);
SetIndexLabel(0,"UpTrend");
SetIndexLabel(1,"DownTrend");
//----
SetIndexDrawBegin(0,PeriodRSI);
SetIndexDrawBegin(1,PeriodRSI);
//----
return(0);
}
//+------------------------------------------------------------------
//| RSIFilter_v1
//+------------------------------------------------------------------
int start()
{
int shift,trend;
double RSI0;
for(shift=Bars-PeriodRSI-1;shift>=0;shift--)
{
RSI0=iRSI(NULL,0,PeriodRSI,PRICE_CLOSE,shift);
if (RSI0>70) trend=1;
if (RSI0<30) trend=-1;
if (trend>0)
{
if (RSI0 > 40) UpBuffer[shift]=1.0;
else UpBuffer[shift] = EMPTY_VALUE;
DnBuffer[shift]=0;
}
if (trend<0)
{
if (RSI0 < 60) DnBuffer[shift]=-1.0;
else DnBuffer[shift] = EMPTY_VALUE;
UpBuffer[shift]=0;
}
}
return(0);
}
//+------------------------------------------------------------------+Flat%20Trend%20RSI.jpg
发表于:2016-12-15 11:46只看该作者
2楼
缺钱,灌水赚通宝,谢谢分享!!
韬客社区www.talkfx.co
发表于:2017-04-05 17:59只看该作者
3楼
缺钱,灌水赚通宝,谢谢分享!!
韬客社区www.talkfx.co
发表于:2017-06-16 05:22只看该作者
5楼
66666666666
韬客社区www.talkfx.co
发表于:2017-08-07 05:05只看该作者
6楼
谢谢分享~~~~~~~~~~~
韬客社区www.talkfx.co