1) The idea of the trading system is as follows
The strategy is based on trading divergence with RSI indicator with some filters.
2) Opening orders
· Buy Order
Case 1: When the RSI forms a Higher Low and the Price forms a Lower Low.
or
Case 2: When the RSI forms a Higher Low and the Price forms an Equal Low.
or
Case 3: When the RSI forms an Equal Low and the Price forms a Lower Low.
or
Case 4: When the RSI forms a Lower Low and the Price forms a Higher Low.
· Sell Order
Case 1: When the RSI forms a Higher High and the Price forms a Lower High.
or
Case 2: When the RSI forms an Equal High and the Price forms a Lower High.
or
Case 3: When the RSI forms a Higher High and the Price forms an Equal High.
or
Case 4: When the RSI forms a Lower High and the Price forms a Higher High.
when one of these cases are validated, the EA must draw on the differents charts windows the trendlines on both price and rsi to know what kind of case we have. this will ensure more effective monitoring of the EA.
3) Filters
· Ma Trailing Stop
A Moving average trailing stop will be activated when the EA will open an order, and after a certain profit point.
· Recovery Filters
A multiply factor will be use for next trade in case of a loss.
· Grid Filter
When a trade is open and go in loss in the opposite direction, after a certain point another order of the same type will be open and so on. And all orders will be close when a certain profit is reach. Of course, a stop loss will be not use when this filter is activated. Only the trailing stop will be activated.
4) Closing orders
- Close buy order: when a buy order is active and the TP is reach or the trailing stop is hit.
- Close Sell order: when a sell order is active and the TP is reach or the trailing stop is hit.
.
5) Input parameters
~RSI parameters group~
-RSI period = 10 (for choose the averaging period for the RSI calculation,10 is an example);
-RSI applied price = PRICE_CLOSE (for the price used for the calculation of the RSI, PRICE_CLOSE is an example);
-RSI timeframes=PERIOD_M15; (for the timeframes used for the calculation of the RSI, PERIOD_M15 is an example).
~Orders parameters group~
-Order volume= 0,5 (the volume used for place order, 0.5 is an example);
-Order Stop Loss=10000 (the stop loss used for the opened order in points, 10000 is an example);
-Order Take Profit=40000(the take profit used for closing an opened order in points, 40000 is an example;
~Trailing ma stop parameters group~
-Trailing ma period = 15 (for choosing the average period of the MA trailing stop; 15 is an example);
-Trailing ma timeframes=PERIOD_M5 (for choosing the timeframes used for the calculation of the MA trailing stop, PERIOD_M5 is an example)
-Trailing profit point needed =10000 (to choose the necessary profit point before activating the trailing stop MA, in points,10000 is an example);
-Distance from Trailing MA=1000 (to set the stop loss at a certain distance from the current level of the trailing my stop loss, in points,1000 is an example);
~Grid filters parameters group~
-Allow grid filter = true (for allowing or not the grid filter, true is an example);
-Grid distance = 3000 (to set the grid distance between the open order and the next order to open when the open order does not go in the expected direction)
-Grid added volume = 0,2 (to choose the volume to add to the previous volume when the grid points are reached for the new order opens. For example, if a sell order of 0,5 lot was opened and is in loss of 3000 points, a new sell order will be opened with 0,5+0,2 so 0,7 lot, and if this order is in loss after 3000 points again a new sell order will be opened with 0,7+0,2 so 0,9 and so on…)
-Grid profit =+2000 (to choose the profit needed in points for closing all grid opened orders).
~Recovery filters parameters group~
-Allow recovery filter = true (for allowing or not the recovery filter, true is an example);
-Recovery factor = 2 (the factor uses for multiply the loss order lot, for the next order, example if a buy order of 0,5 touch the stop loss the next trade will open with 0,5*2=1 lots);
-Successive losses before active = 2 (successive losses needed for applying the recovery factor).
6) Files to send
At the end of the work, I will take the source code mq5 plus the bot file ex5. If an indicator has been built separately to use with the EA, I will take also his the mq5 file.
Check the attached file for the illustrations