Hi all programmers,
I need your help to make a EA out of these simple rules to be traded on EurUSD ( can be in any pair, but I prefer EUrUSD due to low spread).
The EA should be MT4 compatible.
These are the rules:
1. Open EurUsd chart 5 min frame.
2. Open a buy or sell order when 5 SMA (close) crosses up (buy) or below (sell) 15 SMA (close).
3. TP 10 pips from tth open price; SL 20 pips from the open price ( no need to include spread).
4. Open 1 lot initially ( this should be adjustible with lot change feature with micro and mini lots options).
5. If the position moves 10 pips below the current one, then open 3 lots in opposite direction.
for exmple, you open initially 1 lot buy eurusd at 1.4550. TP 1.4560; SL 1.4530.
current price at 1.4540; you open 3 lots sell at 1.4540 with TP 1.4530, SL 1.4560.
if this hits 1.4530 you will win.
Suppose, price does not hit TP, but moved back to 1.4550, then EA should open buy position with 6 lots.
so the sequence of lots is: 1, 3,6,12,24,48,96.( Martingale strategy)
the TP 10, SL 20
the EA should continue to open positions in opposite directions till the price reaches one of the TP levels.
This should not take long since it is only 10 pips.
6. Please make the trading hours adjustible ( that is I can specify the trading hours).
Please let me know if you need any clarification.
Thank you so much in advance,
Best,
I need your help to make a EA out of these simple rules to be traded on EurUSD ( can be in any pair, but I prefer EUrUSD due to low spread).
The EA should be MT4 compatible.
These are the rules:
1. Open EurUsd chart 5 min frame.
2. Open a buy or sell order when 5 SMA (close) crosses up (buy) or below (sell) 15 SMA (close).
3. TP 10 pips from tth open price; SL 20 pips from the open price ( no need to include spread).
4. Open 1 lot initially ( this should be adjustible with lot change feature with micro and mini lots options).
5. If the position moves 10 pips below the current one, then open 3 lots in opposite direction.
for exmple, you open initially 1 lot buy eurusd at 1.4550. TP 1.4560; SL 1.4530.
current price at 1.4540; you open 3 lots sell at 1.4540 with TP 1.4530, SL 1.4560.
if this hits 1.4530 you will win.
Suppose, price does not hit TP, but moved back to 1.4550, then EA should open buy position with 6 lots.
so the sequence of lots is: 1, 3,6,12,24,48,96.( Martingale strategy)
the TP 10, SL 20
the EA should continue to open positions in opposite directions till the price reaches one of the TP levels.
This should not take long since it is only 10 pips.
6. Please make the trading hours adjustible ( that is I can specify the trading hours).
Please let me know if you need any clarification.
Thank you so much in advance,
Best,