Home > Programming > Mt4 Entry/exit Ea

Mt4 Entry/exit Ea

December 19th, 2009

I need to create an EA the enters trade based on the agreement of a number of MT4 custom indicators (6-8). Basically
1- Entry: when all indicators agree enter long/short position. Place stop loss at the value of one of the indicators or at highes high 2/lowest low 2 (this will be decided later)
2- Exit: the Ea should manage the trade after initializing it. The exit will be based on one of the custom indicators. The indicator paint an arrow (up or down) I need the EA to move the stop to the low or high of the bar where the first arrow appears after the trade is open. If a new arrow appeared the EA will repeat the process.

Important Notes:
1- The indicator print arrow up/down intra-bar i.e. before the bar close. The EA should be “wise enough” to act on the signal only after the current bar close moving the stop to the low of the bar if there is an open long trade and there is an arrow after the bar close and moving the stop to the high of the bar if there is an open short trade and there is an up arrow after the bar close..
2- The trade will have an initial stop loss and might have a profit target. The EA should act moving the stop according to the rules regardless of wether the trade have a profit target or not and overwriting the current stop loss.
3- The EA should be wise enough also to act only if there is an open trade long or short, if there is no trade the EA shouold do nothing.


Mt4 Entry/exit Ea

Categories: Programming Tags: , , , , , ,
Comments are closed.
Bear