النتائج 1 إلى 3 من 3
الموضوع: طلب مساعده للحصول علي هذا المؤشر
- 20-03-2008, 06:16 PM #1
طلب مساعده للحصول علي هذا المؤشر
هذا كود الموشرات المطلوبه وللاسف تنقصني الخبره في كيفيت الحصول عليها فارجوا المساعده ولكم جزيل الشكر
1-
//+------------------------------------------------------------------+//| Trending or Ranging? |//| ToR_1.12.mq4 |//| Copyright © 2008Tom Balfe |//| |//| This indicator shows you whether a pair is trending or ranging. | //| For trending markets use moving averages and for ranging |//| market use oscillators. |//| |//| Best of luck in all your trades... |//| |//| Special thanks to whereswaldo! |//| |//| Version: 1.12 |//| |//| Changelog: |//| 1.12 - made color assignment more efficient, made arrow |//| assignment more efficient |//| 1.11 - adjusted fonts, spacing, added ranging, text broken |//| 1.10 - added ADX increasing and decreasing notice |//| 1.03 - adjusted spacing, fonts, unreleased |//| 1.02 - added arrows, ranging icon, no zero space state |//| for icons/arrows, spacing got messed up, now | //| fixed |//| 1.01 - unreleased, Reduced number of colors, functional |//| 1.0 - unreleased, too many colors for ADX values |//| |//| http://www.forex-tsd.com/members/nittany1.html |//+------------------------------------------------------------------+#property copyright "Copyright © 2007-2008 Tom Balfe"#property link "http://www.forex-tsd.com/members/nittany1.html"#property link "[email protected]"#property indicator_separate_windowint spread;//---- user selectable stuffextern int SpreadThreshold = 6;extern bool Show_h1_ADX = true;extern bool Show_h4_ADX = true;extern int ADX_trend_level = 23;extern int ADX_trend_strong = 28;//+------------------------------------------------------------------+//| Custom indicator initialization function |//+------------------------------------------------------------------+int init() { //---- indicator short name IndicatorShortName("ToR 1.12 "); return(0); }//+------------------------------------------------------------------+//| Custom indicator deinitialization function |//+------------------------------------------------------------------+int deinit() { //---- need to delete objects should user remove indicator ObjectsDeleteAll(0,OBJ_LABEL); ObjectDelete("ToR112-1");ObjectDelete("ToR112-2");ObjectDelete("ToR112-3"); ObjectDelete("ToR112-3a");ObjectDelete("ToR112-4");ObjectDelete("ToR112-4a"); ObjectDelete("ToR112-4d");ObjectDelete("ToR112-5");ObjectDelete("ToR112-6"); ObjectDelete("ToR112-6a");ObjectDelete("ToR112-6d");ObjectDelete("ToR112-7"); ObjectDelete("ToR112-8");ObjectDelete("ToR112-8a");ObjectDelete("ToR112-8d"); ObjectDelete("ToR112-9");ObjectDelete("ToR112-10");ObjectDelete("ToR112-10a"); ObjectDelete("ToR112-10d");ObjectDelete("ToR112-11");ObjectDelete("ToR112-12"); ObjectDelete("ToR112-12a");ObjectDelete("ToR112-13");ObjectDelete("ToR112-12d"); ObjectDelete("ToR112-14");ObjectDelete("ToR112-15");ObjectDelete("ToR112-18d"); return(0); }int start() { //---- let's define some stuff // M1 ADX data double adx_m1 = iADX(NULL,1,14,PRICE_CLOSE,0,0); // ADX 1 min double adx_1ago_m1 = iADX(NULL,1,14,PRICE_CLOSE,0,1); // ADX 1 min 1 bar ago double di_p_m1 = iADX(NULL,1,14,PRICE_CLOSE,1,0); // DI+ 1 min double di_m_m1 = iADX(NULL,1,14,PRICE_CLOSE,2,0); // DI- 1 min // M5 ADX data double adx_m5 = iADX(NULL,5,14,PRICE_CLOSE,0,0); // ADX 5 min double adx_1ago_m5 = iADX(NULL,5,14,PRICE_CLOSE,0,1); // ADX 5 min 1 bar ago double di_p_m5 = iADX(NULL,5,14,PRICE_CLOSE,1,0); // DI+ 5 min double di_m_m5 = iADX(NULL,5,14,PRICE_CLOSE,2,0); // DI- 5 min // M15 ADX data double adx_m15 = iADX(NULL,15,14,PRICE_CLOSE,0,0); // ADX 15 min double adx_1ago_m15 = iADX(NULL,15,14,PRICE_CLOSE,0,1); // ADX 15 min 1 bar ago double di_p_m15 = iADX(NULL,15,14,PRICE_CLOSE,1,0); // DI+ 15 min double di_m_m15 = iADX(NULL,15,14,PRICE_CLOSE,2,0); // DI- 15 min // M30 ADX data double adx_m30 = iADX(NULL,30,14,PRICE_CLOSE,0,0); // ADX 30 min double adx_1ago_m30 = iADX(NULL,30,14,PRICE_CLOSE,0,1); // ADX 30 min 1 bar ago double di_p_m30 = iADX(NULL,30,14,PRICE_CLOSE,1,0); // DI+ 30 min double di_m_m30 = iADX(NULL,30,14,PRICE_CLOSE,2,0); // DI- 30 min // h1 ADX data double adx_h1 = iADX(NULL,60,14,PRICE_CLOSE,0,0); // ADX 1 hour double adx_1ago_h1 = iADX(NULL,60,14,PRICE_CLOSE,0,1); // ADX 1 hr 1 bar ago double di_p_h1 = iADX(NULL,60,14,PRICE_CLOSE,1,0); // DI+ 1 hour double di_m_h1 = iADX(NULL,60,14,PRICE_CLOSE,2,0); // DI- 1 hour // h4 ADX data double adx_h4 = iADX(NULL,240,14,PRICE_CLOSE,0,0); // ADX 4 hour double adx_1ago_h4 = iADX(NULL,240,14,PRICE_CLOSE,0,1); // ADX 4 hr 1 bar ago double di_p_h4 = iADX(NULL,240,14,PRICE_CLOSE,1,0); // DI+ 4 hour double di_m_h4 = iADX(NULL,240,14,PRICE_CLOSE,2,0); // DI- 4 hour //---- define colors and arrows color adx_color_m1,adx_color_m5,adx_color_m15,adx_color_ m30,adx_color_h1,adx_color_h4; string adx_arrow_m1,adx_arrow_m5,adx_arrow_m15,adx_arrow_ m30,adx_arrow_h1,adx_arrow_h4; //----- Assign colors adx_color_m1 = assigncolor(adx_m1,ADX_trend_level,di_p_m1, di_m_m1); adx_color_m5 = assigncolor(adx_m5,ADX_trend_level,di_p_m5, di_m_m5); adx_color_m15 = assigncolor(adx_m15,ADX_trend_level,di_p_m15, di_m_m15); adx_color_m30 = assigncolor(adx_m30,ADX_trend_level,di_p_m30, di_m_m30); adx_color_h1 = assigncolor(adx_h1,ADX_trend_level,di_p_h1, di_m_h1); adx_color_h4 = assigncolor(adx_h4,ADX_trend_level,di_p_h4, di_m_h4); //---- feed all the ADX values into strings string adx_value_m1 = adx_m1; string adx_value_m5 = adx_m5; string adx_value_m15 = adx_m15; string adx_value_m30 = adx_m30; string adx_value_h1 = adx_h1; string adx_value_h4 = adx_h4; //----- Assign Arrows adx_arrow_m1 = AssignArrow(adx_m1,di_p_m1,di_m_m1); adx_arrow_m5 = AssignArrow(adx_m5,di_p_m5,di_m_m5); adx_arrow_m15= AssignArrow(adx_m15,di_p_m15,di_m_m15); adx_arrow_m30= AssignArrow(adx_m30,di_p_m30,di_m_m30); adx_arrow_h1 = AssignArrow(adx_h1,di_p_h1,di_m_h1); adx_arrow_h4 = AssignArrow(adx_h4,di_p_h4,di_m_h4); //---- defines what spread is spread=MarketInfo(Symbol(),MODE_SPREAD); //+------------------------------------------------------------------+ //| Spread | //+------------------------------------------------------------------+ ObjectCreate("ToR112-1", OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-1","SPREAD:", 8, "Arial Bold", LightSteelBlue); ObjectSet("ToR112-1", OBJPROP_CORNER, 0); ObjectSet("ToR112-1", OBJPROP_XDISTANCE, 65); ObjectSet("ToR112-1", OBJPROP_YDISTANCE, 2); //---- creates spread number, Lime if less than threshold, Red if above it ObjectCreate("ToR112-2", OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); if (spread<=SpreadThreshold) { ObjectSetText("ToR112-2",DoubleToStr(spread ,0),10, "Arial Bold", Lime); } else ObjectSetText("ToR112-2",DoubleToStr(spread ,0),10, "Arial Bold", Red); ObjectSet("ToR112-2", OBJPROP_CORNER, 0); ObjectSet("ToR112-2", OBJPROP_XDISTANCE, 115); ObjectSet("ToR112-2", OBJPROP_YDISTANCE, 2); //+------------------------------------------------------------------+ //| 1 MIN | //+------------------------------------------------------------------+ ObjectCreate("ToR112-3",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-3","1 MIN:", 8, "Arial Bold", LightSteelBlue); ObjectSet("ToR112-3", OBJPROP_CORNER, 0); ObjectSet("ToR112-3", OBJPROP_XDISTANCE, 150); ObjectSet("ToR112-3", OBJPROP_YDISTANCE, 2); //---- create text "Getting: " ObjectCreate("ToR112-3a",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-3a","CHANGE:", 8, "Arial Bold", LightSteelBlue); ObjectSet("ToR112-3a", OBJPROP_CORNER, 0); ObjectSet("ToR112-3a", OBJPROP_XDISTANCE, 135); ObjectSet("ToR112-3a", OBJPROP_YDISTANCE, 17); //---- create 1 min value ObjectCreate("ToR112-4",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-4", " ADX "+StringSubstr(adx_value_m1,0,5)+" ",9, "Arial Bold",adx_color_m1); ObjectSet("ToR112-4", OBJPROP_CORNER, 0); ObjectSet("ToR112-4", OBJPROP_XDISTANCE, 185); ObjectSet("ToR112-4", OBJPROP_YDISTANCE, 2); //---- create 1 min arrow, squiggle if ranging ObjectCreate("ToR112-4a",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-4a",adx_arrow_m1,9, "Wingdings",adx_color_m1); ObjectSet("ToR112-4a", OBJPROP_CORNER, 0); ObjectSet("ToR112-4a", OBJPROP_XDISTANCE, 250); ObjectSet("ToR112-4a", OBJPROP_YDISTANCE, 2); //----create 1 min Strong/Weaker/Ranging ObjectCreate("ToR112-4d",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSet("ToR112-4d", OBJPROP_CORNER, 0); ObjectSet("ToR112-4d", OBJPROP_XDISTANCE, 190); ObjectSet("ToR112-4d", OBJPROP_YDISTANCE, 17); if (adx_m1 < ADX_trend_level) { ObjectSetText("ToR112-4d", " RANGING ",8, "Arial Bold",Silver); } else if (adx_m1 > adx_1ago_m1) { ObjectSetText("ToR112-4d", " STRONGER ",8, "Arial Bold",Silver); } else { ObjectSetText("ToR112-4d", " WEAKER ",8, "Arial Bold",Silver); } //+------------------------------------------------------------------+ //| 5 MIN | //+------------------------------------------------------------------+ ObjectCreate("ToR112-5",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-5","5 MIN:", 8, "Arial Bold", LightSteelBlue); ObjectSet("ToR112-5", OBJPROP_CORNER, 0); ObjectSet("ToR112-5", OBJPROP_XDISTANCE, 270); ObjectSet("ToR112-5", OBJPROP_YDISTANCE, 2); //---- create 5 min value ObjectCreate("ToR112-6",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-6", " ADX "+StringSubstr(adx_value_m5,0,5)+" ",9, "Arial Bold",adx_color_m5); ObjectSet("ToR112-6", OBJPROP_CORNER, 0); ObjectSet("ToR112-6", OBJPROP_XDISTANCE, 305); ObjectSet("ToR112-6", OBJPROP_YDISTANCE, 2); //---- create 5 min arrow, squiggle if ranging ObjectCreate("ToR112-6a",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-6a",adx_arrow_m5,9, "Wingdings",adx_color_m5); ObjectSet("ToR112-6a", OBJPROP_CORNER, 0); ObjectSet("ToR112-6a", OBJPROP_XDISTANCE, 370); ObjectSet("ToR112-6a", OBJPROP_YDISTANCE, 2); //----create 5 min Strong/Weaker/Ranging ObjectCreate("ToR112-6d",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSet("ToR112-6d", OBJPROP_CORNER, 0); ObjectSet("ToR112-6d", OBJPROP_XDISTANCE, 310); ObjectSet("ToR112-6d", OBJPROP_YDISTANCE, 17); if (adx_m5 < ADX_trend_level) { ObjectSetText("ToR112-6d", " RANGING ",8, "Arial Bold",Silver); } else if (adx_m5 > adx_1ago_m5) { ObjectSetText("ToR112-6d", " STRONGER ",8, "Arial Bold",Silver); } else { ObjectSetText("ToR112-6d", " WEAKER ",8, "Arial Bold",Silver); } //+------------------------------------------------------------------+ //| 15 MIN | //+------------------------------------------------------------------+ ObjectCreate("ToR112-7",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-7","15 MIN:", 8, "Arial Bold", LightSteelBlue); ObjectSet("ToR112-7", OBJPROP_CORNER, 0); ObjectSet("ToR112-7", OBJPROP_XDISTANCE, 390); ObjectSet("ToR112-7", OBJPROP_YDISTANCE, 2); //---- create 15 min value ObjectCreate("ToR112-8",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-8", " ADX "+StringSubstr(adx_value_m15,0,5)+" ",9, "Arial Bold",adx_color_m15); ObjectSet("ToR112-8", OBJPROP_CORNER, 0); ObjectSet("ToR112-8", OBJPROP_XDISTANCE, 430); ObjectSet("ToR112-8", OBJPROP_YDISTANCE, 2); //---- create 15 min arrow, squiggle if ranging ObjectCreate("ToR112-8a",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-8a",adx_arrow_m15,9, "Wingdings",adx_color_m15); ObjectSet("ToR112-8a", OBJPROP_CORNER, 0); ObjectSet("ToR112-8a", OBJPROP_XDISTANCE, 495); ObjectSet("ToR112-8a", OBJPROP_YDISTANCE, 2); //----create 15 min Strong/Weaker/Ranging ObjectCreate("ToR112-8d",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSet("ToR112-8d", OBJPROP_CORNER, 0); ObjectSet("ToR112-8d", OBJPROP_XDISTANCE, 435); ObjectSet("ToR112-8d", OBJPROP_YDISTANCE, 17); if (adx_m15 < ADX_trend_level) { ObjectSetText("ToR112-8d", " RANGING ",8, "Arial Bold",Silver); } else if (adx_m15 > adx_1ago_m15) { ObjectSetText("ToR112-8d", " STRONGER ",8, "Arial Bold",Silver); } else { ObjectSetText("ToR112-8d", " WEAKER ",8, "Arial Bold",Silver); } //+------------------------------------------------------------------+ //| 30 MIN | //+------------------------------------------------------------------+ ObjectCreate("ToR112-9",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-9","30 MIN:", 8, "Arial Bold", LightSteelBlue); ObjectSet("ToR112-9", OBJPROP_CORNER, 0); ObjectSet("ToR112-9", OBJPROP_XDISTANCE, 515); ObjectSet("ToR112-9", OBJPROP_YDISTANCE, 2); //---- create 30 min value ObjectCreate("ToR112-10",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-10", " ADX "+StringSubstr(adx_value_m30,0,5)+" ",9, "Arial Bold",adx_color_m30); ObjectSet("ToR112-10", OBJPROP_CORNER, 0); ObjectSet("ToR112-10", OBJPROP_XDISTANCE, 555); ObjectSet("ToR112-10", OBJPROP_YDISTANCE, 2); //---- create 30 min arrow, squiggle if ranging ObjectCreate("ToR112-10a",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-10a",adx_arrow_m30,9, "Wingdings",adx_color_m30); ObjectSet("ToR112-10a", OBJPROP_CORNER, 0); ObjectSet("ToR112-10a", OBJPROP_XDISTANCE, 620); ObjectSet("ToR112-10a", OBJPROP_YDISTANCE, 2); //----create 30 min Strong/Weaker/Ranging ObjectCreate("ToR112-10d",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSet("ToR112-10d", OBJPROP_CORNER, 0); ObjectSet("ToR112-10d", OBJPROP_XDISTANCE, 560); ObjectSet("ToR112-10d", OBJPROP_YDISTANCE, 17); if (adx_m30 < ADX_trend_level) { ObjectSetText("ToR112-10d", " RANGING ",8, "Arial Bold",Silver); } else if (adx_m30 > adx_1ago_m30) { ObjectSetText("ToR112-10d", " STRONGER ",8, "Arial Bold",Silver); } else { ObjectSetText("ToR112-10d", " WEAKER ",8, "Arial Bold",Silver); } if (Show_h1_ADX==true) { //+------------------------------------------------------------------+ //| 1 HOUR | //+------------------------------------------------------------------+ ObjectCreate("ToR112-11",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-11","1 HR:", 8, "Arial Bold", LightSteelBlue); ObjectSet("ToR112-11", OBJPROP_CORNER, 0); ObjectSet("ToR112-11", OBJPROP_XDISTANCE, 640); ObjectSet("ToR112-11", OBJPROP_YDISTANCE, 2); //---- create 15 min value ObjectCreate("ToR112-12",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-12", " ADX "+StringSubstr(adx_value_h1,0,5)+" ",9, "Arial Bold",adx_color_h1); ObjectSet("ToR112-12", OBJPROP_CORNER, 0); ObjectSet("ToR112-12", OBJPROP_XDISTANCE, 670); ObjectSet("ToR112-12", OBJPROP_YDISTANCE, 2); ObjectCreate("ToR112-12a",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-12a",adx_arrow_h1,9, "Wingdings",adx_color_h1); ObjectSet("ToR112-12a", OBJPROP_CORNER, 0); ObjectSet("ToR112-12a", OBJPROP_XDISTANCE, 735); ObjectSet("ToR112-12a", OBJPROP_YDISTANCE, 2); //----create hour min Strong/Weaker/Ranging ObjectCreate("ToR112-12d",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSet("ToR112-12d", OBJPROP_CORNER, 0); ObjectSet("ToR112-12d", OBJPROP_XDISTANCE, 675); ObjectSet("ToR112-12d", OBJPROP_YDISTANCE, 17); if (adx_h1 < ADX_trend_level) { ObjectSetText("ToR112-12d", " RANGING ",8, "Arial Bold",Silver); } else if (adx_h1 > adx_1ago_h1) { ObjectSetText("ToR112-12d", " STRONGER ",8, "Arial Bold",Silver); } else { ObjectSetText("ToR112-12d", " WEAKER ",8, "Arial Bold",Silver); } } if (Show_h4_ADX==true) { //+------------------------------------------------------------------+ //| 4 HOUR | //+------------------------------------------------------------------+ ObjectCreate("ToR112-13",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-13","4 HR:", 8, "Arial Bold", LightSteelBlue); ObjectSet("ToR112-13", OBJPROP_CORNER, 0); ObjectSet("ToR112-13", OBJPROP_XDISTANCE, 760); ObjectSet("ToR112-13", OBJPROP_YDISTANCE, 2); //---- create 15 min value ObjectCreate("ToR112-14",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-14", " ADX "+StringSubstr(adx_value_h4,0,5)+" ",9, "Arial Bold",adx_color_h4); ObjectSet("ToR112-14", OBJPROP_CORNER, 0); ObjectSet("ToR112-14", OBJPROP_XDISTANCE, 790); ObjectSet("ToR112-14", OBJPROP_YDISTANCE, 2); ObjectCreate("ToR112-15",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSetText("ToR112-15",adx_arrow_h4,9, "Wingdings",adx_color_h4); ObjectSet("ToR112-15", OBJPROP_CORNER, 0); ObjectSet("ToR112-15", OBJPROP_XDISTANCE, 855); ObjectSet("ToR112-15", OBJPROP_YDISTANCE, 2); //----create 4hour min Strong/Weaker/Ranging ObjectCreate("ToR112-18d",OBJ_LABEL, WindowFind("ToR 1.12 "), 0, 0); ObjectSet("ToR112-18d", OBJPROP_CORNER, 0); ObjectSet("ToR112-18d", OBJPROP_XDISTANCE, 795); ObjectSet("ToR112-18d", OBJPROP_YDISTANCE, 17); if (adx_h4 < ADX_trend_level) { ObjectSetText("ToR112-18d", " RANGING ",8, "Arial Bold",Silver); } else if (adx_h4 > adx_1ago_h4) { ObjectSetText("ToR112-18d", " STRONGER ",8, "Arial Bold",Silver); } else { ObjectSetText("ToR112-18d", " WEAKER ",8, "Arial Bold",Silver); } } return(0); } //+------------------------------------------------------------------+ //| Common Functions | //+------------------------------------------------------------------+ color assigncolor(double adx_time,double ADX_trend_level,double di_p_time,double di_m_time) { if (adx_time < ADX_trend_level) { return (LightSkyBlue); } else if (di_p_time > di_m_time) { return (Lime); } else {return (Red); } } string AssignArrow (double adx_time, double di_p_time, double di_m_time) { if ((adx_time < ADX_trend_level) && (adx_time != 0)) { return ("h"); } else if (adx_time < ADX_trend_strong ) { if (di_p_time > di_m_time) { return ("ى"); } else { return ("î"); } } else { if (di_p_time > di_m_time) { return ("é"); } else { return ("ê"); } } } //End Function 2-//+------------------------------------------------------------------+//| Trade Assistant |//| TA_1.12.mq4 |//| Copyright © 2008 Tom Balfe |//| |//| This indicator helps you trade by giving you two signals on |//| multiple timeframes. It bases it's recommendations on RSI and |//| stochastics. |//| |//| Version: 1.11 |//| |//| Changelog: |//| |//| 1.12 - fixed RSI code |//| 1.11 - fixed spacing between objects |//| 1.1 - added buy/sell text |//| 1.0 - first version, got arrows working |//| |//+------------------------------------------------------------------+#property copyright "Copyright © 2008 Tom Balfe"#property link "[email protected]"#property indicator_separate_windowint scaleX=120,scaleY=20,offsetX=200,offsetY=4,fontSiz e=8;int period[]={1,5,15,30,60,240};string periodStr[]={"1 MIN:","5 MIN:","15 MIN:","30 MIN:","1 HR:","4 HR:"};string signalNameStr[]={"STOCH","RSI"};//+------------------------------------------------------------------+//| USER ADJUSTABLE STUFF |//+------------------------------------------------------------------+extern string Stochastic_Settings = "=== Stochastic Settings ===";extern int PercentK = 8;extern int PercentD = 3;extern int Slowing = 3;extern string RSI_Settings = "=== RSI Settings ===";extern int RSIP1 = 14;extern int RSIP2 = 70; extern string My_Symbols = "=== Wingdings Symbols ===";extern int sBuy = 233;extern int sSell = 234;extern int sWait = 54;//+------------------------------------------------------------------+//| Initialization function |//+------------------------------------------------------------------+int init() { //-- indicator short name IndicatorShortName("Trade Assistant 1.12 "); return(0); }//+------------------------------------------------------------------+//| Deinitialization function |//+------------------------------------------------------------------+int deinit() { //-- need to delete objects should user remove indicator ObjectsDeleteAll(0,OBJ_LABEL); //-- delete timeframe text labels for(int x=0;x<6;x++) for (int y=0;y<2;y++) { ObjectDelete("tPs"+x+y); } //-- delete indicator readouts for (x=0;x<6;x++) for (y=0;y<2;y++) { ObjectDelete("dI"+x+y); } //-- delete indicator text labels for(y=0;y<2;y++) { ObjectDelete("tInd"+y); } for (x=0;x<6;x++) for (y=0;y<2;y++) { ObjectDelete("tI"+x+y); } return(0); }//+------------------------------------------------------------------+//| MAIN LOOP |//+------------------------------------------------------------------+int start() { //--- create timeframe text labels for (int x=0;x<6;x++) for (int y=0;y<2;y++) { ObjectCreate("tPs"+x+y,OBJ_LABEL,WindowFind("Trade Assistant 1.12 "),0,0); ObjectSetText("tPs"+x+y,periodStr[x],fontSize,"Arial Bold",LightSteelBlue); ObjectSet("tPs"+x+y,OBJPROP_CORNER,0); ObjectSet("tPs"+x+y,OBJPROP_XDISTANCE,x*scaleX+off setX); ObjectSet("tPs"+x+y,OBJPROP_YDISTANCE,y*scaleY+off setY); } //--- create indicator text labels for (y=0;y<2;y++) { ObjectCreate("tInd"+y,OBJ_LABEL,WindowFind("Trade Assistant 1.12 "),0,0); ObjectSetText("tInd"+y,signalNameStr[y],fontSize,"Arial Bold",PaleGoldenrod); ObjectSet("tInd"+y,OBJPROP_CORNER,0); ObjectSet("tInd"+y,OBJPROP_XDISTANCE,offsetX-55); ObjectSet("tInd"+y,OBJPROP_YDISTANCE,y*scaleY+offs etY); } //--- create blanks for arrows for (x=0;x<6;x++) for (y=0;y<2;y++) { ObjectCreate("dI"+x+y,OBJ_LABEL,WindowFind("Trade Assistant 1.12 "),0,0); ObjectSetText("dI"+x+y," ",10,"Wingdings",Goldenrod); ObjectSet("dI"+x+y,OBJPROP_CORNER,0); ObjectSet("dI"+x+y,OBJPROP_XDISTANCE,x*scaleX+(off setX+80)); // scaleX == 120, offsetX == 200 ObjectSet("dI"+x+y,OBJPROP_YDISTANCE,y*scaleY+offs etY); } //--- create blanks for text for (x=0;x<6;x++) for (y=0;y<2;y++) { ObjectCreate("tI"+x+y,OBJ_LABEL,WindowFind("Trade Assistant 1.12 "),0,0); ObjectSetText("tI"+x+y,"TEST",10,"Arial Bold",Goldenrod); ObjectSet("tI"+x+y,OBJPROP_CORNER,0); ObjectSet("tI"+x+y,OBJPROP_XDISTANCE,x*scaleX+(off setX+45)); // scaleX == 120, offsetX == 200 ObjectSet("tI"+x+y,OBJPROP_YDISTANCE,y*scaleY+offs etY); } //--- stochastics arrows for(x=0;x<6;x++) { if((iStochastic(NULL,period[x],PercentK,PercentD,Slowing,MODE_SMA,0,MODE_MAIN,0) ) > (iStochastic(NULL,period[x],PercentK,PercentD,Slowing,MODE_SMA,0,MODE_SIGNAL, 0))) ObjectSetText("dI"+x+"0",CharToStr(sBuy),fontSize, "Wingdings",Lime); else if ((iStochastic(NULL,period[x],PercentK,PercentD,Slowing,MODE_SMA,0,MODE_SIGNAL, 0)) > (iStochastic(NULL,period[x],PercentK,PercentD,Slowing,MODE_SMA,0,MODE_MAIN,0) )) ObjectSetText("dI"+x+"0",CharToStr(sSell),fontSize ,"Wingdings",Red); else ObjectSetText("dI"+x+"0",CharToStr(sWait),10,"Wing dings",Khaki); } //--- stochastics text for(x=0;x<6;x++) { if((iStochastic(NULL,period[x],PercentK,PercentD,Slowing,MODE_SMA,0,MODE_MAIN,0) ) > (iStochastic(NULL,period[x],PercentK,PercentD,Slowing,MODE_SMA,0,MODE_SIGNAL, 0))) ObjectSetText("tI"+x+"0"," BUY",9,"Arial Bold",Lime); else if ((iStochastic(NULL,period[x],PercentK,PercentD,Slowing,MODE_SMA,0,MODE_SIGNAL, 0)) > (iStochastic(NULL,period[x],PercentK,PercentD,Slowing,MODE_SMA,0,MODE_MAIN,0) )) ObjectSetText("tI"+x+"0","SELL",9,"Arial Bold",Red); else ObjectSetText("tI"+x+"0","WAIT",9,"Arial Bold",Khaki); } //--- RSI arrows for(x=0;x<6;x++) { if ((iRSI(NULL,period[x],RSIP1,PRICE_TYPICAL,0)) > (iRSI(NULL,period[x],RSIP2,PRICE_TYPICAL,0))) ObjectSetText("dI"+x+"1",CharToStr(sBuy),fontSize, "Wingdings",Lime); else if ((iRSI(NULL,period[x],RSIP2,PRICE_TYPICAL,0)) > (iRSI(NULL,period[x],RSIP1,PRICE_TYPICAL,0))) ObjectSetText("dI"+x+"1",CharToStr(sSell),fontSize ,"Wingdings",Red); else ObjectSetText("dI"+x+"1",CharToStr(sWait),10,"Wing dings",Khaki); } //--- RSI text for(x=0;x<6;x++) { if ((iRSI(NULL,period[x],RSIP1,PRICE_TYPICAL,0)) > (iRSI(NULL,period[x],RSIP2,PRICE_TYPICAL,0))) ObjectSetText("tI"+x+"1"," BUY",9,"Arial Bold",Lime); else if ((iRSI(NULL,period[x],RSIP2,PRICE_TYPICAL,0)) > (iRSI(NULL,period[x],RSIP1,PRICE_TYPICAL,0))) ObjectSetText("tI"+x+"1","SELL",9,"Arial Bold",Red); else ObjectSetText("tI"+x+"1","WAIT",9,"Arial Bold",Khaki); } return(0); } //+------------------------------------------------------------------+ //| END MAIN LOOP | //+------------------------------------------------------------------+ الف شكر والله يجيزيه خير الذي يساعدني
- 20-03-2008, 06:18 PM #2
رد: طلب مساعده للحصول علي هذا المؤشر
انت جبت الكود هذا من وين
ممكن الموقع عشان ندخل الكود ونعمله كومبيل لانه هدا كود المؤشر
- 20-03-2008, 06:26 PM #3
رد: طلب مساعده للحصول علي هذا المؤشر
الف شكر أخي صاحب السمؤ
احد الاخوه جزاه الله خير قام بالواجب واليكم المؤشرات كامله حسب الصوره المرفقه
المواضيع المتشابهه
-
ممكن مساعده فى المؤشر ده
By cHeEtOs in forum برمجة المؤشرات واكسبرتات التداول - Experts Advisor EAمشاركات: 4آخر مشاركة: 02-05-2010, 11:56 PM -
ممكن مساعده هل هذا المؤشر موجود عند احد؟
By ،،،TakePoints in forum برمجة المؤشرات واكسبرتات التداول - Experts Advisor EAمشاركات: 5آخر مشاركة: 10-02-2010, 11:10 PM -
ارجوا مساعده فى هذا المؤشر
By ahmedamer in forum برمجة المؤشرات واكسبرتات التداول - Experts Advisor EAمشاركات: 1آخر مشاركة: 01-08-2009, 01:48 PM -
مساعده: احتاج هذا المؤشر
By mohamed saleh in forum سوق تداول العملات الأجنبية والسلع والنفط والمعادنمشاركات: 3آخر مشاركة: 26-06-2007, 10:59 PM