仕事が完了した
指定
I need this task done before 18:00 GMT 17/04/24
The EA is already written, however trades are opened at the incorrect level as instructed in the inputs and code which would need debugging, trailing stop loss functionality isn't working and my request mentioned below needs implementing.
Assuming the upper RSI level is 70 and the lower RSI level is 30, the logic I am after is simple. When the price is in a decline, and the RSI crosses the lower level (30) I don't want a buy trade to be executed. A buy trade is only executed, when the price does a reversal below the lower RSI level and crosses the lower level (30) upwards again. To ensure a safer entry.
The same logic applies for opening sell positions. When the price is moving upwards and the RSI crosses the upper level (70), a sell positions isn't opened. It's only opened when the price crosses the RSI upper level in a downwards direction. As currently used whenever a buy position is opened a sell position is closed vice versa.
This is further explained in the image below:
In this case I don't want a sell position to be opened at 1 as it crosses the upper level, I want the sell position to be opened at 2. Furthermore, I don't want the sell position to be closed and a buy positions simultaneously opened at 3, I want the sell position to be closed and a buy position to be opened at 4.
Do not delete anything from the EA unless it is responsible for preventing the code from working.
Once completed, backtest (with different RSI period and level inputs) the EA, and show me the trailing stop loss working along with how it opens and closes positions as requested.