论坛全局菜单下方 - TICKMILL 285X70论坛全局菜单下方 - ThinkMarkets285X70论坛全局菜单下方 - 荔枝返现285X70论坛全局菜单下方 -  icmarkets285X70
查看:738回复:0
草龙
注册时间2004-12-17
[MT4指标]主图rsi突破指标
楼主发表于:2014-02-11 06:44只看该作者倒序浏览
1楼 电梯直达
电梯直达
主图指标上显示的 rsi指标 mt4指标类型:震荡指标 是否能用在mt4手机版上:否 是否含有未来函数:无 //+------------------------------------------------------------------+ //| BreakOutRSI-1.mq4 | //| | //| | //+------------------------------------------------------------------+ #property indicator_chart_window double RSI; int i, Dig, Trend; double AvgHighs, AvgLows; string TrendTxt, RSIState; color TrendColor; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init(){} //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { Comment(""); ObjectDelete("Trend"); ObjectDelete("BrLong"); ObjectDelete("BrShort"); ObjectDelete("RSI"); ObjectDelete("B-Range"); ObjectDelete("B-Range2"); ObjectDelete("A-Range"); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { if(Close[0]>10) {Dig=3; } else if(Close[0]<10) {Dig=5; } RSI = iRSI(NULL,0,14,PRICE_OPEN,0); double Top = iHigh(NULL,0,iHighest(NULL,0,MODE_HIGH,16,1)); double Bottom = iLow (NULL,0,iLowest (NULL,0,MODE_LOW, 16,1)); AvgHighs = (High[1]+High[2]+High[3]+High[4]+High[5]+High[6]+High[7]+High[8]+High[9]+High[10]+High[11]+High[12]+High[13]+High[14]+High[15]+High[16])/16; AvgLows = (Low[1]+Low[2]+Low[3]+Low[4]+Low[5]+Low[6]+Low[7]+Low[8]+Low[9]+Low[10]+Low[11]+Low[12]+Low[13]+Low[14]+Low[15]+Low[16])/16; ObjectDelete("B-Range"); ObjectCreate("B-Range", OBJ_RECTANGLE, 0, 0,0, 0,0); ObjectSet ("B-Range", OBJPROP_STYLE, STYLE_SOLID); ObjectSet ("B-Range", OBJPROP_COLOR, C'128,60,0'); ObjectSet ("B-Range", OBJPROP_BACK, false); ObjectSet ("B-Range", OBJPROP_TIME1 ,Time[17]); ObjectSet ("B-Range", OBJPROP_PRICE1,Top); ObjectSet ("B-Range", OBJPROP_TIME2 ,Time[0]+Time[0]-Time[1]); ObjectSet ("B-Range", OBJPROP_PRICE2,Bottom); ObjectDelete("B-Range2"); ObjectCreate("B-Range2", OBJ_RECTANGLE, 0, 0,0, 0,0); ObjectSet ("B-Range2", OBJPROP_STYLE, STYLE_SOLID); ObjectSet ("B-Range2", OBJPROP_COLOR, C'128,60,0'); ObjectSet ("B-Range2", OBJPROP_BACK, true); ObjectSet ("B-Range2", OBJPROP_TIME1 ,Time[0]+Time[0]-Time[1]); ObjectSet ("B-Range2", OBJPROP_PRICE1,Top); ObjectSet ("B-Range2", OBJPROP_TIME2 ,Time[0]+Time[0]-Time[2]); ObjectSet ("B-Range2", OBJPROP_PRICE2,Bottom); ObjectDelete("A-Range"); ObjectCreate("A-Range", OBJ_RECTANGLE, 0, 0,0, 0,0); ObjectSet ("A-Range", OBJPROP_STYLE, STYLE_SOLID); ObjectSet ("A-Range", OBJPROP_COLOR, C'75,50,50'); ObjectSet ("A-Range", OBJPROP_BACK, true); ObjectSet ("A-Range", OBJPROP_TIME1 ,Time[0]+Time[0]-Time[1]); ObjectSet ("A-Range", OBJPROP_PRICE1,AvgHighs); ObjectSet ("A-Range", OBJPROP_TIME2 ,Time[0]+Time[0]-Time[2]); ObjectSet ("A-Range", OBJPROP_PRICE2,AvgLows); if (Close[0]>=Top) {Trend=2;} if (Close[0]>=AvgHighs && Close[0]AvgLows) {Trend=0;} if (Close[0]<=AvgLows && Close[0]>Bottom) {Trend=-1;} if (Close[0]<=Bottom) {Trend=-2;} if (Trend==2){TrendTxt="Breaking-out Upwards";TrendColor=Aqua;} if (Trend==1){TrendTxt="Trending Up";TrendColor=Aqua;} if (Trend==0){TrendTxt="Range Bound";TrendColor=White;} if (Trend==-1){TrendTxt="Trending Down";TrendColor=Red;} if (Trend==-2){TrendTxt="Breaking-out Downwards";TrendColor=Red;} if (Trend==1 || Trend == 2 && RSI >=50) {RSIState="Favourable";} else if (Trend==-1 || Trend==-2 && RSI < 50) {RSIState="Favourable";} else if (Trend ==0){RSIState="";} else RSIState="Unfavourable"; Comment( "\n"+"\n"+ RSIState+" RSI:"+"\n"+ "Breakout Long:"+"\n"+ "Breakout Short:" ); ObjectCreate("Trend", OBJ_LABEL, 0, 0, 0); ObjectSetText("Trend",TrendTxt,12,"Arial Black", TrendColor); ObjectSet("Trend", OBJPROP_CORNER, 0); ObjectSet("Trend", OBJPROP_XDISTANCE, 4); ObjectSet("Trend", OBJPROP_YDISTANCE, 13); ObjectCreate("RSI", OBJ_LABEL, 0, 0, 0); ObjectSetText("RSI",DoubleToStr(RSI,1),8,"Arial Black", White); ObjectSet("RSI", OBJPROP_CORNER, 0); ObjectSet("RSI", OBJPROP_XDISTANCE, 90); ObjectSet("RSI", OBJPROP_YDISTANCE, 34); ObjectCreate("BrLong", OBJ_LABEL, 0, 0, 0); ObjectSetText("BrLong",DoubleToStr(Top,Dig),8,"Arial Black", Red); ObjectSet("BrLong", OBJPROP_CORNER, 0); ObjectSet("BrLong", OBJPROP_XDISTANCE, 90); ObjectSet("BrLong", OBJPROP_YDISTANCE, 47); ObjectCreate("BrShort", OBJ_LABEL, 0, 0, 0); ObjectSetText("BrShort",DoubleToStr(Bottom,Dig),8,"Arial Black", Red); ObjectSet("BrShort", OBJPROP_CORNER, 0); ObjectSet("BrShort", OBJPROP_XDISTANCE, 90); ObjectSet("BrShort", OBJPROP_YDISTANCE, 58); return(0); } //+------------------------------------------------------------------+BreakOutRSI-1.jpgBreakOutRSI-1.jpg
TK29帖子1楼右侧xm竖版广告90-240
个性签名

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

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

本站免责声明:

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

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

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

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

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

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