#property copyright "Copyright © 2009 Russ Horn" #property link "http://www.forexrebellion.com" #property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 Blue extern int x_distance = 7; extern int y_distance = 10; extern int corner = 1; extern color Bullish_Color = Blue; extern color Bearish_Color = Red; int g_color_96 = DimGray; extern bool EmailAlert = FALSE; extern bool PopUpAlert = TRUE; extern bool SoundAlert = TRUE; extern string Sound_File_Name = "alert2.wav"; double gd_120; int gi_128 = 0; string gs_132 = " "; int init() { ObjectDelete("title0"); ObjectDelete("title1"); ObjectDelete("title2"); ObjectDelete("title3"); ObjectDelete("title4"); ObjectDelete("entry1"); ObjectDelete("entry2"); ObjectDelete("entry3"); ObjectDelete("entry4"); ObjectDelete("entryrule1"); ObjectDelete("entryrule2"); ObjectDelete("entryrule3"); ObjectDelete("entryrule4"); ObjectDelete("entryresult1"); ObjectDelete("entryresult2"); ObjectDelete("entryresult3"); ObjectDelete("entryresult4"); ObjectDelete("entrysummary1"); ObjectDelete("entrysummary2"); ObjectDelete("ResultIcon"); return (0); } int deinit() { ObjectDelete("title0"); ObjectDelete("title1"); ObjectDelete("title2"); ObjectDelete("title3"); ObjectDelete("title4"); ObjectDelete("entry1"); ObjectDelete("entry2"); ObjectDelete("entry3"); ObjectDelete("entry4"); ObjectDelete("entryrule1"); ObjectDelete("entryrule2"); ObjectDelete("entryrule3"); ObjectDelete("entryrule4"); ObjectDelete("entryresult1"); ObjectDelete("entryresult2"); ObjectDelete("entryresult3"); ObjectDelete("entryresult4"); ObjectDelete("entrysummary1"); ObjectDelete("entrysummary2"); ObjectDelete("ResultIcon"); return (0); } int start() { int li_0; int li_4; int li_8; int li_12; string ls_unused_16 = ""; double l_close_24 = Close[1]; double l_ima_32 = iMA(NULL, 0, 5, 0, MODE_EMA, PRICE_CLOSE, 6); double l_ima_40 = iMA(NULL, 0, 4, 0, MODE_EMA, PRICE_CLOSE, 1); double l_ima_48 = iMA(NULL, 0, 5, 0, MODE_EMA, PRICE_CLOSE, 1); double l_icustom_56 = iCustom(NULL, 0, "QQE ADV", 0, 1); double l_icustom_64 = iCustom(NULL, 0, "QQE ADV", 1, 1); if (l_close_24 < l_ima_32) { ObjectCreate("entryresult1", OBJ_LABEL, 0, 0, 0); ObjectSetText("entryresult1", " Price trend is BEARISH", 8, "Arial", Bearish_Color); ObjectSet("entryresult1", OBJPROP_CORNER, corner); ObjectSet("entryresult1", OBJPROP_XDISTANCE, x_distance); ObjectSet("entryresult1", OBJPROP_YDISTANCE, y_distance + 50); li_0 = -1; } else { ObjectCreate("entryresult1", OBJ_LABEL, 0, 0, 0); ObjectSetText("entryresult1", " Price trend is BULLISH", 8, "Arial", Bullish_Color); ObjectSet("entryresult1", OBJPROP_CORNER, corner); ObjectSet("entryresult1", OBJPROP_XDISTANCE, x_distance); ObjectSet("entryresult1", OBJPROP_YDISTANCE, y_distance + 50); li_0 = 1; } if (l_ima_40 < l_ima_48) { ObjectCreate("entryresult2", OBJ_LABEL, 0, 0, 0); ObjectSetText("entryresult2", " EMA cross is BEARISH", 8, "Arial", Bearish_Color); ObjectSet("entryresult2", OBJPROP_CORNER, corner); ObjectSet("entryresult2", OBJPROP_XDISTANCE, x_distance); ObjectSet("entryresult2", OBJPROP_YDISTANCE, y_distance + 65); li_4 = -1; } else { ObjectCreate("entryresult2", OBJ_LABEL, 0, 0, 0); ObjectSetText("entryresult2", " EMA cross is BULLISH", 8, "Arial", Bullish_Color); ObjectSet("entryresult2", OBJPROP_CORNER, corner); ObjectSet("entryresult2", OBJPROP_XDISTANCE, x_distance); ObjectSet("entryresult2", OBJPROP_YDISTANCE, y_distance + 65); li_4 = 1; } if (l_icustom_56 < l_icustom_64) { ObjectCreate("entryresult3", OBJ_LABEL, 0, 0, 0); ObjectSetText("entryresult3", " QQE cross is BEARISH", 8, "Arial", Bearish_Color); ObjectSet("entryresult3", OBJPROP_CORNER, corner); ObjectSet("entryresult3", OBJPROP_XDISTANCE, x_distance); ObjectSet("entryresult3", OBJPROP_YDISTANCE, y_distance + 80); li_8 = -1; } else { ObjectCreate("entryresult3", OBJ_LABEL, 0, 0, 0); ObjectSetText("entryresult3", " QQE cross is BULLISH", 8, "Arial", Bullish_Color); ObjectSet("entryresult3", OBJPROP_CORNER, corner); ObjectSet("entryresult3", OBJPROP_XDISTANCE, x_distance); ObjectSet("entryresult3", OBJPROP_YDISTANCE, y_distance + 80); li_8 = 1; } if (l_icustom_56 < 50.0) { ObjectCreate("entryresult4", OBJ_LABEL, 0, 0, 0); ObjectSetText("entryresult4", " QQE is BEARISH", 8, "Arial", Bearish_Color); ObjectSet("entryresult4", OBJPROP_CORNER, corner); ObjectSet("entryresult4", OBJPROP_XDISTANCE, x_distance); ObjectSet("entryresult4", OBJPROP_YDISTANCE, y_distance + 95); li_12 = -1; } else { ObjectCreate("entryresult4", OBJ_LABEL, 0, 0, 0); ObjectSetText("entryresult4", " QQE is BULLISH", 8, "Arial", Bullish_Color); ObjectSet("entryresult4", OBJPROP_CORNER, corner); ObjectSet("entryresult4", OBJPROP_XDISTANCE, x_distance); ObjectSet("entryresult4", OBJPROP_YDISTANCE, y_distance + 95); li_12 = 1; } ObjectCreate("title3", OBJ_LABEL, 0, 0, 0); ObjectSetText("title3", "---------------------------------------", 8, "Arial", g_color_96); ObjectSet("title3", OBJPROP_CORNER, corner); ObjectSet("title3", OBJPROP_XDISTANCE, x_distance); ObjectSet("title3", OBJPROP_YDISTANCE, y_distance + 108); int li_72 = li_0 + li_4 + li_8 + li_12; if (li_72 == 4) { ObjectCreate("entrysummary1", OBJ_LABEL, 0, 0, 0); ObjectSetText("entrysummary1", " LONG Entry Confirmed", 8, "Arial Black", Bullish_Color); ObjectSet("entrysummary1", OBJPROP_CORNER, corner); ObjectSet("entrysummary1", OBJPROP_XDISTANCE, x_distance); ObjectSet("entrysummary1", OBJPROP_YDISTANCE, y_distance + 120); ObjectCreate("ResultIcon", OBJ_LABEL, 0, 0, 0); ObjectSetText("ResultIcon", "é", 30, "WingDings", Bullish_Color); ObjectSet("ResultIcon", OBJPROP_CORNER, corner); ObjectSet("ResultIcon", OBJPROP_XDISTANCE, 15); ObjectSet("ResultIcon", OBJPROP_YDISTANCE, y_distance + 1); if (gi_128 != 1 && gd_120 != Time[0]) { gs_132 = "Rebellion: " + Symbol() + " " + Period() + " LONG trade confirmed"; if (PopUpAlert) Alert(gs_132); if (SoundAlert) PlaySound("Sound_File_Name.wav"); if (EmailAlert) SendMail(gs_132, " "); gd_120 = Time[0]; } gi_128 = 1; } if (li_72 == -4) { ObjectCreate("entrysummary1", OBJ_LABEL, 0, 0, 0); ObjectSetText("entrysummary1", " SHORT Entry Confirmed", 8, "Arial Black", Bearish_Color); ObjectSet("entrysummary1", OBJPROP_CORNER, corner); ObjectSet("entrysummary1", OBJPROP_XDISTANCE, x_distance); ObjectSet("entrysummary1", OBJPROP_YDISTANCE, y_distance + 120); ObjectCreate("ResultIcon", OBJ_LABEL, 0, 0, 0); ObjectSetText("ResultIcon", "ê", 30, "WingDings", Bearish_Color); ObjectSet("ResultIcon", OBJPROP_CORNER, corner); ObjectSet("ResultIcon", OBJPROP_XDISTANCE, 15); ObjectSet("ResultIcon", OBJPROP_YDISTANCE, y_distance + 4); if (gi_128 != -1 && gd_120 != Time[0]) { gs_132 = "Rebellion: " + Symbol() + " " + Period() + " SHORT trade confirmed"; if (PopUpAlert) Alert(gs_132); if (SoundAlert) PlaySound("Sound_File_Name.wav"); if (EmailAlert) SendMail(gs_132, " "); gd_120 = Time[0]; } gi_128 = -1; } if (li_72 > -4 && li_72 < 4) { ObjectCreate("entrysummary1", OBJ_LABEL, 0, 0, 0); ObjectSetText("entrysummary1", " NO ENTRY", 9, "Arial Black", Black); ObjectSet("entrysummary1", OBJPROP_CORNER, corner); ObjectSet("entrysummary1", OBJPROP_XDISTANCE, x_distance); ObjectSet("entrysummary1", OBJPROP_YDISTANCE, y_distance + 120); ObjectCreate("ResultIcon", OBJ_LABEL, 0, 0, 0); ObjectSetText("ResultIcon", "L", 30, "WingDings", Black); ObjectSet("ResultIcon", OBJPROP_CORNER, corner); ObjectSet("ResultIcon", OBJPROP_XDISTANCE, 15); ObjectSet("ResultIcon", OBJPROP_YDISTANCE, y_distance + 2); } return (0); }