Help Please. How can I use the appearance of an arrow to call an order send function. ?? I am using a custom indicaor. code attatched. Thanks

 

OK. Here is the start of the indicator code.

All I need to do is enter a trade on the same bar as when the arrow first appears

############################

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Fuchsia

int gi_76 = 100;
int gi_80 = 75;
int gi_84 = 15;
double g_ibuf_88[];
double g_ibuf_92[];
int gi_96;
int gi_100;

int init() {
IndicatorBuffers(2);
SetIndexStyle(0, DRAW_ARROW);
SetIndexArrow(0, 233);
SetIndexStyle(1, DRAW_ARROW);
SetIndexArrow(1, 234);
SetIndexBuffer(0, g_ibuf_88);
SetIndexBuffer(1, g_ibuf_92);
SetIndexEmptyValue(0, 0.0);
return (0);
#################################}

How can I call the arrow as the trigger for Order Send.

I tried this code, and of course it trades all the time. It looks at the arrow value, and not lat the bar when the arrow appeared

if iCustom(NULL,0,"Entry",0,0)<(Ask)..... OrderSend........

Thanks guys