论坛全局菜单下方 - TICKMILL 285X70论坛全局菜单下方 - ThinkMarkets285X70论坛全局菜单下方 - 荔枝返现285X70论坛全局菜单下方 -  icmarkets285X70
  • 1
  • 2
前往
共 24 条
查看:2444回复:23
草龙
注册时间2004-12-17
[MT4指标]蜡烛信号指示
楼主发表于:2014-10-09 07:33只看该作者倒序浏览
1楼 电梯直达
电梯直达
主图指标 蜡烛信号指示 体现各种信号 是否含有未来函数:无 //+------------------------------------------------------------------+ //| Candle_Signal.mq4 | //| Copyright ? 2006, MetaQuotes Software Corp. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright \"Copyright ? 2006, MetaQuotes Software Corp.\" #property link \" cja \" //---- #property indicator_chart_window //---- extern int PIP_Difference=15; extern int PERIOD=240;//0 = all timeframes extern string IIIIIIIIIIIIIIIIIIIIIIIII=\"<<<< Alert TEXT on Screen >>>>>>>>>>>>>>>>>\"; extern bool Show_AlertTEXT=true; extern string IIIIIIIIIIIIIIIIIIIIIIIIII=\"<<<< POP/UP Alert >>>>>>>>>>>>>>>>>>>>>>>>\"; extern bool AlertON=true; extern int Shift_UP_DN=0; extern int Shift_Left_Right=0; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- ObjectsDeleteAll(0,OBJ_LABEL); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); //---- double CURR,PIPS,PPIPS,TARGET_UP,TARGET_DN; //double OPEN = iOpen(NULL,30,0); // double CLOSE = iClose(NULL,30,0); double CUROPEN=iOpen(NULL,PERIOD,0); double PREVCLOSE=iClose(NULL,PERIOD,1); PIPS= (PREVCLOSE-Bid); PPIPS= (PREVCLOSE+Ask); TARGET_UP=((PREVCLOSE+PIP_Difference*Point)); TARGET_DN=((PREVCLOSE-PIP_Difference*Point)); string PRC1=\"\"; //PRICE = iMA(Symbol(),0,1,0,MODE_EMA,PRICE_CLOSE,0); if(Show_AlertTEXT==true) { string CandleSignal=\"\",CandleSignal2=\"\",CandleSignal3=\"\"; color col,col2,col3; //---- CandleSignal=\"Currently Signals Pending .................................\"; col= C\'250,250,0\'; if((Ask)>=(PREVCLOSE+PIP_Difference*Point)){CandleSignal=\"ALERT : PRICE Above Previous CLOSE By [ \"+(DoubleToStr(PIP_Difference,Digits-4))+\" ] \"+\"\"; col=C\'0,225,0\'; } if((Bid)<=(PREVCLOSE-PIP_Difference*Point)){CandleSignal=\"ALERT : PRICE Below Previous CLOSE By [ \"+(DoubleToStr(PIP_Difference,Digits-4))+\" ] \"+\"\"; col=C\'250,0,0\'; } if((Ask)>=(PREVCLOSE)){CandleSignal2=\"Upper Entry Target [ \"+(DoubleToStr(TARGET_UP,Digits))+\" ] \"+\"\"; col2=C\'180,225,0\'; } if((Bid)<=(PREVCLOSE)){CandleSignal2=\"Lower Entry Target [ \"+(DoubleToStr(TARGET_DN,Digits))+\" ] \"+\"\"; col2=C\'250,100,0\'; } // Determin whether Open above/Below Previous Close if((CUROPEN)>=(PREVCLOSE)){CandleSignal3=\"OPEN > PREV / CLOSE\"+\"\"; col3=C\'0,225,0\'; } if((CUROPEN)<(PREVCLOSE)){CandleSignal3=\"OPEN < PREV / CLOSE\"+\"\"; col3=C\'250,0,0\'; } ObjectCreate(\"CandleSignal\", OBJ_LABEL, 0, 0, 0); ObjectSetText(\"CandleSignal\", CandleSignal, 12,\"Arial Bold\", col); ObjectSet(\"CandleSignal\", OBJPROP_CORNER, 0); ObjectSet(\"CandleSignal\", OBJPROP_XDISTANCE, 250+Shift_Left_Right); ObjectSet(\"CandleSignal\", OBJPROP_YDISTANCE, 20+Shift_UP_DN); //---- ObjectCreate(\"CandleSignal2\", OBJ_LABEL, 0, 0, 0); ObjectSetText(\"CandleSignal2\", CandleSignal2, 12,\"Arial Bold\", col2); ObjectSet(\"CandleSignal2\", OBJPROP_CORNER, 0); ObjectSet(\"CandleSignal2\", OBJPROP_XDISTANCE, 250+Shift_Left_Right); ObjectSet(\"CandleSignal2\", OBJPROP_YDISTANCE, 52+Shift_UP_DN); //---- ObjectCreate(\"CandleSignal3\", OBJ_LABEL, 0, 0, 0); ObjectSetText(\"CandleSignal3\", CandleSignal3, 7,\"Arial Bold\", col3); ObjectSet(\"CandleSignal3\", OBJPROP_CORNER, 0); ObjectSet(\"CandleSignal3\", OBJPROP_XDISTANCE, 362+Shift_Left_Right); ObjectSet(\"CandleSignal3\", OBJPROP_YDISTANCE, 8+Shift_UP_DN); //---- ObjectCreate(\"Signal1\", OBJ_LABEL, 0, 0, 0); ObjectSetText(\"Signal1\",\"Signal Auto Display\", 9, \"Arial\", Silver); ObjectSet(\"Signal1\", OBJPROP_CORNER, 0); ObjectSet(\"Signal1\", OBJPROP_XDISTANCE, 250+Shift_Left_Right); ObjectSet(\"Signal1\", OBJPROP_YDISTANCE, 5+Shift_UP_DN); //---- ObjectCreate(\"Signal2\", OBJ_LABEL, 0, 0, 0); ObjectSetText(\"Signal2\",\"Target TF = [ \"+PERIOD+\" ]\", 9, \"Arial\", Silver); ObjectSet(\"Signal2\", OBJPROP_CORNER, 0); ObjectSet(\"Signal2\", OBJPROP_XDISTANCE, 250+Shift_Left_Right); ObjectSet(\"Signal2\", OBJPROP_YDISTANCE, 37+Shift_UP_DN); //---- double Price1=iMA(Symbol(),0,1,0,MODE_EMA,PRICE_CLOSE,0); PRC1=DoubleToStr(Price1,Digits); //---- ObjectCreate(\"Signalprice\", OBJ_LABEL, 0, 0, 0); ObjectSetText(\"Signalprice\",\"\"+PRC1+\"\", 30, \"Arial\", col); ObjectSet(\"Signalprice\", OBJPROP_CORNER, 0); ObjectSet(\"Signalprice\", OBJPROP_XDISTANCE,250+Shift_Left_Right); ObjectSet(\"Signalprice\", OBJPROP_YDISTANCE, 70+Shift_UP_DN); } if (AlertON==true) { if((Ask)>=(PREVCLOSE+PIP_Difference*Point)){ if (BarChanged()) { Alert(Symbol(),\" M\",Period(),\" ALERT : PRICE Above CLOSE By [ \"+(DoubleToStr(PIP_Difference,Digits-4))+\" ] \"+\"\"); } } if((Bid)<=(PREVCLOSE-PIP_Difference*Point)){ if (BarChanged()) { Alert(Symbol(),\" M\",Period(),\" ALERT : PRICE Below CLOSE By [ \"+(DoubleToStr(PIP_Difference,Digits-4))+\" ] \"+\"\"); } } } //---- return(0); } //+------------------------------------------------------------------+ bool BarChanged() { static datetime dt=0; if (dt!=Time[0]) { dt=Time[0]; return(true); } return(false); } //---- done return(0); //+------------------------------------------------------------------+
TK29帖子1楼右侧xm竖版广告90-240
个性签名

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

广告
TK30+TK31帖子一樓廣告
TK30+TK31帖子一樓廣告
beichen
注册时间2014-09-09
发表于:2014-10-15 15:06只看该作者
2楼
额。。。。。。。
beichen
注册时间2014-09-09
发表于:2014-10-15 15:06只看该作者
3楼
额。。。。。。。
beichen
注册时间2014-09-09
comp
注册时间2012-09-08
hogdig
注册时间2015-04-16
发表于:2015-04-26 06:28只看该作者
7楼
感谢无私分享感谢无私分享
智者牧心
注册时间2015-04-28
tanqingyuye
注册时间2015-04-02
发表于:2015-05-26 05:04只看该作者
9楼
看看再说
个性签名

韬客社区www.talkfx.co

广告
论坛谏言--外汇交易不应是你投资的全部,交易外汇也不应是你生活的全部
尘缘在此
注册时间2016-03-13
发表于:2016-06-20 00:20只看该作者
10楼
谢谢分享
个性签名

韬客社区www.talkfx.co

yangterry
注册时间2016-05-08
同名那么多
注册时间2016-07-09
xilutou
注册时间2016-02-06
发表于:2016-07-21 14:33只看该作者
13楼
000000000000000000000000000000000000000
hyg
注册时间2016-07-26
pensh
注册时间2016-07-24
ckjewel
注册时间2016-08-02
pingjing
注册时间2015-12-04
发表于:2016-08-06 23:45只看该作者
17楼
怎么用,能说说吗
pensh
注册时间2016-07-24
xhw
注册时间2013-01-02
发表于:2016-09-13 04:07只看该作者
20楼
qhdqlx
注册时间2016-08-27
  • 1
  • 2
前往
共 24 条

本站免责声明:

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

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

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

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

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

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