Framework & template · MT4

EURUSD EA Template

by himi1024

This MetaTrader 4 repository hosts a collection of expert advisors based on a standardized automated trading template.

GitHub stars1
Forks0
Last update4 years ago29 Jun 2022
LicenceNone stated

Overview

The source files are tailored for EURUSD on the M15 timeframe, offering a modular structure for integrating custom entry and exit signals. It includes comprehensive risk management settings, allowing users to define position sizes as a percentage of balance or fixed lots. It supports trailing stops, time-based filters, and spread limits. Note that the repository contains no README documentation, and the default stop loss and take profit settings are disabled.

Details

Author

himi1024 on GitHub

Type

Framework & template

Platform

MetaTrader 4 (MQL4)

Markets

Forex

Timeframes

M15-H1

Risk profile

  • Trades without a fixed stop loss

Input parameters

Read from EURUSD-testing.mq4. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
Comment_strategystring==========Entry And Exit Settings
Comment_0string==========Risk Management Settings
RiskDefaultSizeENUM_RISK_DEFAULT_SIZERISK_DEFAULT_AUTOPosition Size Mode
DefaultLotSizedouble1Position Size (if fixed or if no stop loss defined)
RiskBaseENUM_RISK_BASERISK_BASE_BALANCERisk Base
MaxRiskPerTradeint2Percentage To Risk Each Trade
MinLotSizedouble0.01Minimum Position Size Allowed
MaxLotSizedouble100Maximum Position Size Allowed
Comment_1string==========Trading Hours Settings
UseTradingHoursboolfalseLimit Trading Hours
TradingHourStartENUM_HOURh10Trading Start Hour (Broker Server Hour)
TradingHourEndENUM_HOURh17Trading End Hour (Broker Server Hour)
Show all 28 inputs
NameTypeDefaultDescription
Comment_2string==========Stop Loss And Take Profit Settings
StopLossModeENUM_MODE_SLSL_FIXEDStop Loss Mode
DefaultStopLossint0Default Stop Loss In Points (0=No Stop Loss)
MinStopLossint0Minimum Allowed Stop Loss In Points
MaxStopLossint5000Maximum Allowed Stop Loss In Points
TakeProfitModeENUM_MODE_TPTP_FIXEDTake Profit Mode
DefaultTakeProfitint0Default Take Profit In Points (0=No Take Profit)
MinTakeProfitint0Minimum Allowed Take Profit In Points
MaxTakeProfitint5000Maximum Allowed Take Profit In Points
Comment_3string==========Trailing Stop Settings
UseTrailingStopboolfalseUse Trailing Stop
Comment_4string==========Additional Settings
MagicNumberint0Magic Number For The Orders Opened By This EA
OrderNotestringComment For The Orders Opened By This EA
Slippageint5Slippage in points
MaxSpreadint100Maximum Allowed Spread To Trade In Points

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone himi1024/MQL4 from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL4/Experts.
  3. 3Copy the filesCopy the .mq4 file into Experts.
  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

This Expert Advisor framework for MetaTrader 4 provides a modular template for building custom trading strategies. It handles complex trade management tasks, including multi-symbol execution, margin-based position capping, and various lot-sizing algorithms such as risk percentage or fixed volume. Risk controls include

MT4 Framework & template Martingale High risk

Modular Trade System

by michaelwade
58 stars

This MetaTrader 4 template provides a modular framework for developing expert advisors. It organizes trading logic into decoupled components including signal engines, order management, and environment checking. The system uses an abstract controller class to handle data processing from multiple sources, such as MACD or

MT4 Framework & template MartingaleIndicator crossover High risk
Updated 6 years ago Apache-2.0 GitHub repository of Modular Trade System
36 stars

This repository contains the MQL source code used by Forex Strategy Builder Professional to export automated trading strategies to MetaTrader 4 and MetaTrader 5. It serves as a standardized template for executing technical strategies generated by the software, handling order execution and trade management. The EA inclu

MT4MT5 Framework & template Multi-strategyMartingale High risk
Updated 4 years ago None stated GitHub repository of FSB Pro Expert Advisor

MQL4 Template

by KeisukeIwabuchi
13 stars

This MetaTrader 4 expert advisor provides a foundational framework for developers to create custom automated trading systems. It establishes a structured environment for handling trade signals, entry execution, and exit management. The template includes standard risk parameters such as fixed lot sizing, stop loss, and

MT4 Framework & template
Updated 6 years ago MIT GitHub repository of MQL4 Template

MQL4 Trade Manager

by KeisukeIwabuchi
8 stars

This MetaTrader 4 utility provides a framework for developers to implement event-driven trade monitoring. It replicates the native MQL5 OnTrade function within the MQL4 environment, which lacks a built-in event for position changes. By monitoring the order pool during each price tick, the code detects when trades are o

MT4 Framework & template
7 stars

This MetaTrader 4 expert advisor provides a robust framework for developing automated trading strategies. It includes pre-built modules for trend detection using ADX and Moving Averages, alongside pullback entry logic. The template emphasizes risk management, featuring percentage-based lot sizing and adaptive volatilit

MT4 Framework & template Trend followingMean reversionMartingale High risk
Updated 5 years ago None stated GitHub repository of Falcon Trading Bot Template

More frameworks and templates

Need a broker for MT4?

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

Compare brokers