Trading Robots for MetaTrader 4

Special Offer!

Time Left to Buy:

Up to 25% OFF

Shopping cart

The cart is empty

MetaTrader 4

Top Rated Products MT4

250 $188 $ KTS poverty killer robot
Thato Modiba
3.85714 5 7 Product
5 500 $4 125 $ Bonnitta EA MT5
Ugochukwu Mobi
4 5 3 Product
Request a price Boom500 Scalper
Vhutshilo Evidence Masithembi
2.33333 5 3 Product

Time based Range Breakout

time-based-range-breakout-logo-200x200-1667
89 $67 $

Free updates are included

We accept crypto: BTC, ETH, BCH and more...

30-Day Money Back Guarantee
100% Guarantee of Originality

Information

Experts
MetaTrader 5
Chi Chung Lam
2.1
10

Overview

Message me if any issue or settings question. I am pleased to help!

Time-based Range Breakout EA – Version 2.00 (English Version)

1. Overview

Time-based Range Breakout EA (v2.00) is an intraday breakout strategy that defines a daily high/low zone based on a specified start time plus duration. Once the price breaks out of this zone, the EA automatically places Buy Stop / Sell Stop orders to capture potential continuation moves. In this version, multiple new calculation modes and logic have been added for Take Profit / Stop Loss (TP/SL), Trailing Stop (TSL), and Range Filter, making the strategy more adaptable to different trading preferences and market conditions.

Key Features

  1. Multiple TP/SL Calculation Methods

    • Range Factor (Range Size × Factor)

    • Distance Percent (relative to entry price)

    • Points (fixed number of points)

  2. TSL / BE with Different Bases

    • Choose Points or Percent (relative to entry price) for TSL and Break Even calculations.

  3. SL = 0 + Risk Percent

    • If you use a risk-based lot mode (non-fixed) and SL Value=0, then for Buy trades the EA treats SL as market price 0, and for Sell trades as current price × 2 for risk/lot calculation purposes.

  4. Rounding Up to an Integer

    • If TSL or BE is set in Points, any decimal values are automatically rounded to the nearest integer.

    • Likewise, when using Points in the Range Filter, the EA will round Range Filter Min/Max decimals to the nearest integer.

2. EA Parameter Explanation (Inputs)

Below are the input parameters grouped as in the code (Volume Settings, Order Settings, etc.), describing each one’s purpose and special behaviors.

2.1 +--- Volume Settings ---+

  1. Volume Mode

    • Description: Determines how the EA calculates lot size. Options:

      • Volume Fixed: A fixed lot size

      • Volume Fixed Per Account Balance: Fixed lots per account balance

      • Volume Risk By Base Balance Percent: Risk percentage using a custom Base Balance

      • Volume Risk By Account Balance Percent: Risk percentage using the current account balance

      • Volume Risk By Account Equity Percent: Risk percentage using the current account equity

  2. Fixed Lots

    • Description: Used if Volume Mode = Volume Fixed (a strictly fixed lot size).

  3. Fixed Lots Per Account Balance

    • Description: If Volume Mode = Volume Fixed Per Account Balance, defines how many lots to trade per a certain amount of account balance (e.g., 0.01 lots per $1000).

  4. Risk Percentage of Base or Account Balance

    • Description: In any “Risk Percent” mode (Volume Risk...), sets the percentage risk per trade. The EA dynamically calculates lot size based on the SL distance.

  5. Base Balance

    • Description: Used only in Volume Risk By Base Balance Percent mode to define a custom base balance for risk calculations.

2.2 +--- Order Settings ---+

  1. Order Buffer Points

    • Description: How many points (pips) to add (or subtract) from the breakout level for buy/sell stop orders. 0 = no buffer.

  2. TP Calculation Method

    • Description: The method for calculating Take Profit (TP). Options:

      • Calculation Method In Range Size x Factor: Range factor

      • Calculation Method In Distance Percent: Distance as a percent of entry price

      • Calculation Method In Points: A fixed number of points

  3. Tp Value

    • Description: The parameter value corresponding to the chosen TP Calculation Method:

      • Range Factor => e.g., 1.0 = 1 × range size

      • Distance Percent => e.g., 1.0 = ±1% of entry price

      • Points => e.g., 50 = 50 points

    • 0 = no TP.

  4. SL Calculation Method

    • Description: The method for calculating Stop Loss (SL). Same categories:

      • Calculation Method In Range Size x Factor

      • Calculation Method In Distance Percent

      • Calculation Method In Points

  5. SL Value

    • Description: The numerical value for SL, corresponding to the SL Calculation Method. 0 = no SL.

      • If the EA is using a risk-based lot mode (non-fixed) and SL Value=0, it will:

        • Buy => SL is treated as market price 0

        • Sell => SL is treated as current price × 2

      • This allows the EA to compute the risk-based lot size (though no actual SL is placed).

2.3 +--- Time Settings ---+

  1. Range Start Hour / Range Start Minute

    • Description: The hour/minute that marks the start time for observing the day’s high/low zone.

  2. Range Length Min from Start

    • Description: The duration (in minutes) for which the EA measures high/low from the start time (e.g., 90 minutes).

  3. Delete Orders Hour / Delete Orders Minute

    • Description: The hour/minute to delete any unfilled pending orders.

  4. Use Time Close

    • Description: Whether to close all positions at a specific time. If true, the following close time parameters are enabled.

  5. Time Close Hour / Time Close Minute

    • Description: The hour/minute to force-close all open positions (requires Use Time Close = true).

2.4 +--- Trailing Stop Settings ---+

Break Even (BE)

  • BE Value Type

    • Description: The metric for BE calculations:

      • Calculation Value In Points: Uses points

      • Calculation Value In Distance Percentage: A percentage of entry price

  • BE Trigger Value

    • Description: The BE activation threshold. 0 = disabled.

  • BE Buffer Value

    • Description: Once BE is triggered, how many points or percent to add for a safety buffer (e.g., 0 = none).

Trailing Stop (TSL)

  • TSL Value Type

    • Description: The metric for TSL calculations:

      • Calculation Value In Points: Uses points

      • Calculation Value In Distance Percentage: A percentage of entry price

  • TSL Trigger Value

    • Description: The threshold for activating TSL. 0 = disabled.

  • TSL Distance Value

    • Description: The initial distance of the TSL from the current price (points or percent).

  • TSL Step Value

    • Description: The step increment for TSL each time the price moves further in a favorable direction.

Rounding to an Integer

  • If TSL Value Type = Calculation Value In Points or BE Value Type = Calculation Value In Points, any decimal input is rounded up to the nearest integer. For example: 0.01 => 1, 1.4 => 1, 1.5 => 2, 2.6 => 3, etc.

2.5 +--- Trading Frequency Settings ---+

  1. Max Long Trades Per Day

    • Description: The max number of daily Buy (long) trades allowed.

  2. Max Short Trades Per Day

    • Description: The max number of daily Sell (short) trades allowed.

  3. Max Total Trades Per Day

    • Description: The max total daily trades (long + short).

2.6 +--- Range Filter Settings ---+

  1. Use Range Filter

    • Description: Whether to enable range filtering. If true, the EA checks if the daily range is within valid bounds.

  2. Range Filter Value Type

    • Description: Whether the range size is measured in points or percent.

  3. Range Filter Minimum Value / Range Filter Maximum Value

    • Description: The min/max threshold for the day’s range. If the range is smaller than Min or larger than Max, the EA does not place orders.

    • If Range Filter Value Type = Range Filter In Points, any decimals are rounded up to the nearest integer (e.g., 0.1 => 1, 2.4 => 2, 2.5 => 3).

2.7 +--- MA Filter Settings ---+

  1. Use MA Filter

    • Description: If true, trades must pass an MA condition before entry.

  2. MA Timeframe

    • Description: The timeframe used for MA calculations (M5, M15, H1, CURRENT, etc.).

  3. MA Method

    • Description: The type of MA (SMA, EMA, SMMA, LWMA).

  4. MA Applied Price

    • Description: The price used in MA calculations (Close, Open, High, Low, etc.).

  5. MA Period

    • Description: The MA period (e.g., 50 means a 50-bar average).

2.8 +--- Other Settings ---+

  1. Magic

    • Description: A magic number used to identify the EA’s orders.

  2. Show Comments

    • Description: Whether to display EA information (status, strategy name, etc.) on the chart.

  3. Comments

    • Description: A text label shown on the chart for naming or additional remarks.

  4. Enable Drawing Range

    • Description: Whether to draw horizontal lines representing the day’s high/low range.

  5. Range Color

    • Description: The color used for drawing the range (defaults to clrYellowGreen).

  6. Show More Logging

    • Description: If true, outputs additional debug logs for troubleshooting or strategy analysis.

3. Important Notes

  1. Backtesting or Demo Testing

    • It is recommended to run tests in MT5 Strategy Tester (visual or non-visual) or on a demo account to ensure your parameter setup and strategy logic function properly before going live.

  2. Broker Server Time

    • Different brokers may operate with different server time zones. Verify that Range Start Hour/Min align with your broker’s actual server time.

  3. Risk Management

    • If using a risk-based mode (Risk Percentage), make sure your account balance/equity, leverage, and margin requirements can handle the chosen risk.

  4. Chart Timeframe

    • Typically used on M5, M15, M30, or H1 for intraday trading. You may use higher timeframes for a more extended breakout but must adjust your StopLoss and range length accordingly.

  5. Max Total Trades Per Day & Delete Orders

    • Once you reach Max Total Trades Per Day (or Max Long Trades Per Day, Max Short Trades Per Day), or once the delete-orders time has passed, no additional orders will be placed or existing pending orders may be removed.

4. FAQ

  1. Why are no orders being placed?

    • Possible reasons:

      • The time range has not started or has already ended (exceeding Range Length Min from Start).

      • The day’s range is outside Range Filter Minimum/Maximum Value.

      • The daily limit (Max Total Trades Per Day, Max Long Trades Per Day, Max Short Trades Per Day) has been reached.

      • MA Filter conditions (if enabled) are not met.

      • BE / TSL triggers have not been reached.

  2. SL Value=0 + Risk Percent, yet it still places trades?

    • To calculate lot size, the EA assumes for Buy => SL=0, for Sell => SL=entry price × 2. This is only used to compute risk-based lots, not to actually place an SL.

  3. How does TSL / BE handle decimals when set to Points?

    • The EA rounds the value to the nearest integer (e.g., 0.5 => 1, 1.5 => 2, 2. => 3, etc.).

  4. What if Range Filter is set to Points and I enter decimals?

    • Those decimal values for Min/Max are also rounded to the nearest integer (e.g., 0.1 => 1, 2.4 => 2, 2.5 => 3).

  5. Risk Percent lot size differs from my expectation?

    • Check the SL Calculation Method, SL Value, or potential fallback if SL=0. The EA finalizes the lot size based on the actual (or simulated) SL distance.

  6. How to speed up backtesting?

    • Disable Show Comments, Enable Drawing Range, and set Show More Logging = false to reduce chart rendering and log output.

5. Conclusion

By defining the day’s high/low based on a time-based range and offering multiple StopLoss modes (Range Factor / Distance Percent / Points) plus TSL/BE customizations, the Time-based Range Breakout EA – Version 2.00 provides flexibility for various intraday breakout scenarios. The EA also handles SL=0 under risk-based mode (Buy=0, Sell=entry×2) and rounds decimal inputs for TSL/BE/Range Filter when using Points.
It is strongly recommended to thoroughly test different parameter combinations in backtests and demo environments to identify configurations that best suit your personal trading style and market conditions.

Disclaimer
Forex, CFDs, and other leveraged products carry significant risks. Users are responsible for evaluating their financial circumstances and risk tolerance before trading. All trading decisions and associated risks lie solely with the user; the author bears no liability for any resultant losses.




Signal for this Strategy: https://www.mql5.com/en/signals/2291372


Recently Viewed

200 $150 $ R Factor Essential
Raphael Minato
260 $195 $ Imperator EA
Sergei Ozerov
99 $74 $ Trawler
Agus Santoso
Results 1 - 3 of 3

30-Day Money Back Guarantee

If for any reason you do not like the purchased program, you can request a refund within 30 days from the date of purchase. You can also make an exchange for any other product at an equal cost or by paying the difference.
Simply send a request for refund or exchange with your order number by email: support@fx-market.pro.
Refund requests received more than 30 days after purchase will be rejected.

Email Us Now! Support is available 24/7
by Email: support@fx-market.pro

Do You Need Help?
Click Here To Start Live Chat

Contact Us

Image

Search