popular (1 m views) 4 hour range strategy coded and tested

popular (1 m views) 4 hour range strategy coded and tested
Download ALL MT4 experts (885)
YouTube Video Thumbnail



Similar MetaTrader Tools

popular (1 m views) 4 hour range strategy coded and tested

Info

The popular (1 m views) 4 hour range strategy coded and tested is a Expert Advisor for MetaTrader 4 that provided for educational purposes; not trading advice. backtests on eurusd under my conditions were unprofitable.

Usage

This tool is typically used for automated trading on major forex pairs and gold.

Platform

This Expert Advisor works exclusively on MetaTrader 4 (both build 600+ and newer versions).

Setup

Place the downloaded file in MQL4/Experts folder via File ? Open Data Folder in MetaTrader 4.


How to Install and Use popular (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.

What this tool does

provided for educational purposes; not trading advice.

Typical Use Case

This Expert Advisor excels in automated trading and technical analysis on MetaTrader 4.

Compatible Platform & Setup

This Expert Advisor works on MetaTrader 4. Place the file in the MQL4/Experts folder and restart the terminal.

Description & Settings

Related: viral ma c d strategy (3. 5 m+ views) — recreated and automated - another powerful expert for MetaTrader 4 traders.


Also recommended: visual order processing - similar expert with strong performance on MetaTrader 4.

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: hybrid scalper - excellent alternative for expert users on MetaTrader 4.

Source Code

#property copyright "RobotFX"
#property link "https://robotfx.org"
#property version   "1.01"
#property strict
extern int  ServerGMTOffsetWinter = 2;   // Server GMT offset in Winter time
extern int  ServerGMTOffsetSummer = 3;   // Server GMT offset in Summer time (can be the same as winter)
extern int  ServerSwitchToSummerMonth = 3;   // Month when broker's server switches to Summer time
extern int  ServerSwitchToSummerDay   = 1;   // Day of month when broker's server switches to Summer time
extern int  ServerSwitchToWinterMonth = 11;  // Month when broker's server switches to Winter time
extern int  ServerSwitchToWinterDay   = 1;   // Day of month when broker's server switches to Winter time

.......

Leave your opinion, ask a question, share some knowledge

Limitations & Risk Warning

  • This tool is provided for educational and testing purposes only.
  • Past performance does not guarantee future results.
  • Trading involves substantial risk of loss. Use on a demo account first.
  • Results may vary depending on market conditions, broker, and settings.
  • We recommend thorough backtesting and forward testing before using with real funds.
© ROBOTFX Free educational tools by RobotFX. Use entirely at your own risk; we are not liable for any financial losses incurred.