Loading…

EA Hedging

From the Old Kings archive: EA Hedging, an expert advisor (trading robot) for MetaTrader 4. As the name suggests, the idea behind it is hedged buy / sell positions. In the code it works with moving averages, CCI and Parabolic SAR. It raises the lot size after losses (martingale — high risk), has a trading-hours filter and can size trades from your risk. It has 40 settings, for example c1 (default ------------------------), lotsize (default Money management) and MM (default true). Watch it on a demo account for a while — robots can behave differently with each broker. Inside: 1 EA file with source code (.mq4) you can open and edit in MetaEditor. Old Kings are classic community tools shared as-is. Not tested by PolyMaria. Try it on a demo account first. Are you the author of this tool? Message us on Telegram (@abumarket_support) and we will credit you or take it down.

Expert advisor · MT4 · v1.0 · Free

About EA Hedging

EA Hedging is an expert advisor (trading robot) for MetaTrader 4 based on Moving Average, CCI and Parabolic SAR. It increases the lot size after a losing trade (martingale), trades only in the hours you set (time filter) and can size trades from your balance and risk percent. It has 40 settings, such as C1, Lotsize and MM. MQL source code included.

Files in the download: EA Hedging.mq4.

Trading robots can lose money. Check every setting and test on a demo account before using real funds.

Settings

SettingDefaultWhat it does
C1----------------------------------
LotsizeMoney management
MMtrue
Risk2.0Risk per trade (percent of balance)
Lots0.01Trade size in lots
C2----------------------------------
Multiplier1.5How much the lot size grows after a loss
Profit0
Single order profit3.0
Globalprofit0
Pairglobalprofit1
Maximaloss0
Tradesperday99
Openonnewcandletrue
C3----------------------------------
Space pips14
Space orders5
Space lots0.01
Space1 pips50
Space1 orders1
Space1 lots0.02
Space2 pips100
Space2 orders1
Space2 lots0.03
Space3 pips200
Space3 orders99
Space3 lots0.09
C4----------------------------------
Magicbuy1Magic number that tells this EA's orders apart
BuycommentbuyComment written on the orders
Magicsell2Magic number that tells this EA's orders apart
SellcommentsellComment written on the orders
C5----------------------------------
Time filterTimer filter (Hour 0-24 Minute 0-59)
Start hour00Hour when trading starts (server time)
Start minute00
Finish hour23Hour when trading stops (server time)
Finish minute30Hour when trading stops (server time)
C6----------------------------------
Entry1Determine entry based on SMA/parabolic

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Experts.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
  6. Test it first on a demo account or in the Strategy Tester.

Download the PDF guide

Tags: Hedging · Martingale · Time Filter · Risk & Lot Size · Moving Average · CCI · Parabolic SAR · MT4 Expert Advisor · MQL4 Source Code

Old Kings — classic MT4 & MT5 collection · PolyMaria