Hedge EA monitors account equity and floating losses, automatically opening hedge positions when a user-defined loss percentage is reached. The system includes robust risk management features such as daily and weekly loss limits, dynamic lot sizing based on account risk, and a margin level safeguard. It also incorporates a news filter, session-specific trading hours, and trailing stops. The EA can close all open positions once a target profit percentage is achieved.
Automated hedging triggered by floating loss percentage
Daily and weekly account loss limits
Trading filters for Asian, London, and New York sessions
News filter to pause trading during high volatility
Dynamic lot sizing based on account risk percentage
Read from HedgeEA.mq4. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
LotSize
double
0.1
Lot Size
HedgeLotSize
double
0.1
Hedge Lot Size
StopLoss
int
50
Stop Loss in pips
TakeProfit
int
100
Take Profit in pips
MagicNumber
int
123456
Magic Number
Slippage
int
3
Slippage in pips
MaxLossPercent
double
1.0
Maximum Loss Percent before Hedging
TargetProfit
double
2.0
Target Profit Percent to Close All
StartHour
int
0
Trading Start Hour
EndHour
int
24
Trading End Hour
MaxMarginLevel
double
1000
Maximum margin level before closing positions
UseTrailingStop
bool
true
Use trailing stop
Show all 27 inputs
Name
Type
Default
Description
TrailingStop
int
20
Trailing stop in pips
TrailingStep
int
5
Trailing step in pips
UseDynamicLotSize
bool
false
Use dynamic lot size
RiskPercent
double
1.0
Risk percent for dynamic lot size
MaxPositionAge
int
24
Maximum position age in hours
UseNewsFilter
bool
true
Use news filter
NewsMinutesBefore
int
30
Minutes before news to avoid trading
NewsMinutesAfter
int
30
Minutes after news to avoid trading
UseSessionFilter
bool
true
Use session filter
AsianSession
string
00:00-08:00
Asian session
LondonSession
string
08:00-16:00
London session
NewYorkSession
string
13:00-21:00
New York session
UseRiskManagement
bool
true
Use advanced risk management
DailyLossLimit
double
2.0
Daily loss limit in percent
WeeklyLossLimit
double
5.0
Weekly loss limit in percent
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone sahebkaran1/HedgeEA from GitHub, and unzip it.
2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL4/Experts.
3Copy the filesCopy the .mq4 file into Experts.
4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
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.
Icarus is an automated trading system for MetaTrader 4 that employs a grid strategy with Martingale lot scaling. It utilizes Bollinger Bands and the Stochastic Oscillator to identify entry points, offering a conjunctive mode for filtered execution. The EA manages risk through maximum position limits, equity warning thr
Profit Hunter is an expert advisor for MetaTrader 4 designed for forex and cryptocurrency trading. It utilizes a composite signal strategy combining Triple Moving Average, Adaptive RSI, CCI, iTrend, and Fisher indicators. The robot executes trades using a grid system where distances between orders are set manually or c
Oanda TDesk Drone is a MetaTrader 4 expert advisor designed to execute trades based on signals from the TDesk dashboard via the Oanda FXtrade platform. It functions as a bridge, using an external Python script and file-based data exchange to facilitate order placement. The EA is specifically designed to support fractio
This MetaTrader 4 expert advisor implements a correlation-based hedging strategy between two instruments, typically UKOIL and USOIL. It monitors the price spread between the two assets, opening buy and sell positions simultaneously when the spread expands or narrows beyond defined thresholds. The EA manages exits based
This MetaTrader 4 robot implements a multi-currency mean-reversion strategy, targeting price returns to the average on correlated forex pairs. It manages trades using a grid system with a significant martingale multiplier to scale lot sizes. The expert advisor allows for simultaneous trading on multiple symbols to dive
This expert advisor facilitates arbitrage trading between futures and spot instruments, primarily targeting gold and stock indices. Available for MetaTrader 4 and 5, it monitors the price difference between two related symbols against a moving average to identify trade opportunities. The logic includes a noise-filterin