kapri65 Posted April 16, 2010 Report Share Posted April 16, 2010 Help Please. How can I use the appearance of an arrow to call an order send function. ?? I am using a custom indicator. 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 at the bar when the arrow appeared if iCustom(NULL,0,"Entry",0,0)<(Ask)..... OrderSend........ Thanks Quote Link to comment Share on other sites More sharing options...
Pheniox Posted April 17, 2010 Report Share Posted April 17, 2010 Help Please. How can I use the appearance of an arrow to call an order send function. ?? I am using a custom indicator. 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 at the bar when the arrow appeared if iCustom(NULL,0,"Entry",0,0)<(Ask)..... OrderSend........ Thanks Without having the indy a bit hard to help but: if (SetIndexBuffer(0, 0) >SetIndexBuffer(1, 0) ) Buy=true if (SetIndexBuffer(1, 0) < SetIndexBuffer(0, 0) )Sell =true this is not the proper code to call with Icustom but will give you some direction Pheniox Quote Link to comment Share on other sites More sharing options...
kapri65 Posted April 18, 2010 Author Report Share Posted April 18, 2010 Thanks Pheniox, here you can download the indicator http://www.forexsharing.com/861828 I am trying to code a robot using the signals from that indi and I am stuck with the Icustom call. Quote Link to comment Share on other sites More sharing options...
loopyno Posted April 18, 2010 Report Share Posted April 18, 2010 man if u need MQL assistance you can ask for it here: http://elitepatterns.com Loopyno Quote Link to comment Share on other sites More sharing options...
konorti Posted April 18, 2010 Report Share Posted April 18, 2010 (edited) I havent checked the indicator, but those buffers have values only when the arrows appear, one buffer for buy, one for sell so if the certain buffer value is higher than 0 buy or sell should be sent iCustom(NULL,0,"Entry",0,1) >0 ..... OrderSend....(e.g.:OP_BUY).... iCustom(NULL,0,"Entry",1,1) >0 ..... OrderSend....(e.g.:OP_SELL).... ...,1) ---> it depends on indicator but if repaints on last bar, better to wait to close that bar than do trade Edited April 18, 2010 by konorti Quote Link to comment Share on other sites More sharing options...
kapri65 Posted April 19, 2010 Author Report Share Posted April 19, 2010 ea is working but indicator repaint signals, thanks for your help Quote Link to comment Share on other sites More sharing options...
Lord_Sauron Posted May 15, 2010 Report Share Posted May 15, 2010 try entering on the candle close (the candle with the arrow), it shouldnt repaint after that :P Quote Link to comment Share on other sites More sharing options...
loopyno Posted May 15, 2010 Report Share Posted May 15, 2010 ea is working but indicator repaint signals, thanks for your help Hi I do not get it :D Do you still need help on this? :) Loopyno Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.