[MT4指标]ATR均线系统
给TAR指标加上了均线显示
均线类型可以自己调整
附图指标
mt4指标类型:震荡指标
是否能用在mt4手机版上:否
是否含有未来函数:无
//+------------------------------------------------------------------+
//| ATR Darma.mq4 |
//+------------------------------------------------------------------+
//---- indicator settings
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Purple
#property indicator_color2 LightSeaGreen
#property indicator_level1 1
//---- indicator parameters
extern int ATR_Period = 30;
extern int SignalLine_Period = 20;
extern int SignalLineShift = 0;
extern int SignalLineMa_Method = 0; // 0 SMA , 1 EMA , 2 SMMA , 3 LWMA
extern int ShowBars = 500;
//---- indicator buffers
double ATR_Buffer;
double MA_ATR_Buffer;
int draw_begin0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicator buffers mapping
//---- drawing settings
draw_begin0 = ATR_Period;
SetIndexEmptyValue(1,0.0000);
SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,1);
SetIndexBuffer(1,ATR_Buffer);
SetIndexLabel(1,"ATR");
SetIndexDrawBegin(1,draw_begin0);
SetIndexEmptyValue(0,0.0000);
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1);
SetIndexBuffer(0,MA_ATR_Buffer);
SetIndexLabel(0," ("+SignalLine_Period+") Period MA of ATR");
SetIndexDrawBegin(0,draw_begin0);
//---- name for DataWindow and indicator subwindow label
IndicatorShortName("ATR Darma");
//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start() {
int limit,i,shift;
int counted_bars=IndicatorCounted();
//---- check for possible errors
if(counted_bars<1)
for(i=1;i<=draw_begin0;i++)
MA_ATR_Buffer[Bars-i]=0; ATR_Buffer[Bars-i]=0;
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
//limit=Bars-counted_bars;
limit = ShowBars;
if (ShowBars >= Bars) limit = Bars - 1;
//-----------------------------------------------------------------------------------------------------------------
//---- ATR_Buffer
for(i=0; iATR%20Darma1.jpg
发表于:2015-06-17 10:06只看该作者
2楼
谢谢楼主,辛苦了
发表于:2015-06-17 14:38只看该作者
3楼
谢谢楼主,辛苦了
韬客社区www.talkfx.co
发表于:2015-06-19 14:35只看该作者
4楼
这个怎么玩啊
韬客社区www.talkfx.co
发表于:2015-06-20 00:22只看该作者
5楼
又是这个指标 我怎么看都看不明白 还需加强学习啊
韬客社区www.talkfx.co
发表于:2016-04-20 15:03只看该作者
6楼
学习学习
韬客社区www.talkfx.co
发表于:2017-08-09 03:48只看该作者
7楼
谢谢朋友分享
韬客社区www.talkfx.co