π 44 Ronins CryptoForex EA - Complete Documentation
β

44 RONINS EA β Official User Documentation
Expert Advisor for MetaTrader 5 | Version 2.00 | Copyright 2025, 44 Ronins
β
44 Ronins EA is a sophisticated, multi-layered grid Expert Advisor built for MetaTrader 5. It combines dynamic pending order placement, flexible lot sequencing, intelligent trade management, and a proprietary Dynamic Drawdown Brake System to deliver a comprehensive automated trading solution.
The EA is designed for traders who require fine-grained control over grid spacing, lot progression, risk management, and drawdown mitigation β all within a single, cohesive system.
β
β¦ Key Capabilities
- Grid-based pending order placement with up to 11 order type combinations
- 7 lot-sizing sequences: Same, Linear, GP, Fibonacci, Triangle, Square, Cube
- 7 grid-spacing sequences with identical flexibility
- Dynamic Drawdown Brake System β automated hedging response to drawdown events
- Trailing stop and breakeven management for both normal and hedge positions
- Auto-scaling for lot size, order count, and price ranges
- Daily profit target and maximum drawdown circuit breakers
- Account licence and expiry management built-in
β
1. How the EA Works
1.1 Grid Placement
On initialisation the EA calculates a grid of pending orders above and/or below the current market price. The first order is placed at a configurable gap (First Order Gap) from the current price; all subsequent orders are spaced according to the selected Grid Type sequence.
When the number of active orders falls below the Deficit Count threshold, or when the price moves beyond the Auto Refresh Level, the pending order grid is automatically rebuilt around the new market price β keeping the EA continuously engaged with the market.
1.2 Lot Progression
Each order in the grid can carry a different lot size based on the selected Lot Type. This allows strategies ranging from flat sizing (Same) through to aggressive multiplier-based approaches (GP, Fibonacci, Cube). The lot size is calculated fresh for each order index in the sequence.
1.3 Trade Lifecycle
Once positions are open the EA continuously monitors floating profit. When combined profit reaches the Target ($) value, all positions are closed and the cycle restarts. Stop-loss, take-profit, trailing stop, and breakeven rules are applied per-position on every tick.
1.4 Dynamic Drawdown Brake System
The Brake System is an advanced risk-mitigation layer. When the account equity drawdown exceeds a configurable threshold, the EA automatically places a hedge trade of equal volume to the net position. The hedge remains open until its profit meets a multiplied recovery target β effectively absorbing drawdown before releasing and allowing normal grid trading to resume.
Each successive drawdown event increments the trigger threshold by a configurable amount, allowing the system to adapt to deepening drawdown scenarios. Full trailing and breakeven management is also applied to hedge positions independently from normal positions.
β
2. Getting Started
2.1 Installation
- Copy the compiled EA (
.ex5) file to: <MetaTrader 5 Data Folder>\MQL5\Experts\
- Restart MetaTrader 5 or press F5 in the Navigator to refresh.
- Drag the EA from the Navigator panel onto the desired chart.
- Configure parameters in the EA properties dialogue and click OK.
2.2 Licence Verification
The EA includes a built-in licence and expiry system. On loading, the EA verifies the current account number against the allowed account list and checks the expiry date. If verification fails, the EA will display an alert and remove itself from the chart.
π© Contact the developer to obtain or renew a licence β see Section 10 for details.
β
3. Input Parameters Reference
3.1 General Settings
| Parameter | Default | Type | Description |
magic | 7192025 | Integer | Unique identifier for this EAβs orders. Change if running multiple instances. |
order_mode | BUY_LIMIT | Enum | Order type combination to place. See Section 4 for the full list. |
lot_type | SAME | Enum | Lot sizing sequence applied across the grid. |
lot | 0.01 | Double | Base lot size for the first order (and all orders when lot_type = SAME). |
lot_multiplier | 2 | Double | Multiplier or adder used with LINEAR and GP lot types. |
calc_mode | USE_POINTS | Enum | Whether pip/grid values are interpreted as Points or Pips (Points Γ 10). |
SL | 0 | Double | Stop loss distance. Set 0 to disable. |
TP | 10 | Double | Take profit distance. Set 0 to disable. |
comment | 44 Ronins EA | String | Comment attached to all orders placed by this EA. |
send_alert | true | Bool | Enable/disable alert popups for key events (target hit, etc.). |
β
3.2 Trailing & Breakeven β Normal Positions
| Parameter | Default | Type | Description |
use_trail_on_norms | true | Bool | Enable trailing stop for normal (non-hedge) positions. |
trailing_start_norms | 20 | Double | Distance price must move into profit before trailing begins. |
trailing_step_norms | 20 | Double | Distance at which the trailing stop is set behind the current price. |
use_breakeven_on_norms | true | Bool | Enable automatic breakeven for normal positions. |
breakeven_at_norms | 20 | Double | Distance price must move into profit before stop is moved to entry. |
breakeven_extra_norms | 0 | Double | Extra pips/points above entry to set the breakeven stop. |
β
3.3 Grid Configuration
| Parameter | Default | Type | Description |
initial_account_mode | ACC_BAL | Enum | Use Account Balance or Account Equity as the starting reference. |
grid_type | SAME | Enum | Grid spacing sequence (mirrors Lot Type options). |
first_gap | 10 | Double | Distance from market price to the first pending order. |
grid | 20 | Double | Base spacing between subsequent orders. |
grid_multiplier | 2 | Double | Multiplier or adder used with LINEAR and GP grid types. |
no_of_orderss | 300 | Integer | Total number of pending orders to place per direction. |
recreate_pending_orders | true | Bool | Automatically rebuild pending orders when deficit threshold is met. |
deficit_count | 20 | Integer | Minimum missing orders required before grid is rebuilt. |
pause_count | 10 | Integer | How many grid recreations are allowed before pausing. Set 0 to disable. |
auto_refresh_level | 10 | Double | Price movement from last reference point required to trigger grid refresh. |
β
3.4 Auto-Scaling β Order Count
| Parameter | Default | Type | Description |
use_auto_scale_pending_no | false | Bool | Enable automatic increase/decrease of the order count. |
auto_scale_pending_increment | 6 | Integer | Amount to add/subtract from order count on each scale event. |
auto_scale_pending_move | 100 | Double | Price move (pips/points) required to trigger an order-count scale event. |
β
3.5 Auto-Scaling β Volume
| Parameter | Default | Type | Description |
auto_scale_active_buy_vol | false | Bool | Automatically increase maximum active buy volume as price rises. |
buy_size | 0.1 | Double | Maximum total active buy volume. Set 0 to disable the cap. |
auto_buy_size | 0.05 | Double | Volume increment added per buy scaling event. |
auto_buy_size_move | 10 | Double | Price move required to trigger a buy volume scale event. |
auto_scale_active_sell_vol | false | Bool | Automatically increase maximum active sell volume as price falls. |
sell_size | 0.1 | Double | Maximum total active sell volume. Set 0 to disable the cap. |
auto_sell_size | 0.05 | Double | Volume increment added per sell scaling event. |
auto_sell_size_move | 10 | Double | Price move required to trigger a sell volume scale event. |
β
3.6 Auto-Scaling β Range & Lot Size
| Parameter | Default | Type | Description |
upper_range | 0 | Double | Upper price boundary for order placement. Orders outside range are skipped. Set 0 to disable. |
lower_range | 0 | Double | Lower price boundary for order placement. |
use_auto_scale_range | false | Bool | Dynamically expand the range as price moves. |
auto_scale_range_move | 10 | Double | Price move (pips) required to expand range boundary. |
use_auto_scale | false | Bool | Enable lot-size auto-scaling based on price movement. |
auto_lot_increment | 0.01 | Double | Lot size added or removed per auto-scale event. |
auto_scale_price_move | 100 | Double | Price move required to trigger a lot-size scale event. |
max_auto_scale_lot | 0.5 | Double | Upper limit for auto-scaled lot size. |
β
3.7 Profit Order Replacement (POR)
| Parameter | Default | Type | Description |
buy_por | 0 | Double | Minimum distance to nearest buy order before grid is re-centred. Set 0 to disable. |
sell_por | 0 | Double | Minimum distance to nearest sell order before grid is re-centred. Set 0 to disable. |
β
3.8 Risk & Cycle Management
| Parameter | Default | Type | Description |
target | 50 | Double | Net profit target ($) for one full cycle. Closes all trades when reached. |
max_target_hit | 0 | Integer | Maximum number of target hits per day. Set 0 for unlimited. |
profitable_trades | 10 | Integer | Close all profitable positions when this many are simultaneously in profit. Set 0 to disable. |
lossing_trades | 10 | Integer | Close all profitable positions when this many are simultaneously in loss. Set 0 to disable. |
max_ddd | 10 | Double | Maximum drawdown (%) before all trades are closed and EA pauses. Set 0 to disable. |
daily_tp | 1 | Double | Daily profit target (% of balance). Closes all trades when reached. Set 0 to disable. |
resume_duration | 24 | Double | Minutes to pause before resuming after a target or drawdown trigger. |
β
4. Order Type Modes
The order_mode parameter determines which combination of pending order types the EA places on each cycle.
| Mode | Description |
BUY_LIMIT | Places buy limit orders below market price only. |
BUY_STOP | Places buy stop orders above market price only. |
SELL_LIMIT | Places sell limit orders above market price only. |
SELL_STOP | Places sell stop orders below market price only. |
BUY_LIMIT_AND_SELL_LIMIT | Places buy limits below and sell limits above simultaneously (range trading). |
BUY_STOP_AND_SELL_STOP | Places buy stops above and sell stops below (breakout trading). |
BUY_STOP_AND_SELL_LIMIT | Places buy stops above and sell limits above. |
BUY_LIMIT_AND_BUY_STOP | Places buy limits below and buy stops above (combined buy grid). |
BUY_LIMIT_AND_SELL_STOP | Places buy limits below and sell stops below. |
SELL_LIMIT_AND_SELL_STOP | Places sell limits above and sell stops below (combined sell grid). |
BUY_SELL_LIMIT_AND_BUY_SELL_STOP | Full four-way grid: buy/sell limits and buy/sell stops simultaneously. |
β
5. Lot Type & Grid Type Sequences
Both lot_type and grid_type share the same seven sequence options. The index (i) represents the orderβs position in the sequence, starting at 0.
| Type | Formula | Behaviour |
SAME | lot | Every order uses the same base lot/grid size. Simple and predictable. |
LINEAR | lot + (i Γ multiplier) | Each successive order increases by a fixed increment. Arithmetic progression. |
GP | lot Γ multiplier^i | Exponential growth. Each order is multiplied by the multiplier. Martingale-style. |
FIBONACCI | F(i) Γ lot | Lot/grid follows the Fibonacci sequence (1, 1, 2, 3, 5, 8β¦). Natural progression. |
TRIANGLE | (n(n+1) / 2) Γ lot | Triangular numbers (1, 3, 6, 10, 15β¦). Moderate acceleration. |
SQUARE | nΒ² Γ lot | Square numbers (1, 4, 9, 16, 25β¦). Faster acceleration than Triangle. |
CUBE | nΒ³ Γ lot | Cubic numbers (1, 8, 27, 64β¦). Very aggressive escalation β use with caution. |
β
6. Dynamic Drawdown Brake System
The Brake System is the EAβs core risk-management layer. It monitors account equity in real time and, when a drawdown threshold is crossed, automatically places a hedge trade to offset and recover the loss.
6.1 Brake System Parameters
| Parameter | Default | Type | Description |
use_brake_system | true | Bool | Master switch for the entire Brake System. |
brake_initial_trigger | 50 | Double | Initial equity drawdown ($) that activates the first brake. |
brake_multiplier | 1.5 | Double | Hedge profit must reach (drawdown Γ multiplier) before brake releases. |
brake_buffer_increment | 20 | Double | Amount added to the trigger threshold after each brake event. |
brake_full_recovery_threshold | 0.5 | Double | Equity recovery % at which all positions are closed (if close-all-on-recovery is enabled). |
β
6.2 Hedge Trade Settings
| Parameter | Default | Type | Description |
hedge_SL | 0 | Double | Stop loss for standard brake hedge orders. Set 0 to disable. |
hedge_TP | 0 | Double | Take profit for standard brake hedge orders. Set 0 to disable. |
max_dd_hedge_SL | 0 | Double | Stop loss applied when hedge is triggered by max drawdown condition. |
max_dd_hedge_TP | 0 | Double | Take profit applied when hedge is triggered by max drawdown condition. |
maxdd_increament_after_BE | 1 | Double | Multiplier applied to max drawdown level after breakeven is hit. |
β
6.3 Trailing & Breakeven β Hedge Positions
| Parameter | Default | Type | Description |
use_trail_on_hedge | true | Bool | Enable trailing stop for brake hedge positions. |
trailing_start | 20 | Double | Distance price must move in profit before hedge trailing begins. |
trailing_step | 20 | Double | Distance at which the hedge trailing stop is set. |
use_breakeven_on_hedge | true | Bool | Enable breakeven management for hedge positions. |
breakeven_at | 20 | Double | Distance into profit before breakeven is applied to the hedge. |
breakeven_extra | 0 | Double | Extra pips/points above entry for hedge breakeven stop. |
use_maxdd_breakeven_on_hedge | true | Bool | Apply breakeven logic to max-drawdown hedge positions. |
maxdd_breakeven_at | 20 | Double | Profit distance required before max-DD hedge breakeven applies. |
maxdd_breakeven_extra | 0 | Double | Extra pips above entry for max-DD hedge breakeven. |
β
6.4 Brake System β Logic Flow
| Step | Action |
| Step 1 | Every tick: current equity is compared to the reference equity (set at cycle start). |
| Step 2 | If equity has fallen by β₯ brake_initial_trigger ($), the Brake is activated. |
| Step 3 | The EA calculates the net open position (buy volume minus sell volume). |
| Step 4 | A hedge trade equal in size to the net position is placed in the opposite direction. |
| Step 5 | All pending orders are deleted. Normal trading pauses. |
| Step 6 | The hedge tradeβs profit is monitored every tick. |
| Step 7 | When hedge profit β₯ (drawdown at trigger Γ brake_multiplier), the hedge is closed. |
| Step 8 | Trigger threshold increments by brake_buffer_increment. Normal trading resumes. |
β
7. Example Configurations
Example 1 β Conservative Range Trading
Suitable for: Ranging instruments, H1 timeframe, lower risk appetite.
| Parameter | Value |
order_mode | BUY_LIMIT_AND_SELL_LIMIT |
lot_type | SAME |
lot | 0.01 |
grid | 20 |
no_of_orderss | 20 |
target | 30 |
use_brake_system | true |
brake_initial_trigger | 30 |
brake_multiplier | 1.5 |
max_ddd | 10 |
daily_tp | 2 |
This configuration places symmetrical buy and sell limit orders around the current price with flat lot sizing. The small target and daily TP cap control total exposure, while the Brake System provides a safety net against larger swings.
β
Example 2 β Breakout with Linear Escalation
Suitable for: Trending markets, breakout strategies, moderate risk.
| Parameter | Value |
order_mode | BUY_STOP_AND_SELL_STOP |
lot_type | LINEAR |
lot | 0.01 |
lot_multiplier | 0.01 |
grid | 15 |
grid_type | LINEAR |
grid_multiplier | 5 |
no_of_orderss | 10 |
use_trail_on_norms | true |
trailing_start_norms | 30 |
trailing_step_norms | 20 |
use_brake_system | true |
brake_initial_trigger | 50 |
brake_multiplier | 2 |
Buy and sell stops are placed above and below the market to catch breakouts. Both lot size and grid spacing grow linearly, so orders further from entry capture larger moves with increasing size. Trailing stops lock in profits as the breakout extends.
β
Example 3 β Fibonacci Recovery Grid
Suitable for: Experienced traders, higher capitalised accounts, higher risk tolerance.
| Parameter | Value |
order_mode | BUY_LIMIT |
lot_type | FIBONACCI |
lot | 0.01 |
grid | 20 |
no_of_orderss | 8 |
target | 100 |
use_brake_system | true |
brake_initial_trigger | 80 |
brake_multiplier | 1.5 |
use_breakeven_on_norms | true |
breakeven_at_norms | 30 |
Buy limits placed below market using Fibonacci lot sequencing. As price dips further, later orders carry significantly larger sizes, allowing a modest recovery move to return the cycle to profit. Breakeven management protects early orders that fill profitably.
β οΈ Risk Warning: Fibonacci, Square, and Cube lot types escalate quickly. Ensure adequate capital and always test on a demo account first.
β
8. Best Practices & Tips
- Always demo test first β validate your configuration on a demo account before going live.
- Set
max_ddd to a realistic drawdown limit (e.g. 10β20%) to prevent runaway losses.
- Use
daily_tp to lock in profits and prevent overtrading on volatile days.
- Limit order count with aggressive lot types β when using GP or Cube, keep
no_of_orderss small (5β10). Lot sizes grow rapidly and margin requirements can escalate unexpectedly.
- Set a non-zero
resume_duration to give markets time to settle after a drawdown or target event before re-engaging.
- Use a unique magic number per chart instance when running on multiple symbols simultaneously.
- Calibrate the Brake System β
brake_initial_trigger is most effective when set to approximately 20β30% of the typical cycle target value.
- Use
upper_range and lower_range to restrict orders to a specific price zone during known support/resistance levels.
β
9. Support & Contact
For technical support, EA modifications, custom development, or licence enquiries, please contact the developer directly:
β
44 Ronins EA β Version 2.00 β Copyright 2025, 44 Ronins. All rights reserved.