Trading robot · MT5

PSAR Hedge Strategy EA

by cgmond

This MetaTrader 5 expert advisor implements a trend-following strategy based on the Parabolic SAR indicator combined with hedging logic.

GitHub stars1
Forks0
Last update1 year ago13 Jun 2025
LicenceNone stated

Overview

PSAR Hedge Strategy EA identifies market direction using standard PSAR parameters and manages positions through automated risk controls. The system allows users to define risk as a fixed lot size or a percentage of account balance or equity. Safety features include a hard stop loss, a target profit threshold based on equity, and a time filter to avoid volatility during market openings and closings. The repository provides multiple variations of the core logic without additional documentation.

Details

Author

cgmond on GitHub

Type

Trading robot

Markets

Any symbol

Timeframes

Any timeframe

Risk Profile

  • Holds opposite positions at once

Input Parameters

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

NameTypeDefaultDescription
TradingTimeframeENUM_TIMEFRAMESPERIOD_D1Trading Timeframe
InitialLotsdouble0.1Initial Lot Size
RiskTypeENUM_RISK_TYPERISK_FIXEDRisk Management Type
RiskAmountdouble0.1Risk Amount (lots/% based on type)
PSARStepdouble0.02PSAR Step
PSARMaximumdouble0.2PSAR Maximum
SmallLossThresholddouble2.0Small Loss Threshold (% of equity/balance)
UseEquityForCalculationbooltrueUse Equity (true) or Balance (false)
HardStopLossdouble10.0Hard Stop Loss (% of equity/balance)
HappyTakeProfitdouble5.0Happy Take Profit (% of equity/balance)
EnableTimeFilterbooltrueEnable Trading Time Filter
AvoidHoursBeforeCloseint1Hours to avoid before market close
Show all 13 inputs
NameTypeDefaultDescription
AvoidHoursAfterOpenint1Hours to avoid after market open

How to Install It

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

Nyao Scalper

by elrizwiraswara
214 stars

Nyao Scalper is an automated scalping robot for MetaTrader 5 that utilizes a multi-factor weighted scoring system to identify trade opportunities. It evaluates trend alignment through EMA crossovers, momentum via RSI, and price action through wick rejection and candle body analysis. The EA manages risk with adaptive AT

MT5 Trading robot ScalpingTrend followingMartingale High risk
Updated 13 days ago BSD-3-Clause GitHub repository of Nyao Scalper

Prem Gold Advisor

by Premkumar238
13 stars

Prem Gold Advisor is an automated MetaTrader 5 expert advisor specialized for XAUUSD (Gold) trading on the five-minute timeframe. It initiates trades using breakout levels placed at specific distances from the candle open. The strategy features a progressive scale-in mechanism, adding new orders as the price hits succe

MT5 Trading robot BreakoutTrend followingMartingale High risk
Updated 2 months ago None stated GitHub repository of Prem Gold Advisor

EA XAUUSD Premium

by diditgravatar
4 stars

This MetaTrader 5 expert advisor is designed for gold trading, utilizing a multi-timeframe strategy across the M15, H1, and H4 charts. It integrates technical indicators including ADX, RSI, and Moving Averages to identify trend-following and breakout opportunities. Risk controls include dynamic lot sizing based on acco

MT5 Trading robot Trend followingBreakoutGrid High risk
Updated 1 year ago None stated GitHub repository of EA XAUUSD Premium

STO Martin

by crq644
3 stars

STO Martin is a grid-based trading robot for MetaTrader 5 that uses technical indicators to manage entries and recoveries. It employs a Stochastic Oscillator for execution signals and a Moving Average to filter trades according to the prevailing trend. The EA features a martingale lot-scaling system that adds positions

MT5 Trading robot MartingaleGridTrend following High risk
Updated 3 years ago None stated GitHub repository of STO Martin

Forex Pro EA

by hqs-triet
3 stars

This MetaTrader 5 expert advisor serves as an educational repository for various automated trading strategies and capital management techniques. It features a modular architecture allowing users to toggle between multiple entry algorithms, including EMA crossovers, MACD zero-crossings, and a combination of ADX and Boll

MT5 Trading robot Indicator crossoverHedgingTrend following
Updated 2 years ago MIT GitHub repository of Forex Pro EA
2 stars

This Expert Advisor for MetaTrader 5 focuses on gold trading through a combination of mean-reversion signals and a grid management system. It uses multi-timeframe filters, including exponential moving averages and ADX on the H1 timeframe, to identify trend direction while executing entries on M15 based on RSI and Bolli

MT5 Trading robot Mean reversionGridMartingale High risk

More trend-following EAs

Related on ForexR

Need a Broker for MT5?

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

Compare MT5 brokers