Framework & template · MT5

Range Bars EA Framework

by 9nix6

This framework provides MQL5 header files and example expert advisors designed to trade on non-time-based Range Bar charts within MetaTrader 5.

GitHub stars16
Forks13
Last update5 years ago28 Jul 2021
LicenceGPL-3.0
Latest release3.185 years ago

Overview

Range Bars EA Framework includes template robots for moving average crossovers and Super Trend strategies. The included code manages trade execution with configurable stop loss, take profit, break-even, and trailing stop parameters. It also supports partial position closing, signal confirmation bars, and time-of-day filters. This repository acts as an SDK, requiring the associated Range Bars indicator from the MQL5 Market to generate the custom chart environment necessary for the EAs to function.

Details

Author

9nix6 on GitHub

Type

Framework & template

Platform

MetaTrader 5 (MQL5)

Strategy

Indicator crossover, Trend following

Markets

Any symbol

Timeframes

Any timeframe

Risk Profile

  • Trades without a fixed stop loss

Topics

range-bars-chartingmql5-marketmql5-headerrangebars-indicatorrangebars-eamql5mt5

Input Parameters

Read from PriceMA_Cross.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
Lotsdouble0.1Traded lots
StopLossuint0Stop Loss
TakeProfituint0Take profit
ConfirmationBarsint1Signal confirmation bars
PrevSignalBarsint1Prev. signal confirmation bars
ValidTradeDirectionENUM_TRADE_DIRECTIONTRADE_DIRECTION_ALLValid trading type
CloseTradeOnSignalChangebooltrueClose trade on signal change
ForceSRboolfalseForce Stop & Reverse
Startstring9:00Start trading at
Endstring17:55End trading at
CloseTradeAfterTradingHoursbooltrueClose trade after trading hours
InpBEPointsint0BreakEven (Points) [ 0 = OFF ]
Show all 22 inputs
NameTypeDefaultDescription
InpTrailByPointsint0Trail by (Points) [ 0 = OFF ]
InpTrailStartPointsint150Start trailing after (Points)
InpPartialCloseAtProfitPointsint0Partial close at (Points) [ 0 = OFF ]
InpPartialClosePercentageint50Partial close %
MagicNumberulong8888Assign trade ID
DeviationPointsulong0Maximum defiation (in points)
ManualTickSizedouble0.000Tick Size (0 = auto detect)
NumberOfRetriesint50Maximum number of retries
BusyTimeout_msint1000Wait [ms] before retry on busy errors
RequoteTimeout_msint250Wait [ms] before retry on requotes

How to Install It

  1. 1Download the sourceUse "Download source (.zip)" above, or clone 9nix6/Range-Bars-Charting from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
  3. 3Copy the filesCopy the .mq5 file into Experts, and any .mqh files into the Include folder the code expects.
  4. 4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
  5. 5Test before you tradeRun it in the Strategy Tester, then attach it to a demo chart and allow algorithmic trading.
Third-party code. ForexR did not write, test or endorse this EA, and the summary above was generated automatically from its README and code. ForexR lists only repositories with readable source code and never hosts files. Read the code, backtest it and use a demo account first; automated trading can lose money quickly.

Similar Expert Advisors

Orchard Simple EA Template

by OrchardForexTutorials
13 stars

This collection provides educational templates for building MetaTrader 5 Expert Advisors. It includes demonstration robots that interface with indicators like MACD and Parabolic SAR using the iCustom function. The repository serves as a learning resource for structuring MQL5 code and handling trade execution. Each exam

MT5 Framework & template Indicator crossoverTrend following

Hedge Terminal

by SokolovVasiliy
3 stars

Hedge Terminal is a specialized framework for MetaTrader 5 designed to facilitate hedging net positions and provide a structured API for managing expert advisors. The repository includes demonstration robots such as a moving average expert that operates across multiple timeframes. These examples show how to open trades

MT5 Framework & template Indicator crossoverTrend followingHedging
Updated 6 years ago None stated GitHub repository of Hedge Terminal

Median Turbo Renko SDK

by gridgentoo
1 stars

This repository provides a specialized framework and example expert advisors for developing Renko-based trading systems on the MetaTrader 5 platform. It includes a dedicated MQL5 header library that simplifies integration with the Median Renko indicator bundle. The framework handles the acquisition of chart settings au

MT5 Framework & template Trend followingIndicator crossover

TrendEngine Core

by Fintor-AI
1 stars

This MetaTrader 5 expert advisor serves as a modular framework and starter template for developing trend-following trading systems. It utilizes a clean architecture to separate signal logic, risk management, and order execution. The included demo logic implements a standard moving average crossover strategy to enter tr

MT5 Framework & template Trend followingIndicator crossover
Updated 9 months ago MIT GitHub repository of TrendEngine Core

Framework4o

by Capital-Advisory-Technology
2 stars

Framework4o is a modular system building framework and expert advisor for MetaTrader 4. It provides a structured environment for developing trading models with pre-defined modules for position and risk management. The core functionality handles entry and exit logic using indicators like DEMA, EMA, and RSI. It includes

MT4 Framework & template Trend followingIndicator crossover
Updated 2 years ago GPL-3.0 GitHub repository of Framework4o
2 stars

This MetaTrader 4 expert advisor and modular framework provides advanced trade management and position scaling capabilities. It features a linear trailing stop that triggers at a predefined profit level and a pyramiding system to add positions to winning trades using a lot multiplier. The code is structured as a librar

MT4 Framework & template Trend followingIndicator crossoverGrid High risk

More frameworks and templates

Need a Broker for MT5?

Compare regulated brokers that support MetaTrader, with spreads, minimum deposits and leverage side by side.

Compare brokers