论坛全局菜单下方 - exness285X70 - 韬客社区论坛全局菜单下方 - 荔枝返现285X70 - 韬客社区论坛全局菜单下方 - ThinkMarkets285X70 - 韬客社区论坛全局菜单下方 - TICKMILL 285X70 - 韬客社区
查看:599回复:0
草龙韬客社区韬客社区
注册时间2004-12-17
[MT4指标]ChandelierExit指标
韬客社区
楼主发表于:2014-02-26 00:37只看该作者倒序浏览
1楼 电梯直达
电梯直达
主图指标 mt4指标类型:震荡指标 是否能用在mt4手机版上:否 是否含有未来函数:无 //+------------------------------------------------------------------+ //| ChandelierExit.mq4 | //| MQLService | //| [email protected] | //+------------------------------------------------------------------+ #property copyright "MQLService" #property link "[email protected]" #property indicator_chart_window #property indicator_buffers 4 //#property indicator_color1 Blue //#property indicator_color2 Red #property indicator_color3 Orange #property indicator_color4 Magenta //---- input parameters extern int Range=15; extern int Shift=1; extern int ATRPeriod=14; extern int MultipleATR=4; //---- buffers double ExtMapBuffer1; double ExtMapBuffer2; double ExtMapBuffer3; double ExtMapBuffer4; int direction=1; double ATRvalue; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators //SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,ExtMapBuffer1); //SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,ExtMapBuffer2); SetIndexStyle(2,DRAW_LINE); SetIndexBuffer(2,ExtMapBuffer3); SetIndexEmptyValue(2,0.0); SetIndexStyle(3,DRAW_LINE); SetIndexBuffer(3,ExtMapBuffer4); SetIndexEmptyValue(3,0.0); //---- return(0); } //+------------------------------------------------------------------+ //| Custor 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=0; if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; for(int i=limit; i>=0; i--) { ATRvalue=iATR(NULL,0,ATRPeriod,0)*MultipleATR; ExtMapBuffer1=High[Highest(NULL,0,MODE_HIGH,Range,i+Shift)]-ATRvalue; ExtMapBuffer2=Low[Lowest(NULL,0,MODE_LOW,Range,i+Shift)]+ATRvalue; if(direction==1) { if(Close[i+1]ExtMapBuffer2[i+1]) { direction=1; ExtMapBuffer4=ExtMapBuffer1; } else ExtMapBuffer4=ExtMapBuffer2; } } return(0); } //+------------------------------------------------------------------+ChandelierExit.jpgChandelierExit.jpg
TK29帖子1楼右侧xm竖版广告90-240
个性签名

阅尽天下指标
搬砖开始,始于2014

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
版权所有:韬客外汇论坛 www.talkfx.com 联络我们:[email protected]