[MT4指标]DynamicRS三色指标
主图指标
mt4指标类型:趋势指标
是否能用在mt4手机版上:否
是否含有未来函数:无
//+------------------------------------------------------------------+
//| DynamicRS_C.mq4 |
//| Copyright ? 2007, Nick A. Zhilin |
//| [email protected] |
//+------------------------------------------------------------------+
// Yellow - may be change of trend
// Red - down trend
// Aqua - up trend
// Please wait bar closing after yellow indicator\'s line!
//+------------------------------------------------------------------+
#property copyright \"Copyright ? 2007, Nick A. Zhilin\"
#property link \"[email protected]\"
extern int IPeriod=5;
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 Yellow
#property indicator_color2 Aqua
#property indicator_color3 Red
//---- buffers
double ExtMapBuffer1;
double ExtMapBuffer2;
double ExtMapBuffer3;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
IndicatorShortName(\"DynamicRS_C\");
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(2,DRAW_LINE);
SetIndexBuffer(2,ExtMapBuffer3);
//----
return(0);
}
//+------------------------------------------------------------------+
//| DynamicRS |
//+------------------------------------------------------------------+
int start()
{
int i,counted_bars=IndicatorCounted();
//----
i=Bars-counted_bars-1;
while(i>=0)
{
if(HighLow[i+1] && Low>Low[i+IPeriod] && Low>ExtMapBuffer1[i+1])
{
ExtMapBuffer1=Low;
ExtMapBuffer2=Low;
}
else
{
ExtMapBuffer1=ExtMapBuffer1[i+1];
if(ExtMapBuffer1[i+1]==ExtMapBuffer2[i+1])
ExtMapBuffer2=ExtMapBuffer1[i+1];
else if(ExtMapBuffer1[i+1]==ExtMapBuffer3[i+1])
ExtMapBuffer3=ExtMapBuffer1[i+1];
}
i--;
}
//----
return(0);
}
//+------------------------------------------------------------------+
发表于:2016-09-21 15:47只看该作者
2楼
谢谢分享
韬客社区www.talkfx.co
发表于:2016-09-27 15:02只看该作者
3楼
能给图吗?????
韬客社区www.talkfx.co
发表于:2017-08-09 03:33只看该作者
4楼
谢谢朋友分享
韬客社区www.talkfx.co