论坛全局菜单下方 - TICKMILL 285X70论坛全局菜单下方 - ThinkMarkets285X70论坛全局菜单下方 - 荔枝返现285X70论坛全局菜单下方 -  icmarkets285X70
查看:821回复:0
胶泥
注册时间2006-07-20
[MT4指标]哪位朋友能帮我做个预警,副图程序及图示如下
楼主发表于:2014-03-14 01:03只看该作者倒序浏览
1楼 电梯直达
电梯直达
我想在H1周期中,如果绿线上穿或者下穿布林并且在50水平线上下方时弹出窗口预警。 哪位朋友如果可以,帮我做一下,谢谢! 副图程序如下: //+------------------------------------------------------------------+ //| Traders Dynamic Index.mq4 | //| Copyright ?2006, Dean Malone | //| www.compassfx.com | //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //| | //| Traders Dynamic Index | //| | //| This hybrid indicator is developed to assist traders in their | //| ability to decipher and monitor market conditions related to | //| trend direction, market strength, and market volatility. | //| | //| Even though comprehensive, the T.D.I. is easy to read and use. | //| | //| Green line = RSI Price line | //| Red line = Trade Signal line | //| Blue lines = Volatility Band | //| Yellow line = Market Base Line | //| | //| Trend Direction - Immediate and Overall | //| Immediate = Green over Red...price action is moving up. | //| Red over Green...price action is moving down. | //| | //| Overall = Yellow line trends up and down generally between the | //| lines 32 & 68. Watch for Yellow line to bounces off | //| these lines for market reversal. Trade long when | //| price is above the Yellow line, and trade short when | //| price is below. | //| | //| Market Strength & Volatility - Immediate and Overall | //| Immediate = Green Line - Strong = Steep slope up or down. | //| Weak = Moderate to Flat slope. | //| | //| Overall = Blue Lines - When expanding, market is strong and | //| trending. When constricting, market is weak and | //| in a range. When the Blue lines are extremely tight | //| in a narrow range, expect an economic announcement | //| or other market condition to spike the market. | //| | //| | //| Entry conditions | //| Scalping - Long = Green over Red, Short = Red over Green | //| Active - Long = Green over Red & Yellow lines | //| Short = Red over Green & Yellow lines | //| Moderate - Long = Green over Red, Yellow, & 50 lines | //| Short= Red over Green, Green below Yellow & 50 line | //| | //| Exit conditions* | //| Long = Green crosses below Red | //| Short = Green crosses above Red | //| * If Green crosses either Blue lines, consider exiting when | //| when the Green line crosses back over the Blue line. | //| | //| | //| IMPORTANT: The default settings are well tested and proven. | //| But, you can change the settings to fit your | //| trading style. | //| | //| | //| Price & Line Type settings: | //| RSI Price settings | //| 0 = Close price [DEFAULT] | //| 1 = Open price. | //| 2 = High price. | //| 3 = Low price. | //| 4 = Median price, (high+low)/2. | //| 5 = Typical price, (high+low+close)/3. | //| 6 = Weighted close price, (high+low+close+close)/4. | //| | //| RSI Price Line & Signal Line Type settings | //| 0 = Simple moving average [DEFAULT] | //| 1 = Exponential moving average | //| 2 = Smoothed moving average | //| 3 = Linear weighted moving average | //| | //| Good trading, | //| | //| Dean | //+------------------------------------------------------------------+ #property indicator_buffers 6 #property indicator_color1 Black #property indicator_color2 0XFFFFFFFF // MediumBlue #property indicator_color3 0xFFFFFFFF // Yellow #property indicator_color4 0XFFFFFFFF // MediumBlue #property indicator_color5 Green #property indicator_color6 Red #property indicator_separate_window extern int RSI_Period = 13; //8-25 extern int RSI_Price = 0; //0-6 extern int Volatility_Band = 34; //20-40 extern int RSI_Price_Line = 2; extern int RSI_Price_Type = 0; //0-3 extern int Trade_Signal_Line = 7; extern int Trade_Signal_Type = 0; //0-3 double RSIBuf,UpZone,MdZone,DnZone,MaBuf,MbBuf; int init() { IndicatorShortName("TDI"); SetIndexBuffer(0,RSIBuf); SetIndexBuffer(1,UpZone); SetIndexBuffer(2,MdZone); SetIndexBuffer(3,DnZone); SetIndexBuffer(4,MaBuf); SetIndexBuffer(5,MbBuf); SetIndexStyle(0,DRAW_NONE); SetIndexStyle(1,DRAW_LINE); SetIndexStyle(2,DRAW_LINE); //,0,2 SetIndexStyle(3,DRAW_LINE); SetIndexStyle(4,DRAW_LINE); //,0,2 SetIndexStyle(5,DRAW_LINE); //,0,2 SetIndexLabel(0,NULL); SetIndexLabel(1,"VB High"); SetIndexLabel(2,"Market Base Line"); SetIndexLabel(3,"VB Low"); SetIndexLabel(4,"RSI Price Line"); SetIndexLabel(5,"Trade Signal Line"); SetLevelValue(0,50); SetLevelValue(1,68); SetLevelValue(2,32); SetLevelStyle(STYLE_DOT,1,DimGray); return(0); } int start() { double MA,RSI; ArrayResize(RSI,Volatility_Band); int counted_bars=IndicatorCounted(); int limit = Bars-counted_bars-1; for(int i=limit; i>=0; i--) { RSIBuf = (iRSI(NULL,0,RSI_Period,RSI_Price,i)); MA = 0; for(int x=i; x=0;i--) { MaBuf = (iMAOnArray(RSIBuf,0,RSI_Price_Line,0,RSI_Price_Type,i)); MbBuf = (iMAOnArray(RSIBuf,0,Trade_Signal_Line,0,Trade_Signal_Type,i)); } //---- return(0); } double StDev(double& Data, int Per) {return(MathSqrt(Variance(Data,Per))); } double Variance(double& Data, int Per) {double sum, ssum; for (int i=0; iQQ截图20140314085926.jpg
TK29帖子1楼右侧xm竖版广告90-240
个性签名

韬客社区www.talkfx.co

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告

本站免责声明:

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

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

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

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

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

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