Job finished
Specification
🔧 EA Strategy Description for Developer (MT4)
✅ Basic Concept:
The EA trades in a trend-based step cycle. It starts by opening a trade (Buy or Sell) based on the current market trend (determined by indicators). If Take Profit (TP) is hit, the trade closes, and a new trade opens again based on the trend.
If Stop Loss (SL) is hit, the trade closes and a reversal trade of the opposite direction is opened at the same price with the same lot size.
This process continues until a defined number of trades per cycle is completed. Then a new cycle begins.
🔁 Detailed Logic Flow:
-
Start a Cycle:
-
Open a Buy or Sell trade based on indicator-defined trend.
-
Example (Buy):
-
Opening Price: 3300
-
TP: 3309 (9 points above)
-
SL: 3297 (3 points below)
-
-
-
TP Hit:
-
If price reaches 3309, trade closes.
-
A new trade opens immediately in the current trend direction.
-
TP/SL levels reset from new opening price.
-
-
SL Hit:
-
If price hits 3297, trade closes.
-
A new trade of opposite direction (Sell) is opened at 3297.
-
TP: 3288 (9 points in Sell direction)
-
SL: 3300 (3 points against Sell direction)
-
-
-
This logic continues until the specified number of trades in the cycle is completed (e.g., 4 trades). After that, a new cycle begins with a fresh trend check.
⚙️ Customizable Input Parameters (User Inputs):
-
LotSize – Changeable (e.g., 0.01, 0.05, etc.)
-
TP_Points – Changeable Take Profit size (in points, e.g., 90 = 9 pips)
-
SL_Points – Changeable Stop Loss size (in points, e.g., 30 = 3 pips)
-
MaxTradesPerCycle – Changeable number of trades per cycle (e.g., 4, 5)
-
MagicNumber – To allow running on multiple charts simultaneously
-
TradeDirectionSource – Based on custom indicator or built-in trend filter (e.g., MA, RSI crossover, etc.)
📈 Indicator-Based Trend Logic:
-
The first trade of each cycle must follow a trend direction, determined by user-defined indicator logic (to be either hardcoded or optionally plugged in by the user).
-
After each TP, a new trade opens in the updated trend direction.
-
After each SL, the new trade is in the opposite direction from the last trade.
💼 Example Walkthrough:
Cycle Start (Buy based on trend):
-
Entry: 3300 | TP: 3309 | SL: 3297
➡️ Price hits SL at 3297 → Open Sell:
-
Entry: 3297 | TP: 3288 | SL: 3300
➡️ Price hits TP at 3288 → Open new trade based on current trend.
➡️ Repeat until MaxTradesPerCycle = 4 is reached.
➡️ Start new cycle from current price and market trend.
✅ Furthermore:
-
EA must support any trading pair: XAU/USD, EUR/USD, GBP/USD, etc.
-
EA must work on multiple charts simultaneously (with MagicNumber).
-
Should not open duplicate trades at the same price.
-
Should monitor and maintain sequence of trades within a cycle.
🛠 Optional (if available):
-
Add trade comment (e.g., Cycle #, Trade #, Trend direction)
-
Visual markers on chart (entry/exit arrows, TP/SL lines)
-
Custom indicator input for trend (optional plug-in)
-
Option to log cycle statistics (win/loss per cycle, profit)