I would like to develop EA by using both RSI and MACD indicators with optional loss recovery function.
Red-coloured value is variable to be set by the user.
Default value for RSI is (14) and for MACD is (12, 26, 1)
Development background :
The purpose of this EA is to open BUY at the very lowest point of MACD with RSI value application as for pre-requisite. Vice versa, this EA will also open SELL position at the very highest point of MACD with RSI value application as for pre-requisite. At the same time, if the opened position is losing certain pips, the hedge position will appear (set by the user) to protect the losing position. Apart from the above explained function, I would like to add optional loss recovery function. See below details.
--------------
BUY open & close condition:
BUY opening pre-requisite : when RSI (14) value has gone down to below 30 at least once (no matter if it bounces above 30 in the next opening candle)
BUY opening condition : The lowest bottom point of MACD (before it starts heading up)
> For this BUY opening condition, BUY opening pre-requisite must be fulfilled in advance.
BUY closing pre-requisite : when the below 1) or 2) condition is satisfied.
1) when RSI (14) value touches above 50 at least once (no matter if it falls below 50 in the next opening candle)
2) when MACD has crossed the pivot line and stayed in upper (plus) area.
BUY closing condition : The highest upper point of MACD (before it starts heading down)
> For this BUY closing condition, BUY closing pre-requisite must be fulfilled in advance.
Hedge SELL opening condition (to be optional by user) : When the above BUY position is losing more than 50 pips, Hedge SELL is to be opened.
Hedge SELL closing condition : when the below 1) or 2) condition is satisfied.
1) when RSI (14) value touches above 50 at least once (no matter if it falls below 50 in the next opening candle)
2) when MACD has crossed the pivot line and stayed in upper (plus) area.
-------------
SELL open & close condition:
SELL opening pre-requisite : when RSI (14) value reaches above 70 at least once (no matter if it falls below 70 in the next opening candle)
SELL opening condition : The highest upper point of MACD (before it starts heading down)
> For this SELL opening condition, SELL opening pre-requisite must be fulfilled in advance.
SELL closing pre-requisite : when the below 1) or 2) condition is satisfied.
1) when RSI (14) value falls down below 50 at least once (no matter if it bounces above 50 in the next opening candle)
2) when MACD has crossed the pivot line and stayed in bottom (minus) area.
SELL closing condition : The lowest bottom point of MACD (before it starts heading up)
> For this SELL closing condition, SELL closing pre-requisite must be fulfilled in advance.
Hedge BUY opening condition (to be optional by user) : When the above SELL position is losing more than 50 pips, Hedge BUY is to be opened.
Hedge BUY closing condition : when the below 1) or 2) condition is satisfied.
1) when RSI (14) value falls down below 50 at least once (no matter if it bounces above 50 in the next opening candle)
2) when MACD has crossed the pivot line and stayed in bottom (minus) area.
----------------------
Variable options :
1) Magic Number
2) Loss recovery position opening input by user's option (with variable lot sizing) only when the prerequisite is fulfilled.
i.e. If the opened original SELL position (It's not the hedge position) is losing the pips from the user's set pip distance from its entry, the EA will open the loss recovery SELL position with user's customized lot size at another MACD's highest point (same entry condition of first original sell position).
i.e. If the opened original BUY position (It's not the hedge position) is losing the pips from the user's set pip distance from its entry, the EA will open the loss recovery BUY position with user's customized lot size at another MACD's lowest point (same entry condition of first original buy position).
3) Final loss recovery position input with variable pip distance & lot size input from the previous loss recovery position entry.
This is the final loss recovery position opening only.
Together with pip distance condition, entry condition is same as the first and the second entry according to MACD.
4) Trading hours & forced clearance option should be applied.
----------------
If you have any questions regarding this EA development, please let me know.