#property copyright "Copyright © 2007, JCL Capital" #property link "http://www.jcls-forex.com" #property indicator_separate_window #property indicator_buffers 7 #property indicator_color1 LimeGreen #property indicator_color2 Red #property indicator_color3 White #property indicator_color4 Yellow #property indicator_color5 Gold #property indicator_color6 Fuchsia #property indicator_color7 Gold extern bool alerts = FALSE; extern int TrendCCI_Period = 333; extern int EntryCCI_Period = 0; bool gi_92 = FALSE; int gi_96 = 34; int gi_100 = 14; int gi_104 = 34; int gi_108 = 14; int gi_112 = 14; int gi_116 = 6; int gi_120 = 14; int gi_124 = 6; int gi_128 = 14; int gi_132 = 6; int gi_136 = 14; int gi_140 = 6; int gi_144 = 14; int gi_148 = 6; int gi_152 = 14; int gi_156 = 6; int gi_160 = 14; int gi_164 = 6; int gi_unused_168 = 2; int gi_unused_172 = 3; double g_ibuf_176[]; double g_ibuf_180[]; double g_ibuf_184[]; double g_ibuf_188[]; double g_ibuf_192[]; double g_ibuf_196[]; double g_ibuf_200[]; int g_count_204; int g_count_208; bool gi_unused_212 = FALSE; bool gi_unused_216 = FALSE; bool gi_unused_220 = FALSE; bool gi_unused_224 = FALSE; bool gi_228 = FALSE; bool gi_232 = FALSE; bool gi_236 = FALSE; bool gi_240 = FALSE; int g_time_244 = 0; int init() { SetIndexStyle(4, DRAW_LINE, STYLE_SOLID, 2); SetIndexBuffer(4, g_ibuf_176); SetIndexLabel(4, "TrendCCI"); SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID, 2); SetIndexBuffer(0, g_ibuf_184); SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 2); SetIndexBuffer(1, g_ibuf_188); SetIndexStyle(2, DRAW_HISTOGRAM, STYLE_SOLID, 2); SetIndexBuffer(2, g_ibuf_192); SetIndexStyle(3, DRAW_HISTOGRAM, STYLE_SOLID, 2); SetIndexBuffer(3, g_ibuf_196); SetIndexStyle(5, DRAW_LINE, STYLE_SOLID, 2); SetIndexBuffer(5, g_ibuf_180); SetIndexLabel(5, "EntryCCI"); SetIndexStyle(6, DRAW_LINE, STYLE_SOLID, 1); SetIndexBuffer(6, g_ibuf_200); return (0); } int deinit() { Comment(""); return (0); } int start() { int l_period_8; int l_period_12; double l_high_28; double l_low_40; Comment(""); int li_16 = IndicatorCounted(); if (li_16 < 0) return (-1); if (li_16 > 0) li_16--; int l_bars_0 = Bars; if (gi_92 == TRUE) { switch (Period()) { case PERIOD_M1: l_period_8 = gi_96; l_period_12 = gi_100; break; case PERIOD_M5: l_period_8 = gi_104; l_period_12 = gi_108; break; case PERIOD_M15: l_period_8 = gi_112; l_period_12 = gi_116; break; case PERIOD_M30: l_period_8 = gi_120; l_period_12 = gi_124; break; case PERIOD_H1: l_period_8 = gi_128; l_period_12 = gi_132; break; case PERIOD_H4: l_period_8 = gi_136; l_period_12 = gi_140; break; case PERIOD_D1: l_period_8 = gi_144; l_period_12 = gi_148; break; case PERIOD_W1: l_period_8 = gi_152; l_period_12 = gi_156; break; case PERIOD_MN1: l_period_8 = gi_160; l_period_12 = gi_164; } } else { l_period_8 = TrendCCI_Period; l_period_12 = EntryCCI_Period; } IndicatorShortName("True Trend"); for (int l_bars_4 = l_bars_0; l_bars_4 >= 0; l_bars_4--) { g_ibuf_192[l_bars_4] = 0; g_ibuf_188[l_bars_4] = 0; g_ibuf_196[l_bars_4] = 0; g_ibuf_184[l_bars_4] = 0; g_ibuf_200[l_bars_4] = 0; g_ibuf_176[l_bars_4] = iCCI(NULL, 0, l_period_8, PRICE_TYPICAL, l_bars_4); g_ibuf_180[l_bars_4] = iCCI(NULL, 0, l_period_12, PRICE_TYPICAL, l_bars_4); if (g_ibuf_176[l_bars_4] > 0.0 && g_ibuf_176[l_bars_4 + 1] < 0.0) if (g_count_208 > 4) g_count_204 = 0; if (g_ibuf_176[l_bars_4] > 0.0) { if (g_count_204 < 5) { g_ibuf_192[l_bars_4] = g_ibuf_176[l_bars_4]; g_count_204++; } if (g_count_204 == 5) { g_ibuf_196[l_bars_4] = g_ibuf_176[l_bars_4]; g_count_204++; } if (g_count_204 > 5) g_ibuf_184[l_bars_4] = g_ibuf_176[l_bars_4]; } if (g_ibuf_176[l_bars_4] < 0.0 && g_ibuf_176[l_bars_4 + 1] > 0.0) if (g_count_204 > 4) g_count_208 = 0; if (g_ibuf_176[l_bars_4] < 0.0) { if (g_count_208 < 5) { g_ibuf_192[l_bars_4] = g_ibuf_176[l_bars_4]; g_count_208++; } if (g_count_208 == 5) { g_ibuf_196[l_bars_4] = g_ibuf_176[l_bars_4]; g_count_208++; } if (g_count_208 > 5) g_ibuf_188[l_bars_4] = g_ibuf_176[l_bars_4]; } } if (alerts == TRUE) { if (g_time_244 == Time[0]) return (0); if (g_ibuf_176[0] < 0.0 && g_ibuf_176[1] < 0.0 && g_ibuf_176[2] > 0.0) { Alert(Symbol(), " : SHORT Zero Line Cross Entry"); SendMail("GBPJPY : SHORT Zero Line Cross Entry", "Check your Metatrader, a SHORT Zero Line Cross Entry signal occured at " + Hour() + ":" + Minute() + ":" + Seconds() + ". Exit any long Conquer position now."); } if (g_ibuf_176[0] > 0.0 && g_ibuf_176[1] > 0.0 && g_ibuf_176[2] < 0.0) { Alert(Symbol(), " : LONG Zero Line Cross Entry"); SendMail("GBPJPY : LONG Zero Line Cross Entry", "Check your Metatrader, a LONG Zero Line Cross Entry signal occured at " + Hour() + ":" + Minute() + ":" + Seconds() + ". Exit any short Conquer position now."); } if (g_ibuf_176[0] < 0.0 && (iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 0) < 70.0 && iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 1) < 70.0 && iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 2) > 70.0)) { gi_236 = FALSE; gi_240 = FALSE; for (int l_shift_24 = 2; iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, l_shift_24) > 70.0; l_shift_24++) { } l_high_28 = High[iHighest(NULL, 0, MODE_HIGH, l_shift_24, 2)]; Alert(Symbol(), " : SHORT Drop In Entry, SL : ", l_high_28); SendMail("GBPJPY : SHORT Drop In Entry", "Check your Metatrader, a SHORT Drop In Entry signal occured at " + Hour() + ":" + Minute() + ":" + Seconds() + " Place your stop loss at " + l_high_28); } if (g_ibuf_176[0] > 0.0 && (iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 0) > 30.0 && iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 1) > 30.0 && iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 2) < 30.0)) { gi_228 = FALSE; gi_232 = FALSE; for (int l_shift_36 = 2; iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, l_shift_36) < 30.0; l_shift_36++) { } l_low_40 = Low[iLowest(NULL, 0, MODE_LOW, l_shift_36, 2)]; Alert(Symbol(), " : LONG Drop In Entry, SL : ", l_low_40); SendMail("GBPJPY : LONG Drop In Entry", "Check your Metatrader, a LONG Drop In Entry signal occured at " + Hour() + ":" + Minute() + ":" + Seconds() + " Place your stop loss at " + l_low_40); } if (!gi_228 && g_ibuf_176[0] > 0.0 && (iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 0) < 70.0 && iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 1) < 70.0 && iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 2) > 70.0)) { Alert(Symbol(), " : 1st LONG Drop In position Exit"); SendMail("GBPJPY : 1st LONG Drop In position Exit", "Check your Metatrader and close 1/3 of your LONG Drop In position."); gi_228 = TRUE; } if (!gi_236 && g_ibuf_176[0] < 0.0 && (iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 0) > 30.0 && iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 1) > 30.0 && iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 2) < 30.0)) { Alert(Symbol(), " : 1st of SHORT Drop In position Exit"); SendMail("GBPJPY : 1st of SHORT Drop In position Exit", "Check your Metatrader and close 1/3 of your SHORT Drop In position."); gi_236 = TRUE; } if (!gi_232 && g_ibuf_176[0] > 0.0 && (iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 0) < 50.0 && iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 1) < 50.0 && iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 2) > 50.0)) { Alert(Symbol(), " : 2nd LONG Drop In position Exit"); SendMail("GBPJPY : 2nd LONG Drop In position Exit", "Check your Metatrader and close 1/3 of your LONG Drop In position."); gi_232 = TRUE; } if (!gi_240 && g_ibuf_176[0] < 0.0 && (iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 0) > 50.0 && iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 1) > 50.0 && iStochastic(NULL, 0, 34, 3, 3, MODE_SMA, 0, MODE_SIGNAL, 2) < 50.0)) { Alert(Symbol(), " : 2nd SHORT Drop In position Exit"); SendMail("GBPJPY : 2nd SHORT Drop In position Exit", "Check your Metatrader and close 1/3 of your SHORT Drop In position."); gi_240 = TRUE; } g_time_244 = Time[0]; } return (0); }