#property copyright "Dmitry Shakhin AGTS" #property link "" #property indicator_chart_window #property indicator_buffers 4 #property indicator_color1 White #property indicator_color2 White #property indicator_color3 White #property indicator_color4 White int G_period_76 = 5; int G_period_80 = 7; int G_ma_method_84 = MODE_EMA; int G_ma_method_88 = MODE_EMA; int G_applied_price_92 = PRICE_CLOSE; int G_applied_price_96 = PRICE_OPEN; bool Gi_100 = TRUE; string Gs_104 = ""; double G_ibuf_112[]; double G_ibuf_116[]; double G_ibuf_120[]; double G_ibuf_124[]; bool Gi_128 = FALSE; bool Gi_132 = FALSE; // E37F0136AA3FFAF149B351F6A4C948E9 int init() { SetIndexStyle(0, DRAW_NONE); SetIndexStyle(1, DRAW_NONE); SetIndexStyle(2, DRAW_ARROW, EMPTY); SetIndexArrow(2, 233); SetIndexStyle(3, DRAW_ARROW, EMPTY); SetIndexArrow(3, 234); SetIndexBuffer(0, G_ibuf_112); SetIndexBuffer(1, G_ibuf_116); SetIndexBuffer(2, G_ibuf_120); SetIndexBuffer(3, G_ibuf_124); IndicatorDigits(MarketInfo(Symbol(), MODE_DIGITS)); IndicatorShortName("AGTSWINNERSIGNALS(" + G_period_76 + "," + G_period_80); SetIndexLabel(0, "MA(" + G_period_76 + "," + G_period_80 + ")" + G_period_76); SetIndexLabel(1, "MA(" + G_period_76 + "," + G_period_80 + ")" + G_period_80); SetIndexLabel(2, "Buy"); SetIndexLabel(3, "Sell"); return (0); } // EA2B2676C28C0DB26D39331A336C6B92 int start() { string Lsa_0[256]; bool bool_8; bool bool_12; double Ld_16; double Ld_24; int Li_40; for (int index_4 = 0; index_4 < 256; index_4++) Lsa_0[index_4] = CharToStr(index_4); int Li_44 = IndicatorCounted(); if (Li_44 < 0) return (-1); if (Li_44 > 0) Li_44--; int Li_32 = Bars - Li_44; for (int Li_36 = Li_32; Li_36 >= 0; Li_36--) { G_ibuf_112[Li_36] = iMA(NULL, 0, G_period_76, 0, G_ma_method_84, G_applied_price_92, Li_36); G_ibuf_116[Li_36] = iMA(NULL, 0, G_period_80, 0, G_ma_method_88, G_applied_price_96, Li_36); Ld_24 = 0; bool_8 = FALSE; bool_12 = FALSE; Li_40 = Li_36; while (Li_40 <= Li_36 + 9) { Ld_24 += MathAbs(High[Li_40] - Low[Li_40]); Li_40++; } Ld_16 = Ld_24 / 10.0; bool_8 = G_ibuf_112[Li_36 + 1] >= G_ibuf_116[Li_36 + 1] && G_ibuf_112[Li_36 + 2] <= G_ibuf_116[Li_36 + 2] && G_ibuf_112[Li_36] > G_ibuf_116[Li_36]; bool_12 = G_ibuf_112[Li_36 + 1] <= G_ibuf_116[Li_36 + 1] && G_ibuf_112[Li_36 + 2] >= G_ibuf_116[Li_36 + 2] && G_ibuf_112[Li_36] < G_ibuf_116[Li_36]; if (bool_8) { G_ibuf_120[Li_36 + 1] = G_ibuf_116[Li_36 + 1] - 0.75 * Ld_16; G_ibuf_124[Li_36 + 1] = EMPTY_VALUE; bool_12 = FALSE; } if (bool_12) { G_ibuf_124[Li_36 + 1] = G_ibuf_116[Li_36 + 1] + 0.75 * Ld_16; G_ibuf_120[Li_36 + 1] = EMPTY_VALUE; bool_8 = FALSE; } if ((!bool_8) && !bool_12) { G_ibuf_124[Li_36 + 1] = EMPTY_VALUE; G_ibuf_120[Li_36 + 1] = EMPTY_VALUE; } if (bool_8 && (!(Gi_128 == TRUE)) && Li_36 == 0 && Gi_100) { Gi_128 = TRUE; Gi_132 = FALSE; Alert(Symbol(), " ", Period(), "BUY BUY BUY"); if (Gs_104 != "") PlaySound(Gs_104); } if (bool_12 && (!(Gi_132 == TRUE)) && Li_36 == 0 && Gi_100) { Gi_128 = FALSE; Gi_132 = TRUE; Alert(Symbol(), " ", Period(), "SELL SELL SELL"); if (Gs_104 != "") PlaySound(Gs_104); } Comment(Lsa_0[69] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68] + Lsa_0[68]); } return (0); }