论坛全局菜单下方 - TICKMILL 285X70论坛全局菜单下方 - ThinkMarkets285X70论坛全局菜单下方 - 荔枝返现285X70论坛全局菜单下方 -  icmarkets285X70
查看:1308回复:1
noy
注册时间2008-10-31
那个老哥给帮忙
楼主发表于:2011-10-07 08:44只看该作者倒序浏览
1楼 电梯直达
电梯直达
给以下指标的黄色色块出现加个多次报警和邮件功能,在此表示感谢了。 //+-----------------------------------------------------------------------+ //| ATM_MasterCandle_IB_PBv3.mq4 | //| Identifies the following candle formations : | //| Inside Bars - candle is within or touching previous candle extreme | //| Master Inside Bars - a series of consecutive IB's | //| PinBars - candle shadow is greater than defined ratio | //| V3 Removed color key and bar timer //+-----------------------------------------------------------------------+ #property indicator_chart_window #property indicator_buffers 6 #property indicator_color1 Gold #property indicator_color2 Gold #property indicator_width1 5 #property indicator_width2 5 #property indicator_color3 Lime #property indicator_color4 Lime #property indicator_width3 0 #property indicator_width4 0 #property indicator_color5 Black #property indicator_color6 Black #property indicator_width5 0 #property indicator_width6 0 static string Indicator_Name ="MasterCandlePlus"; static string Version ="1.0"; double MasterIB_High, MasterIB_Low; double IB_High, IB_Low; double PinBar_High, PinBar_Low; double HighestHigh, LowestLow; int BarCount; extern int MasterIB_Extra_Pips =0; extern string a_ ="Default BarsBeforePaint"; extern string b_ ="M1, M2, M3, or M4 default 5 bars"; extern string c_ ="M5 or greater default 4 bars"; extern string d_ ="Set to 0 to use defaults"; extern int MasterIB_Minimum_Bars=5; extern color MasterIB_Color =Gold; extern string e_ ="Set width to 0 to disable"; extern int MasterIB_Width =5; extern color IB_Color =Lime; extern string f_ ="Set width to 0 to disable"; extern int IB_Width =5; extern int Minimum_Nose_Ratio =60; extern int Maximum_Body_Ratio =40; extern color PinBar_Color =Black; extern string g_ ="Set width to 0 to disable"; extern string g1_ ="Set width to -size to show as star"; extern string g2_ ="eg -1=small, -3=larger"; extern int PinBar_Width =0; int init() { IndicatorBuffers(6); SetIndexStyle( 0, DRAW_HISTOGRAM, 0, MasterIB_Width, MasterIB_Color ); SetIndexBuffer( 0, MasterIB_High ); SetIndexStyle( 1, DRAW_HISTOGRAM, 0, MasterIB_Width, MasterIB_Color ); SetIndexBuffer( 1, MasterIB_Low ); SetIndexStyle( 2, DRAW_HISTOGRAM, 0, IB_Width, IB_Color ); SetIndexBuffer( 2, IB_High ); SetIndexStyle( 3, DRAW_HISTOGRAM, 0, IB_Width, IB_Color ); SetIndexBuffer( 3, IB_Low ); if( PinBar_Width>0 ) { SetIndexStyle( 4, DRAW_HISTOGRAM, 0, PinBar_Width, PinBar_Color ); SetIndexBuffer( 4, PinBar_High ); SetIndexStyle( 5, DRAW_HISTOGRAM, 0, PinBar_Width, PinBar_Color ); SetIndexBuffer( 5, PinBar_Low ); } else if( PinBar_Width<0 ) { SetIndexStyle( 4, DRAW_ARROW, 0, MathAbs( PinBar_Width ), PinBar_Color ); SetIndexArrow( 4, 171 ); SetIndexBuffer( 4, PinBar_High ); SetIndexStyle( 5, DRAW_ARROW, 0, MathAbs( PinBar_Width ), PinBar_Color ); SetIndexArrow( 5, 171 ); SetIndexBuffer( 5, PinBar_Low ); } HighestHigh = 0; LowestLow = 0; return(0); } int deinit() { int _ObjectsTotal=ObjectsTotal(); for( int _Object=_ObjectsTotal; _Object>=0; _Object-- ) { string _ObjectName=ObjectName( _Object ); if( StringSubstr( _ObjectName, 0, StringLen( Indicator_Name )+2 )=="["+Indicator_Name+"]" ) ObjectDelete( _ObjectName ); } return(0); } int start() { int shift, bar, limit, counted_bars=IndicatorCounted(); double bar_length, noseup_length, nosedn_length, body_length, eye_pos; if( MasterIB_Minimum_Bars==0 ) { if( Period() < 5 ) MasterIB_Minimum_Bars=5; else MasterIB_Minimum_Bars=4; } //---- if( counted_bars<0 ) return(-1); if( counted_bars==0 ) limit=Bars-1; //---- last counted bar will be recounted if( counted_bars>0 ) limit=Bars-counted_bars; limit--; for( shift=limit; shift>0; shift-- ) { //--- Pin Bar if( PinBar_Width!=0 ) { bar_length=High[shift]-Low[shift]; if( bar_length==0 ) bar_length=Point; noseup_length=MathMin( Open[shift], Close[shift] )-Low[shift]; nosedn_length=High[shift]-MathMax( Open[shift], Close[shift] ); body_length=MathAbs( Open[shift]-Close[shift] ); if( noseup_length/bar_length>Minimum_Nose_Ratio/100.0 && body_length/bar_length=bar_length/3.0 ) { if( PinBar_Width>0 ) { if( Open[shift]Minimum_Nose_Ratio/100.0 && body_length/bar_length=bar_length/3.0 ) { if( PinBar_Width>0 ) { PinBar_High[shift]=High[shift]; if( Open[shift]>Close[shift] ) PinBar_Low[shift]=Open[shift]; else PinBar_Low[shift]=Close[shift]; } else if( PinBar_Width<0 ) { PinBar_High[shift]=High[shift]+Point; } } } //--- Inside Bar if( IB_Width!=0 ) { if( ( High[shift+1]<=High[shift] && Low[shift+1]>Low[shift] ) || ( High[shift+1]=Low[shift] ) ) { IB_High[shift]=High[shift]; IB_Low[shift] =Low[shift]; } } //--- Master Inside Bar if( MasterIB_Width!=0 ) { if( High[shift]<=HighestHigh && Low[shift]>=LowestLow ) { BarCount++; } else { HighestHigh=High[shift]; LowestLow = Low[shift]; BarCount=0; } if( BarCount>=MasterIB_Minimum_Bars ) { for( bar=0; bar
TK29帖子1楼右侧xm竖版广告90-240
个性签名

韬客社区www.talkfx.co

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
boji
注册时间2011-10-17
发表于:2011-10-17 07:30只看该作者
2楼
这个不难啊. [ 本帖最后由 boji 于 2011-10-17 15:54 编辑 ]
个性签名

韬客社区www.talkfx.co

广告
论坛谏言--外汇交易不应是你投资的全部,交易外汇也不应是你生活的全部

本站免责声明:

1、本站所有广告及宣传信息均与韬客无关,如需投资请依法自行决定是否投资、斟酌资金安全及交易亏损风险;

2、韬客是独立的、仅为投资者提供交流的平台,网友发布信息不代表韬客的观点与意思表示,所有因网友发布的信息而造成的任何法律后果、风险与责任,均与韬客无关;

3、金融交易存在极高法律风险,未必适合所有投资者,请不要轻信任何高额投资收益的诱导而贸然投资;投资保证金交易导致的损失可能超过您投入的资金和预期。请您考虑自身的投资经验及风险承担能力,进行合法、理性投资;

4、所有投资者的交易帐户应仅限本人使用,不应交由第三方操作,对于任何接受第三方喊单、操盘、理财等操作的投资和交易,由此导致的任何风险、亏损及责任由投资者个人自行承担;

5、韬客不隶属于任何券商平台,亦不受任何第三方控制,韬客不邀约客户投资任何保证金交易,不接触亦不涉及投资者的任何资金及账户信息,不代理任何交易操盘行为,不向客户推荐任何券商平台,亦不存在其他任何推荐行为。投资者应自行选择券商平台,券商平台的任何行为均与韬客无关。投资者注册及使用韬客即表示其接受和认可上述声明,并自行承担法律风险。

版权所有:韬客外汇论坛 www.talkfx.com 联络我们:[email protected]