Tâche terminée
Spécifications
Strategy Summary
-
Signal Generation (Two-Candle RSI Reversal):
-
Buy Signal:
The EA first waits for a candle where the RSI closes below the buy threshold (30), indicating an oversold condition. Then, on the following candle, it confirms the reversal by checking that the RSI closes above 30. Once this two-candle confirmation occurs, a buy order is triggered. -
Sell Signal:
Similarly, a sell signal is generated when the RSI first closes above the sell threshold (70), showing an overbought condition, and then on the next candle it closes below 70 to confirm a potential downward reversal. -
Position Sizing:
-
The lot size for each trade is calculated using the formula:
Lot size = ((Balance or Equity / 100) × RiskPercent) / 1000)
-
ATR Grid System for Averaging Down/Up:
-
If the market moves against the initial trade, the EA employs an ATR-based grid system. It places additional orders (grid steps) at intervals determined by the ATR using ATRforGrid.
-
Take profit is adjusted with each grid step so that the total points is equal to the original ATRforTP
-
The grid will continue to add orders until the maximum number of grid orders (MaxGrid) is reached.
-
Protective Stop Order When Grid Is Complete:
-
For a Buy Grid:
Once the maximum number of buy orders is reached, the EA places a protective sell stop order at a distance equal to ATRforGrid. The size of the sell stop order is the total volume of the grid. I.e. creating a perfect hedge if reached. -
For a Sell Grid:
Likewise, when the grid consists of sell orders up to, a protective buy stop order is placed. The size is determined by the sum of the open sell trades, covering the combined volume.
-
StopOrder/StopLoss/None:
-
This setting should give the EA the option to use the protective Stop Order or a Stop Loss to close all trades in a grid; or No stop order and no stop loss.
Input Parameters
-
RiskPercent: 0.3
(Percentage used for lot size calculation: Lot size = ((Balance or Equity / 100) × RiskPercent) / 1000) -
TradeMode: Both
(Sets whether the EA places trades in both directions or Sell Only or Buy Only) -
RSI_Period: 14
(Number of periods used in the RSI calculation) -
RSI_BuyThreshold: 30.0
(For a BUY signal, the RSI must first close below 30 and then close above 30) -
RSI_SellThreshold: 70.0
(For a SELL signal, the RSI must first close above 70 and then close below 70) -
ATR_Period: 14
(Number of periods used in the ATR calculation) -
ATRforTP: 1.0
(Multiplier for calculating take profit based on ATR) -
ATRforGrid: 1.0
(Multiplier used to determine the distance between grid orders based on ATR) -
LotMaltiplier: 1.5
(Multiplication of the previous volume) -
MaxGrid: 5
(Maximum number of open grid orders allowed, including the initial trade) -
MaxLot: 10.53
(Maximum volume/lot size of orders) -
StopOrder/StopLoss/None:
(Determines if a stop order, stop loss or neither will be placed when MaxGrid is reached) -
MagicNumber: 12345
(Unique identifier to tag trades opened by this EA) -
TimeStart: 09:00 - Ability to change when the EA starts trading.
-
TimeStop: 22:00 - Ability to change when the EA stops trading.