Hello guys,
I'm starting programming my EA and i have some questions in my head and maybe you can give me some advices because there aren't so many tutorials on mq4 on the internet :s
Should i structure my EA to make actions in a specific order, process indicators data, manage open orders, manage pending orders, manage possible new orders.
Are these the 4 big blocks, am i missing some other ? and witch is the order should they be ?
When analyzing some EA's i see many time the RefreshRates() before a close order, is this a good practice ? what is the goal of this refresh ?
I am asking this because when the next tick the EA init function will be run again.
When buying or closing by the EA and not in the broker should i use this approach:
IF ( BID > PRICE_I_WANT_TO_CLOSE ) CLOSE_ORDER AT CURRENT PRICE WITH SLIPPAGE
or should i use a different approach ?
I know that when possible i should put this in the broker hands ( I'm working with FxPro and the only allow me to define that 50 pips away, and sometimes 50 is too much for what i want ).
Well these are my questions, if someone have sometime to put me in the right track i appreciate.
Thank you very much!
I'm starting programming my EA and i have some questions in my head and maybe you can give me some advices because there aren't so many tutorials on mq4 on the internet :s
Should i structure my EA to make actions in a specific order, process indicators data, manage open orders, manage pending orders, manage possible new orders.
Are these the 4 big blocks, am i missing some other ? and witch is the order should they be ?
When analyzing some EA's i see many time the RefreshRates() before a close order, is this a good practice ? what is the goal of this refresh ?
I am asking this because when the next tick the EA init function will be run again.
When buying or closing by the EA and not in the broker should i use this approach:
IF ( BID > PRICE_I_WANT_TO_CLOSE ) CLOSE_ORDER AT CURRENT PRICE WITH SLIPPAGE
or should i use a different approach ?
I know that when possible i should put this in the broker hands ( I'm working with FxPro and the only allow me to define that 50 pips away, and sometimes 50 is too much for what i want ).
Well these are my questions, if someone have sometime to put me in the right track i appreciate.
Thank you very much!