I just found this code on another forum , and wanted to put it togheter into an indy , but I'm having trouble and wish someone could do it for me , then post the indicator here , here is the code :
#property indicator_separate_window
#property indicator_minimum -1
#property indicator_maximum 1
#property indicator_buffers 8
double buf0[];
double buf1[];
double buf2[];
double buf3[];
double buf4[];
double buf5[];
double buf6[];
double buf7[];
double val[];
int init() {
SetIndexBuffer(0, buf0);
SetIndexStyle(0, DRAW_ARROW, STYLE_SOLID, 0, White);
SetIndexArrow(0, 108);
SetIndexBuffer(1, buf1);
SetIndexStyle(1, DRAW_ARROW, STYLE_SOLID, 0, DarkGray);
SetIndexArrow(1, 108);
SetIndexBuffer(2, buf2);
SetIndexStyle(2, DRAW_ARROW, STYLE_SOLID, 0, LimeGreen);
SetIndexArrow(2, 108);
SetIndexBuffer(3, buf3);
SetIndexStyle(3, DRAW_ARROW, STYLE_SOLID, 0, Green);
SetIndexArrow(3, 108);
SetIndexBuffer(4, buf4);
SetIndexStyle(4, DRAW_ARROW, STYLE_SOLID, 0, Gold);
SetIndexArrow(4, 108);
SetIndexBuffer(5, buf5);
SetIndexStyle(5, DRAW_ARROW, STYLE_SOLID, 0, DarkOrange);
SetIndexArrow(5, 108);
SetIndexBuffer(6, buf6);
SetIndexStyle(6, DRAW_ARROW, STYLE_SOLID, 0, Red);
SetIndexArrow(6, 108);
SetIndexBuffer(7, buf7);
SetIndexStyle(7, DRAW_ARROW, STYLE_SOLID, 0, FireBrick);
SetIndexArrow(7, 108);
return (0);
}
int deinit() {
return (0);
}
int start() {
int i;
ArrayResize(val,Bars);
for(i = 0; i < Bars ; i++) {
val[i] = iADX(Symbol(), 0, 14, PRICE_CLOSE, MODE_MAIN, i);
}
for(i = Bars-3; i >= 0 ; i--) {
buf0[i] = EMPTY_VALUE;
buf1[i] = EMPTY_VALUE;
buf2[i] = EMPTY_VALUE;
buf3[i] = EMPTY_VALUE;
buf4[i] = EMPTY_VALUE;
buf5[i] = EMPTY_VALUE;
buf6[i] = EMPTY_VALUE;
buf7[i] = EMPTY_VALUE;
if (val[i] >= 0) buf0[i] = 0;
if (val[i] >= 15) buf1[i] = 0;
if (val[i] >= 25) buf2[i] = 0;
if (val[i] >= 40) buf3[i] = 0;
if (val[i] >= 50) buf4[i] = 0;
if (val[i] >= 60) buf5[i] = 0;
if (val[i] >= 70) buf6[i] = 0;
if (val[i] >= 80) buf7[i] = 0;
}
return (0);
}
#property indicator_separate_window
#property indicator_minimum -1
#property indicator_maximum 1
#property indicator_buffers 8
double buf0[];
double buf1[];
double buf2[];
double buf3[];
double buf4[];
double buf5[];
double buf6[];
double buf7[];
double val[];
int init() {
SetIndexBuffer(0, buf0);
SetIndexStyle(0, DRAW_ARROW, STYLE_SOLID, 0, White);
SetIndexArrow(0, 108);
SetIndexBuffer(1, buf1);
SetIndexStyle(1, DRAW_ARROW, STYLE_SOLID, 0, DarkGray);
SetIndexArrow(1, 108);
SetIndexBuffer(2, buf2);
SetIndexStyle(2, DRAW_ARROW, STYLE_SOLID, 0, LimeGreen);
SetIndexArrow(2, 108);
SetIndexBuffer(3, buf3);
SetIndexStyle(3, DRAW_ARROW, STYLE_SOLID, 0, Green);
SetIndexArrow(3, 108);
SetIndexBuffer(4, buf4);
SetIndexStyle(4, DRAW_ARROW, STYLE_SOLID, 0, Gold);
SetIndexArrow(4, 108);
SetIndexBuffer(5, buf5);
SetIndexStyle(5, DRAW_ARROW, STYLE_SOLID, 0, DarkOrange);
SetIndexArrow(5, 108);
SetIndexBuffer(6, buf6);
SetIndexStyle(6, DRAW_ARROW, STYLE_SOLID, 0, Red);
SetIndexArrow(6, 108);
SetIndexBuffer(7, buf7);
SetIndexStyle(7, DRAW_ARROW, STYLE_SOLID, 0, FireBrick);
SetIndexArrow(7, 108);
return (0);
}
int deinit() {
return (0);
}
int start() {
int i;
ArrayResize(val,Bars);
for(i = 0; i < Bars ; i++) {
val[i] = iADX(Symbol(), 0, 14, PRICE_CLOSE, MODE_MAIN, i);
}
for(i = Bars-3; i >= 0 ; i--) {
buf0[i] = EMPTY_VALUE;
buf1[i] = EMPTY_VALUE;
buf2[i] = EMPTY_VALUE;
buf3[i] = EMPTY_VALUE;
buf4[i] = EMPTY_VALUE;
buf5[i] = EMPTY_VALUE;
buf6[i] = EMPTY_VALUE;
buf7[i] = EMPTY_VALUE;
if (val[i] >= 0) buf0[i] = 0;
if (val[i] >= 15) buf1[i] = 0;
if (val[i] >= 25) buf2[i] = 0;
if (val[i] >= 40) buf3[i] = 0;
if (val[i] >= 50) buf4[i] = 0;
if (val[i] >= 60) buf5[i] = 0;
if (val[i] >= 70) buf6[i] = 0;
if (val[i] >= 80) buf7[i] = 0;
}
return (0);
}