Martingale Osw MT4
- Utilities
- William Oswaldo Mayorga Urduy
- Version: 1.1
- Updated: 2 March 2026
- Activations: 5
User Manual: Advanced Martingale Management and Risk Control System
This professional manual describes the operation, configuration, and visual interface of the Advanced Martingale order management system, designed to automate position recovery and risk management in MetaTrader.
1. Introduction and Purpose
This tool acts as a high-precision order manager whose main logic is cost averaging. Its purpose is to protect and recover trades that move against the initial direction by deploying a network of pending orders to improve the average exit price.
Unlike basic systems, this software incorporates dynamic Break-Even and Trailing Stop algorithms, along with an on-screen control interface for quick manual interventions, ensuring that capital management is always the priority.
2. Parameter Guide (Entry Menu)
Martingale Configuration and Distance
Number of Martingales: Defines the maximum number of hedging orders that the system will allow to be opened after the initial trade.
Distance Type: Allows you to choose between a fixed distance in Points or a dynamic distance based on the ATR (Average True Range) indicator.
Distance Base (Points): If using fixed points, this value defines the initial spacing for the first hedge order.
ATR Period: Calculation period for volatility. A value of 14 is the standard to adapt to recent market cycles and is used in stop-loss orders.
Type of Distance Increase: Determines whether subsequent orders are spaced further apart using a Multiplier (exponential) or an Adder (linear).
Distance Multiplier / Adder: Values to increase the spacing between orders in the series, preventing a small correction from triggering the entire network too soon.
Volume and Risk Management
Volume Multiplier / Adder: Controls how much the lot size increases with each new order (e.g., multiply by 2.0 to apply a classic double-dipping martingale strategy).
Use SL (Martingale End): If activated, the system calculates a global Stop Loss for the entire series, acting as a "short circuit" to protect the account from extreme, irreversible trends.
Magic Number: A unique identifier that allows the system to manage only its own orders without interfering with other strategies the user may have active.
Profit Protection (BE & TSL)
Use BE (Break Even): When the set of orders reaches a predetermined profit, the system moves the Stop Loss to the average price to ensure the trade no longer generates losses.
Use TSL (Trailing Stop): Activates profit tracking. If the price continues to move in your favor, the Stop Loss will "escort" the price a fixed distance (TSL Steps) to maximize profit. This is only triggered if the price exceeds the average price plus the activation distance.
Daily Control and Trading Hours
Stop Profit Positive/Negative: Allows you to set daily maximum profit or loss targets in real money. When these targets are reached, the system liquidates all trades and pauses until the following day.
Use Hourly / Close All After-Hours: Defines the operating time window. If closing after-hours is enabled, the system will not allow open positions overnight or on weekends.
3. Visual Interface and Real-Time Control
The system generates two quick-access buttons at the top of the chart for immediate tactical management:
CloseAll Button: Closes absolutely everything (active positions and pending system orders). Requires manual confirmation to avoid errors.
CloseProgram Button: Removes only pending orders from the martingale network that have not yet been executed, leaving the main position intact.
4. Trading Guide and Workflow
The Trading Cycle
Detection: The system activates upon detecting an open trade in the corresponding currency pair.
Execution: Immediately places pending orders according to the distance setting (Points or ATR).
Recalculation: Each time an order in the network is triggered, the system consolidates the risks of all orders into a new, automatically calculated breakeven point.
Protection: If the series becomes profitable, the Break-Even or Trailing Stop mechanisms are activated to secure the result.
Margin Security: Before executing any order, the system performs a margin validation. If the available capital is insufficient to cover the calculated lot size, the software will automatically adjust the volume to the maximum allowed by the broker to avoid order rejection or a margin call.
5. Optimization and Recommendations
Suggested Timeframes: M15 and H1 are recommended. On 1-minute timeframes, market noise can deplete the martingale levels too quickly.
Market Adaptability: Use the DISTANCE_IN_A option.
