
Complete Parameter Guide for Range Master EA: Step-by-Step Configuration and Optimization

"Indigo Range Master: The Ultimate Technical Guide for the Expert Advisor"
Indigo Range Master is an Expert Advisor (EA) designed for trading using advanced strategies like daily range breakouts, mean reversion, and intelligent SMC/ICT-based techniques. While it incorporates modern tools to optimize each entry and manage risk, its foundation lies in a classic and widely-used strategy in financial markets.
📌 Range strategies have been working for decades. They're simple, effective, and still relevant because the market respects certain liquidity patterns.
Timing is Everything!
This EA operates during specific hours, meaning its profitability depends on using it at the right times. Here's how to get the most out of it:
✅ Customize your schedule: Adjust the settings according to your strategy and backtest to find the best trading times.
✅ Reference configuration: We provide you with an optimized configuration, but it's crucial that you adapt it to your analysis and trading style.
✅ Conclusion: If the timing isn't right, the EA will lose effectiveness. Adjust and test to maximize your results! ⏰
Main Features
- Breakout Daily: Catches explosive movements with market execution or pending orders.
- Mean Reversion: Trades pullbacks and false breakouts with dynamic strategies.
- Smart ICT: Calculates ranges using past candles for more precise breakout entries (beta).
- Advanced Time Management: Automatic adjustment based on GMT, Computer, or Broker Server time.
- Customized Stop Loss and Risk: 6 types of SL, drawdown control, and intelligent risk management.
- Total Transparency: Real-time messages, detailed logs, and Telegram/Discord compatibility.
- Intelligent Dynamic Optimization: Automatic adjustments with Walk-Forward Optimization (WFO).
Who is this EA for?
- 👶 Beginners: Predefined configurations for easy use.
- 🧠 Experts: Total control over every setting to adapt to advanced strategies.
📌 PARAMETERS
⚙️ General Settings
🔹 Main Strategy
Choose the main strategy the EA will use to trade.
- Disabled: The EA won't perform any trades.
- Breakout Daily: Daily range breakout strategy. Catches explosive movements when the price exceeds key range levels.
- Mean Reversion: Mean reversion strategy. Trades pullbacks and false breakouts within a defined range.
- ICT Smart: Strategy based on ICT/SMC concepts. Designed as a "bonus" for more experienced users, it uses range calculations and entry levels.
🔹 Project Name
Customize the EA's name to identify it in logs and messages to your social media.
🔹 Magic Number
Unique identifier for each trade, preventing conflicts with other EAs.
🔹 Trading Direction
Define what type of trades the EA will open.
- Buy: Will only open buy trades.
- Sell: Will only open sell trades.
- Both: Will allow both buy and sell trades.
🔹 Simultaneous Trades Limit
Set the maximum number of trades open at the same time.
🔹 Total Trades Limit
Sets the total maximum number of trades that the EA will perform.
🔹 Slippage Filters
Helps avoid executing trades in unfavorable market conditions.
- Maximum Slippage: Defines how many points of slippage are tolerated when executing orders.
🔹 Spread Filter
Filters trades if the spread exceeds the set limit.
Maximum Spread: Depending on the broker and the asset, the spread is expressed in pips.
🔹 Ways to Close Trades
Define how open trades will be closed at the end of the day.
- Do not close: Trades will remain open until they reach a TP/SL or are closed manually.
- Close only losing trades: All trades that are in a loss at the end of the day will be closed automatically.
- Close all trades: All open trades will be closed at the end of the day, regardless of whether they are in profit or loss.
🛡️ Risk Management
🔹 Lot Calculation Method
Define how the lot size will be calculated for trades.
1️⃣ Dynamic Lot Based on Balance:
- Description: Calculates the lot size based on the total account balance, rather than the equity.
- Advantage: Offers stability and more predictable growth in accounts with a high volume of open trades.
- Formula:
Lot = (Current Equity × Risk %) / (Loss per Tick × Ticks to Stop Loss)
2️⃣ Dynamic Lot Based on Equity:
- Description: Automatically adjusts the lot size based on the available equity.
- Advantage: Allows you to adapt the risk to the variation of capital in real-time.
- Formula:
Lot = (Current Equity × Risk %) / (Loss per Tick × Ticks to Stop Loss)
3️⃣ Kelly Criterion Lot Sizing:
- Description: Calculates the lot size using the Kelly criterion, an advanced mathematical strategy that maximizes capital growth over time.
- Advantage: Optimizes risk management based on historical performance.
- Kelly Criterion Formula:
Lot = (Kelly % x Risk % x Current Balance) / (Loss per Tick x Ticks to Stop Loss)
Important Considerations
- Where:
- Kelly % = Win Rate - [(1 - Win Rate) / Profit-Loss Ratio]
- Risk % = User's custom setting.
- Current Balance = Capital available for trading.
- Loss per Tick × Ticks to Stop Loss = Calculation of risk per trade.
✅ Minimum history: For the calculation to be valid, the EA requires at least 5 winning and 5 losing trades. If this condition isn't met, the base lot configured will be used instead of the optimized lot size.
✅ Adjustment with user parameters: The Kelly calculation in this EA isn't pure, but is adjusted with:
- The risk configured by the user (%) (Total Risk).
- The base lot defined in the configuration (Fixed Lot).
- A minimum limit to avoid extremely small or unreal lots.
Recommended for: Advanced traders looking to optimize their long-term growth and who have experience in dynamic risk management.
4️⃣ Fixed Lot: Constant lot size for each trade.
🔹 Total Risk per Trade
Define the percentage you are willing to risk based on the lot type.
- Percentage of Balance/Equity: A dynamic percentage is established that is used to calculate the size of the trade.
🔹 Drawdown Limit
Defines the maximum drawdown value allowed before the EA stops completely.
- Value at 0 = Disabled: If this value is at 0, the drawdown limit is not applied.
🔹 Loss Limit per Trade
A custom brake for each trade. You can set a loss limit, expressed in the terminal's currency.
- Value at 0 = Disabled: If this value is at 0, the loss limit is not applied.
🔹 Break Even
This setting only applies when multiple Take Profit (TP) levels are used.
If the price reaches the first TakeProfit, the EA will move the Stop Loss of the second and third trade to Break Even (no profit or loss).
- Example: If 3 positions are opened and the price reaches the first TP, the SL of operations 2 and 3 will be moved to Break Even to ensure that there are no losses.
🔹 Secure Trades
Protects the profits of trades. If activated, ensures that trades don't lose more than a certain percentage of their profit (0.1-100%).
- Value at 0 = Disabled: If this value is at 0, the protection is deactivated.
Important: Learn how to use it first and combine it with the Break Even, as it could generate conflicts if both are activated with just one operation.
🔹 Stop Loss Calculation Methods
There are different types of Stop Loss that you can configure according to your trading strategy. Each type has a unique approach to protecting your trade and controlling risk.
- Smart Range Exit: Sets the Stop Loss on the opposite side of the analyzed range.
- Fixed Points: The Stop Loss is determined by a fixed number of pips or points, regardless of market fluctuations.
- Percentage: Calculates the Stop Loss as a percentage of the entry price, offering control relative to the size of the trade.
- R:R Ratio Standard: Establishes a standard relationship between Stop Loss and Take Profit.
- Example: If a 1:2 is set, the Stop Loss will be half the value of the Take Profit.
- R:R Ratio Inverse: The Stop Loss is greater than the Take Profit, inverting the common relationship.
- Example: A 2:1 means that the Stop Loss is double the Take Profit.
- ATR Multiplier (ATR de 14 períodos): Uses the ATR (Average True Range) multiplied by a specific value to determine the Stop Loss, adapting to market volatility.
🔹 Stop Loss Value
The Stop Loss value is determined according to the type of Stop Loss chosen. Here we explain how to configure it correctly depending on each option.
- Smart Range: If you select this option, the system will automatically calculate the Stop Loss based on the analyzed range. It is not necessary to specify a value, as the algorithm itself will determine the exit level.
- Fixed Points: Here, you define a fixed value in pips or points. This value is constant and does not depend on market volatility.
- Ratios (R:R): The Stop Loss is established based on the relationship between risk (Stop Loss) and reward (Take Profit).
- Example of 1:1 ratio: The Stop Loss and the Take Profit are matched, meaning they are the same distance from the entry price (e.g., if the Take Profit is 50 pips away, the Stop Loss is also 50 pips away).
- Example of 1:2 or 2:1 ratio: This means one is twice the distance of the other. For instance, the Take Profit could be 100 pips away, with the Stop Loss at 50 pips, or viceversa.
- ATR/Percentage: Specifies a value as a percentage or based on the ATR.
ATR (Average True Range) is used to measure market volatility and calculate the Stop Loss based on that measurement.
- Percentage: The Stop Loss is calculated as a percentage of the entry price, allowing for automatic adjustment based on the size of the trade.
- Example: If you choose 0.5% and the entry price is 1.1000, the Stop Loss will be fixed at 1.0950 (0.5% below the entry price).
🔹 Aggressiveness Levels
Defines how aggressive the EA's operation will be. The 5 aggressiveness levels available are:
- Level 1: Ultra Conservative, prioritizes security with few trades.
- Level 2: Conservative, performs operations with caution.
- Level 3: Moderate, combines risk and security in a moderate way.
- Level 4: Aggressive, maximizes high-risk trades for greater gains.
- Level 5: High Risk, without filters, trades all breakouts.
📈 Trading Configuration
🔹 Take Profit Levels
Define up to 3 Take Profit levels in pips/points to secure progressive gains during the trade. The levels are activated according to the value you determine for each one.
- First Take Profit level: First profit target.
- Second Take Profit level: Second target, which can be set if you want to capture additional gains.
- Third Take Profit level: Third target, the last to ensure additional profits.
If the 2nd and 3rd level is set to 0, that level will be deactivated and won't be used.
Important: The manages Take Profit levels (up to 3) as part of a single "position" across all its functions. Here's how it works:
If you set a maximum of 4 trades and open a position with all 3 TP levels enabled, the EA counts this as 1 position = 3 trades. When opening a second position with 3 TP levels, that adds another 3 trades. At this point, the EA hits its limit (4 trades) even though there are 6 trades in total. Keep this in mind when planning your trading.
🔹 Total Profit Limit
This parameter sets a profit limit, either in your account currency or in the terminal currency. If the EA reaches the configured limit, it will stop opening new trades.
- Value 0 = Disabled.
🔹 Total Loss Limit
Sets a loss limit in your account currency or in the terminal currency. If the EA reaches this limit, all open trades will be closed immediately to avoid further losses.
- Value 0 = Disabled.
🔹 Types of Trailing Stop
Trailing Stops allow you to automatically adjust the Stop Loss as the market moves in your favor. Below, we explain the available options:
- Disabled: No Trailing Stop is applied.
- Trailing Stop: Adjusts the Stop Loss based on a fixed distance defined in pips/points.
- Trailing Profit: Only applies to the 2nd and 3rd trade. Adjusts the Stop Loss to 50% of the original Stop Loss if the price tries to reach the Take Profit levels.
- Trailing Stop and Profit: Combines both methods, adjusting both the Stop Loss and securing profits as the price advances.
🔹 Trailing Stop - Parameters
If you decide to activate the Trailing Stop, you can configure the following parameters:
- Trailing Profit activation distance (New in v1.22): Allows you to define the exact distance between Stop Loss and Take Profit when applying Trailing Profit.
- Trailing Stop Distance: Defines the distance in pips from which the Trailing Stop is activated.
- Trailing Step Distance: Specifies the step with which the Stop Loss is adjusted after the price moves in favor of the trade.
⏰ Time Settings ⏰
Controlling trading hours is crucial to maximizing the effectiveness of the EA.
🔹 Time Types
You can define the type of time that will be used for trades, according to the option that suits you best:
- Server Time - Broker: Uses the terminal time provided by your broker.
- GMT/UTC: Uses the time in GMT (Coordinated Universal Time) format, which is a global standard.
- Local Time: Configures the time of your computer or PC, according to the local time zone where you are located.
🔹 Time Offset
This parameter lets you adjust the time to match your desired time zone. You can set an offset from -12 to +12 hours based on your chosen reference time (local, GMT, or server). This helps the EA adapt to your specific time zone and market conditions.
- The EA is also smart enough to automatically detect time zones and suggest the right offset by analyzing your computer time, server time, and broker settings. This gives you a smoother experience without having to figure out the correct settings yourself.
🔹 Activate Additional Information
Activate extra information about start and end times of trades, trading details, etc.
- Disabled.
- Detailed Information: Extended information (includes additional details about trading data).
🔹 Time Parameters
We've designed the time settings using integers (not strings) so you can optimize them in MetaTrader's Strategy Tester:
Analysis Period:
- Start Time/Minutes: Set when market condition analysis begins (hour and minute)
- End Time/Minutes: Define when analysis stops for the day
Trading Window:
- Start Time/Minutes: Determine when the EA begins opening trades
- End Time/Minutes: Specify when trading stops for the day
These parameters give you precise control over when the EA analyzes the market and executes trades. By using integer values instead of strings, you can include these settings in your optimization tests to find the ideal trading window for your strategy.
🤖 Specific Strategies
🔹 Breakout Daily Strategy
Configure the EA's behavior to execute trades based on daily breakouts. Customize parameters to suit your trading style.
📌 Breakout Direction:
Defines whether the EA will trade in both directions or just one. [Only applies to direct market entries, not Stop orders]
- Single Breakout: The EA only trades in one direction (up or down).
- Both Directions: Breakouts in both directions are activated simultaneously, increasing trading opportunities.
📌 Breakout Entry Type:
Select the type of order that will execute when a breakout occurs.
- Entry Market (Filters): Immediate market entry, with adjustable aggressiveness levels through filters to customize risk.
- Entry Buy/Sell Stop Orders (No filters): Places pending orders at the breakout level, without applying aggressiveness filters, allowing greater flexibility.
- Entry Retest (No filters): Waits for price to return to the Range and close within it before executing the trade on the next breakout, filtering false breakouts and improving accuracy.
📌 Expiration Type (only for Buy/Sell Stop Orders):
Defines how pending orders expire, if you've chosen this option.
- End of Day Expiration: Pending orders automatically expire at the end of the day.
- Specific Time Expiration: Sets a specific time for order expiration.
- No Expiration: Pending orders remain active until executed or manually deleted.
📌 Expiration Time:
If you select Buy/Sell Stop Orders with Specific Time, this parameter defines the time in hours before orders automatically expire.
🔹 Mean Reversion Strategy
Configure this trading strategy focused on price reversion, adapting key parameters to analyze ranges, entry signals, and execution methods.
📌 Trading Style:
Defines the sub-strategy used within mean reversion.
- Mean Reversion Standard: Classic strategy based on the determined range, without additional filters. Ideal for following mean reversion in stable market conditions.
- Smart Breakout: Unlike Daily Breakout, this strategy uses candles from the current timeframe of the symbol to calculate the range and entry levels, without depending on fixed times.
- Re-Entry Range: Strategy centered on re-entering within the range, looking for opportunities after an initial reaction to the level. Ideal for optimizing entry timing.
📌 Signal Type:
Configures how entry signals are generated in the strategy.
- Body Close Signals: Only candle closures are considered to determine range levels, providing clearer signals of price direction.
- Wick Highs/Lows Signals: The extremes of the candles are taken into account, including wicks, to calculate the range and generate broader entry signals.
📌 Range Analysis Period:
Defines the number of candles that will be used to analyze the range and determine reversion levels.
📌 Range Mode:
Establishes how the range is updated in the mean reversion strategy.
- Dynamic Range: The range is updated with each new candle, adjusting reversion levels in real-time.
- Static Range: The range is generated once a day and remains fixed until the next session, ideal for more conservative analysis.
📌 Lookback Period:
Defines the number of past candles considered (based on current price) when starting the EA to calculate the initial range, providing a reference point more adjusted to the current market.
📊 Pyramid Multiplier (Compound Interest/Martingale)
Manages the multiplication of trade size using two distinct methods to adjust the position based on the result of previous trades.
🔹 Pyramid Mode
Defines the type of multiplication applied to trades.
- Compound Interest: Progressively increases position size only after winning trades, optimizing capital growth. This approach leverages accumulated gains to increase the size of future trades without risking more than necessary.
- Martingale: Doubles or increases position size after losing trades, with the goal of quickly recovering previous losses. This mode focuses on quick recovery, increasing trade size so that one win covers all accumulated losses.
🔹 Position Multiplier
Establishes the factor by which trade size is multiplied after each trade, according to the selected mode. This parameter defines how much the trade size increases (or adjusts) with each new transaction, allowing greater flexibility in the approach to capital growth or recovery.
🔹 Maximum Trades Before Reset
Specifies the number of consecutive trades the EA will perform with the same multiplication logic before resetting the multiplication cycle. Upon reaching this number, the EA returns to the base lot size, ensuring that multiplication doesn't continue indefinitely, which helps control risk.
🤖 Walk-Forward Optimization (WFO) – Dynamic Optimization
Dynamic Optimization allows the system to continuously adapt to changing market conditions, improving the accuracy and effectiveness of strategies. Below are the key parameters for its configuration:
🚨 Warning 🚨
Dynamic Optimization is an advanced tool that can be harmful if not configured correctly. Its use is recommended primarily for experienced traders, as improper configuration can generate unwanted results or over-optimization. Make sure you understand the risks before enabling it.
🔹 Enable Optimization
Activates or deactivates continuous system optimization. When enabled, the EA will constantly adjust its parameters, automatically responding to market changes to maintain strategy effectiveness.
🔹 Bars for Optimization
Defines the number of historical candles used in each optimization period. This parameter determines how many previous candles are taken into account to adjust the EA parameters in each optimization cycle, which can influence the system's sensitivity to market changes.
🔹 Bars for Re-Optimization
Specifies the number of candles after which a new optimization is performed. This parameter ensures that the EA constantly adapts to new market conditions without waiting for long periods, improving responsiveness in dynamic environments.
🔹 Population Size
Defines the number of parameter combinations evaluated in each optimization cycle. A larger population size can lead to more thorough evaluation, increasing the chances of finding optimal configurations, but also increases time and resource requirements.
🔹 Number of Iterations
Number of tests executed in each optimization process to find the best configuration.
📌 Parameters for Optimization
If you decide to enable optimization, these parameters will be activated to adjust system behavior. Make sure to configure them correctly, as any error in the format can cause operational problems.
🔹 Period for Filters
Establishes the period used to apply filters in the system, related to the length of the time window used for calculations.
- Format: initial value | minimum value | step | maximum value
- Format example: 20|10|2|50
- Initial Value: 20
- Range: 10 | 50
- Step (Increment): 2
- Interpretation:
- Initial value: 20
- Minimum value: 10
- Maximum value: 50
- Step: 2 (Each increment will be 2 units)
How is it interpreted?
The first value (20) is the initial value.
The second value (10) is the minimum value.
The third value (2) is the increment that will be applied between each change.
The fourth value (50) is the maximum allowed value.
🔹 Filter Multiplier
Adjusts the intensity of filters applied in the strategy.
- Range: 2|1|0.2|4
- Initial value: 2
- Minimum value: 1
- Step (Increment): 0.2
- Maximum value: 4
Interpretation: A larger multiplier reinforces filter selectivity, while a smaller value allows more signals.
🔹 Protection Percentage
Defines the protection percentage applied in the strategy to manage risks.
- Range: 50|10|5|90
- Initial value: 50
- Minimum value: 10
- Increment: 5
- Maximum value: 90
Interpretation: A high value provides greater security by limiting risks, while a low value allows greater exposure.
⚠ Important Warning
Remember: If values are not configured following the strict format, the system may generate errors. Always verify that values are correctly separated by the " | " symbol, as in the examples provided.
📌 News Configuration
This block allows you to configure how the EA will manage operations around news events, weekends, and specific day blocks. Remember that incorrect configuration can cause the EA not to start or automatically deactivate (ExpertRemove).
🔹 News Impact Level
Configures the impact of news that the EA should filter based on the symbol or currency where it's operating.
- Options:
- Disabled: No filters are applied by news impact.
- Medium and High Impact: Only medium and high impact news will be filtered.
- High Impact Only: Only high impact news will be filtered.
👉 News filters only apply to the currency pair or instrument where the EA is operating.
🔹 Time Before and After News
Defines how long before and after news the EA should avoid trading.
Format: The time should be placed in "hh:mm" format, indicating hours and minutes.
Format example: "00:46" (46 minutes before the news)
- Time Before News: Time before the news that the EA should wait before operating.
- Time After News: Time after the news that the EA should wait before operating.
Note: Make sure to follow this format exactly, as any error in the time can cause the EA not to start correctly.
🔹 Trade Closing Mode
Configures when trades should be closed in relation to news and weekends.
- Options:
- Disabled: Trades are not closed automatically.
- Close for News: Closes trades based on the times before and after news, using the previously configured parameters.
- Close for Weekend: Closes trades automatically before the weekend (usually Friday).
- Close for News and Weekend: Closes trades in both cases: according to news times and before the weekend.
🔹 Day Blocking
Defines which days of the week trading should be blocked.
- Options:
- Disabled: Operations are not blocked by days.
- Block Monday: No operations will be performed on Mondays.
- Block Friday: No operations will be performed on Fridays.
- Block Both (Monday and Friday): No operations will be performed on either Mondays or Fridays.
📢 Messaging Integration
Indigo EA has a messaging system designed to capture and send key information about operations. When an operation is opened or closed, relevant data is collected such as:
- Order Type (Buy/Sell)
- Lot Size
- Symbols, Timeframe
- Entry and Exit Price
- Stop Loss (SL) and Take Profit (TP)
- Profit/Loss of the Operation
- Balance
- Commissions, fees, swaps (if any).
This information can be sent to Telegram and/or Discord, with the option to include only messages or also screenshots of the chart at the exact moment of the operation. This allows traders to monitor their activity in real-time without needing to be constantly in front of the terminal.
🔹 Messaging Type
Defines the notification system that the EA will use.
- Options:
- Disabled → No messages or screenshots are sent.
- Enabled (Photos and Messages) → Messages are sent along with screenshots.
- Messages Only → Only messages will be sent.
- Screenshots Only → Only screenshots are sent without messages.
📌 Note: If Discord or Telegram parameters are blank or empty, no notification will be sent to that channel.
🔹 Discord Webhook URL
Discord Webhook URL to receive alerts from the EA.
- Correct Format:
- The URL must start with https://discord.com/api/webhooks/
- If the URL is incorrect or empty, messages will not be sent.
- Example: https://discord.com/api/webhooks/132479543916521546615156/EiDrCZVE.....
If no URL is specified, notifications to Discord will be disabled.
Note: For the EA to send messages to Discord, you must enable WebRequest in Tools → Options → Expert Advisors and add the following address to the list of allowed URLs:
🔹 Telegram Bot Token
Authentication key for the bot that will send messages.
- Correct Format:
- Must follow the proper structure
- If the token is incorrect, the bot will not be able to send messages.
Example: 8131707767:AAGMcMeiUJFymIf4yah4vdfgduR1h4FEU09s
If a Token is not correctly specified, notifications to Telegram will be disabled.
Note: For the EA to send messages to Discord, you must enable WebRequest in Tools → Options → Expert Advisors and add the following address to the list of allowed URLs:
🔹 Telegram Chat ID
Identifier of the Telegram user or group that will receive alerts.
- Correct Format:
- For users, use @Username (example: @indigotradingbot).
- For groups or channels, use the numeric chat_id provided by the bot.
Example: @indigotradingbot
If no ID is specified, notifications to Telegram will be disabled.
⚠ Important Warning
- Incorrect Data → If any credential is misspelled, notifications will not be sent.
- Mandatory Configuration → At least one of the services (Telegram or Discord) must be configured if messaging is enabled.
- Test Before Using → It is recommended to send a test message before trading for real.
- Disabled → If messaging mode is Disabled, no alerts will be sent, even if Telegram or Discord is configured.
📌 Display Options
Customize how information and charts are displayed in the EA.
🔹 Visual Mode
Define which visual elements will appear on screen.
- Disabled ❌ (Nothing is displayed)
- Information Panel 📊 (Shows key data on screen)
- Drawings/Diagrams 📈 (Graphical visualization of the strategy)
- Panel + Drawings 🖼️ (Combines both elements)
🔹 Range Color or Background Image 🎨
You can choose between:
- Analysis Range Color (Customize the color of analysis ranges)
- Trading Range Color (Define the specific color for trade execution ranges)
- Panel color, background color
Take your trading to the next level and trade with confidence in any market! 🔥