[MT4指标]Aroon Horn指标
Aroon Horn附图指标 ,从图上看是震荡类型的
最高100左右 最低在0左右 双线交叉或者突破设定的数值后 做单
mt4指标类型:震荡指标
是否能用在mt4手机版上:否
是否含有未来函数:否
//+------------------------------------------------------------------+
//| Aroon Horn.mq4 |
//| [email protected] |
//| |
//+------------------------------------------------------------------+
#property copyright "[email protected]"
#property link "mailto:[email protected]"
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
extern int Aroon_Period=10;
double Buffer1;
double Buffer2;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1);
SetIndexBuffer(0,Buffer1);
SetIndexLabel(0,"Aroon Up");
SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,1);
SetIndexBuffer(1,Buffer2);
SetIndexLabel(1,"Aroon Down");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//---- TODO: add your code here
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
//---- TODO: add your code here
double HighestBar,LowestBar,aroonUp,aroonDn;
for(int shift=Bars-Aroon_Period;shift>=0;shift--){
HighestBar = Highest(NULL,0,MODE_HIGH,Aroon_Period-1,shift);
LowestBar = Lowest(NULL,0,MODE_LOW,Aroon_Period-1,shift);
aroonUp = 100 - ((HighestBar - shift) / Aroon_Period) * 100;
aroonDn = 100 - ((LowestBar - shift) / Aroon_Period) * 100;
if(aroonUp == 0) { aroonUp = 0.0000001; }
if(aroonDn == 0) { aroonDn = 0.0000001; }
Buffer1[shift]=aroonUp;
Buffer2[shift]=aroonDn;
}
//----
return(0);
}
//+------------------------------------------------------------------+
Aroon%20Horn.jpg

发表于:2015-06-17 10:05只看该作者
2楼
谢谢楼主,辛苦了
韬客社区www.talkfx.co
发表于:2015-07-01 12:15只看该作者
3楼
感谢分享
发表于:2015-07-02 10:17只看该作者
4楼
谢谢楼主分享,不买也要顶下!
韬客社区www.talkfx.co