Trading robot · MT4

Falcon A

by vzhomeexperiments

Falcon A is a MetaTrader 4 robot that utilizes a k-Nearest Neighbors (kNN) classification algorithm for pattern-based trading.

GitHub stars25
Forks42
Last update5 years ago10 Mar 2021
LicenceMIT

Overview

Falcon A follows a model-based approach where the user must first generate historical data files through a training simulation in the Strategy Tester. The system calculates entry probabilities using Euclidean metrics and reinforcement learning policies. Risk controls include volatility-based stop loss and take profit levels, fixed percentage lot sizing, and a mandatory Friday close. The README notes this repository is for a deprecated version from a tutorial series.

Details

Author

vzhomeexperiments on GitHub

Type

Trading robot

Platform

MetaTrader 4 (MQL4)

Strategy

AI / machine learning

Markets

Forex

Timeframes

M15-H1

Risk profile

No grid, martingale or hedging logic was found in its code or README. That says nothing about how it performs: backtest it first.

Topics

mt4-eatrading-robotknn-classifierdecision-support-systemudemy-tutorialudemycoursereinforcement-learningself-learningmodel-basedartificial-intelligence

Input parameters

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

NameTypeDefaultDescription
Header1string----------EA General Settings-----------
StrategyNumberstring32
TerminalTypeint10 mean slave, 1 mean master
R_ManagementbooltrueR_Management to set true for trading, false for testing
Slippageint3Slippage In Pips
IsECNbrokerboolfalseIs your broker an ECN
OnJournalingboolfalseAdd EA updates in the Journal Tab
EnableDashboardboolfalseTurn on Dashboard
Header2string----------Trading Rules Variables-----------
Baseboolfalse
buy_thresholddouble0.7
sell_thresholddouble0.7
Show all 40 inputs
NameTypeDefaultDescription
inverse_position_openboolfalse
invers_buy_thresholddouble0.3
invers_sell_thresholddouble0.3
fastint12
slowint34
close_ordersboolfalse
use_market_typeboolfalse
closeAllOnFridaysboolTrueclose all orders on Friday 1hr before market closure
Header3string----------Position Sizing Settings-----------
Lot_explanationstringIf IsSizingOn = true, Lots variable will be ignored
Lotsdouble0.01
IsSizingOnboolFalse
Riskdouble1Risk per trade (in percentage)
MaxPositionsAllowedint1
Header4string----------TP & SL Settings-----------
UseFixedStopLossboolTrueIf this is false and IsSizingOn = True, sizing algo will not be able to calculate correct lot size.
FixedStopLossdouble0Hard Stop in Pips. Will be overridden if vol-based SL is true
IsVolatilityStopOnboolTrue
VolBasedSLMultiplierdouble6Stop Loss Amount in units of Volatility
UseFixedTakeProfitboolTrue
FixedTakeProfitdouble0Hard Take Profit in Pips. Will be overridden if vol-based TP is true
IsVolatilityTakeProfitOnboolTrue
VolBasedTPMultiplierdouble6Take Profit Amount in units of Volatility
Header5string----------Hidden TP & SL Settings-----------
UseHiddenStopLossboolFalse
FixedStopLoss_Hiddendouble0In Pips. Will be overridden if hidden vol-based SL is true
IsVolatilityStopLossOn_HiddenboolFalse
VolBasedSLMultiplier_Hiddendouble0Stop Loss Amount in units of Volatility

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone vzhomeexperiments/FALCON_A 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

20 stars

This MetaTrader 4 expert advisor implements a sophisticated trading framework based on a 2023 soft computing research paper. It utilizes a Bidirectional LSTM with an Attention Mechanism and Chaotic Neuro-Oscillators to predict future High, Low, Close, and Open prices. To address the limitations of traditional lagging i

MT4 Trading robot AI / machine learning
13 stars

This MetaTrader 4 expert advisor functions as a communication interface between the terminal and an external Python-based reinforcement learning model. It utilizes deep Q-learning to determine trading actions at every price tick, passing market data through local files to the external script. The system implements a ma

MT4 Trading robot AI / machine learningMartingale High risk

Falcon F2

by vzhomeexperiments
11 stars

Falcon F2 is an expert advisor for MetaTrader 4 that implements model-based trading by interpreting external signals. The robot acts as an execution interface for predictions generated outside the platform, such as those from R-based models or a Decision Support Centre. It enters trades when predicted price changes exc

MT4 Trading robot AI / machine learning
Updated 5 years ago MIT GitHub repository of Falcon F2

AI Gen XII

by KanekiCraynet
7 stars

This Expert Advisor for MetaTrader 4 utilizes automated trading logic reportedly assisted by AI models like GPT-4o and ATNet. It executes trades based on market analysis and includes built-in risk controls such as dynamic lot sizing, trailing stops, and a time filter to restrict activity to specific hours. The system a

MT4 Trading robot AI / machine learning
Updated 7 months ago None stated GitHub repository of AI Gen XII

Falcon S

by vzhomeexperiments
6 stars

Falcon S is a rule-based expert advisor for MetaTrader 4 designed to execute trades based on external sentiment analysis data. It functions as a production bridge for decisions generated in external environments like R, reading trade triggers from CSV files. The robot operates primarily on the H1 timeframe with schedul

MT4 Trading robot NewsAI / machine learning
Updated 7 years ago MIT GitHub repository of Falcon S

NNA Expert

by pouriakouhzadeh
3 stars

NNA Expert is an automated trading robot for MetaTrader 4 that utilizes external deep-learning models to analyze cryptocurrency markets. The system operates by generating market data files on every new bar and triggering an external batch script via Windows shell commands to obtain trade signals. It supports long and s

MT4 Trading robot AI / machine learning
Updated 3 years ago None stated GitHub repository of NNA Expert

More trading robots

Need a broker for MT4?

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

Compare brokers