#property copyright "Copyright ?2006, Nick Bilak"
#property link "http://www.forex-tsd.com/"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Yellow
extern int dist2 = 59;
extern int dist1 = 59;
extern bool alertsOn = TRUE;
extern bool alertsOnCurrent = TRUE;
extern bool alertsMessage = TRUE;
extern bool alertsSound = TRUE;
extern bool alertsEmail = FALSE;
double G_bars_104;
extern int SignalGap = 3;
double G_ibuf_116[];
double G_ibuf_120[];
// E37F0136AA3FFAF149B351F6A4C948E9
int init() {
SetIndexBuffer(0, G_ibuf_116);
SetIndexBuffer(1, G_ibuf_120);
SetIndexStyle(0, DRAW_ARROW);
SetIndexArrow(0, 222);
SetIndexStyle(1, DRAW_ARROW);
SetIndexArrow(1, 221);
return (0);
}
// EA2B2676C28C0DB26D39331A336C6B92
int start() {
int highest_12;
int lowest_16;
double iatr_20;
int Li_0 = IndicatorCounted();
if (Li_0 0) Li_0--;
int Li_8 = Bars - Li_0;
Li_8 = MathMax(Li_8, dist1);
Li_8 = MathMax(Li_8, dist2);
for (int Li_4 = Li_8; Li_4 >= 0; Li_4--) {
highest_12 = iHighest(NULL, Period(), MODE_HIGH, dist2, Li_4 - dist2 / 2);
lowest_16 = iLowest(NULL, Period(), MODE_LOW, dist1, Li_4 - dist2 / 2);
G_ibuf_116[Li_4] = EMPTY_VALUE;
G_ibuf_120[Li_4] = EMPTY_VALUE;
iatr_20 = iATR(NULL, 0, 5, Li_4);
if (Li_4 == highest_12) G_ibuf_116[Li_4] = High[highest_12] + iatr_20 / 2.0;
if (Li_4 == lowest_16) G_ibuf_120[Li_4] = Low[lowest_16] - iatr_20 / 2.0;
if (Li_4 == 0 && G_ibuf_116[Li_4] != 0.0 && G_ibuf_120[Li_4] != EMPTY_VALUE && Bars > G_bars_104) {
Alert("Super_Signal UP Alert " + Symbol() + " on the " + Period() + " minute chart ");
G_bars_104 = Bars;
}
if (Li_4 == 0 && G_ibuf_120[Li_4] != 0.0 && G_ibuf_116[Li_4] != EMPTY_VALUE && Bars > G_bars_104) {
Alert("Super_Signal DOWN Alert " + Symbol() + " on the " + Period() + " minute chart ");
G_bars_104 = Bars;
}
}
return (0);
} |