Download Viral (1 M+ views) 4 Hour Range Strategy coded and tested for MetaTrader 5

Viral (1 M+ views) 4 Hour Range Strategy coded and tested

Viral (1 M+ views) 4 Hour Range Strategy coded and tested

This tool for MetaTrader 5 is specifically engineered to streamline your trading operations. This Expert Advisor serves as automated trading software. It is utilized to monitor financial markets and execute trades based on predefined algorithmic rules, enabling precise position management without the need for constant manual oversight.

MT5 expert Pack 📂

How to Setup and Use Viral (1 M+ views) 4 Hour Range Strategy coded and tested

1. Installation: Open the "File" menu, select "Open Data Folder," navigate to MQL/Experts, paste your file, and restart the terminal.

2. Activation: Drag the EA from the Navigator onto a chart, ensure "Allow live trading" is checked in the Common tab, and verify the AutoTrading button is green.

3. Optimization: Right-click your chart, choose "Expert List," click "Properties" to adjust inputs, and save your preferred setup as a set file for future use.

4. Maintenance: Regularly check the "Experts" tab in the terminal window to monitor trade logs and potential execution errors.

Frequently Asked Questions

Q: Why is my EA not opening trades? A: Check the "AutoTrading" button, ensure "Allow live trading" is enabled, and verify your broker allows automated trading on your account type.

Q: Can I run multiple EAs on one chart? A: No, each chart can only host one active EA; however, you can open multiple charts for different currency pairs to run several EAs.

Q: What does the "smiley face" icon mean? A: A smiley face in the top-right corner of the chart indicates the EA is successfully running; a frowny face means it is disabled.

Description & Settings


Provided for educational purposes; not trading advice. Backtests on EURUSD under my conditions were unprofitable.
The strategy follows the following logic:

First the strategy marks the high and the low of the first 4H candle, using the New york time zone.

After the first 4H candle is formed the strategy waits for a 5 Minute candle to close outside the Range.

If a 5 Minute candle closes above the High and then a 5 Minute candle closes back in the Range, there is a sell signal.

If a 5 Minute candle closes below the Low and then a 5 Minute candle closes back in the Range, there is a buy signal.
There was one vague rule the strategy did not follow regarding the orderblock. To avoid trades after the price has overextended beyound the range, a time filter was introduced and if the price stayed above the high or below the low for more than 75 Minutes the trade is marked as invalid.
It is of utmost importance to specify your own broker's GMT offset times and the dates when the switching from Summer time to Winter time (and vica versa). Since this strategy is based on the New York local time, a single error in this can offset the whole strategy.
Here are the input parameters for the strategy:

ServerGMTOffsetWinter
: The GMT offset of the broker's server in winter time.

ServerGMTOffsetSummer
: The GMT offset of the broker's server in summer time. (Can be the same as Winter offset for brokers with fixed GMT offset)

ServerSwitchToSummerMonth
: The month when the broker switches to summer time zone.

ServerSwitchToSummerDay
: The day of month when the broker switches to summer time zone.

ServerSwitchToWinterMonth
: The month when the broker switches to winter time zone.

ServerSwitchToWinterDay
: The day of month when the broker switches to winter time zone.

Lots
: Lotsize
Here are the backtest results of the backtest for EURUSD:

You May Also Like

RobotFX does not own any of the code provided on this platform. All tools are freely available on the internet; we simply index and re-offer them for download. We are not responsible for any financial losses that may occur. Trading responsibilities rely solely on the traders downloading and using the displayed Expert Advisors, indicators, and scripts. These tools are provided for educational purposes only and may require modification or optimization to align with a trader's specific strategy or needs.
© ROBOTFX - Best MetaTrader Expert Advisors & Indicators