Grid EA with percentage trade allocation with Hedge

Specification

🚀 ADAPTIVE GRID HEDGE EA (FULL VERSION)

🧠 📌 GENERAL CONCEPT

This Expert Advisor (EA) uses a strategy combining:

  • Grid trading (order grid)

  • Hedge (protection with opposite positions)

  • Lot scaling (progressive)

  • Loss compensation with profits

  • Continuous operation (non-stop)

  • Focus on:

    • Small recurring profits

    • High trade volume (rebate/IB)

The system does not depend on direction, but rather on market oscillation.

Main panel should show how many lots is opened for each side, daily pfofits and lots traded.

Should have an input wherer I can say how much is the rebate in USD so it can calculate profit made daily on lots traded.

Should also show ho much profit was made, USD * Lots traded at the end of backtest.


⚙️ 🔁 CORE SYSTEM LOGIC

🔹 1. Initialization

  • Open simultaneously:

    • 1 BUY

    • 1 SELL

  • Same initial lot (or configurable)

👉 Creates a neutral base hedge


🔹 2. GRID Formation

  • Every X points (grid step):

    • Open a new order on the losing side

📊 Dynamic grid:

Based on the Average True Range indicator

  • High volatility → increases spacing

  • Low volatility → decreases spacing


🔹 3. Lot Scaling

Each new level can:

  • Increase lot size (progressive)

  • Be based on:

    • Fixed multiplier

    • Percentage of the opposite side

    • Current drawdown

👉 Always with a maximum limit


🔹 4. Dynamic Hedge

🛡️ Hedge types:

✔ Standard hedge

  • Based on % of losing side volume

⚠️ News hedge

  • Before high-impact events:

    • Activate full/partial hedge

    • Reduce exposure

🌪️ Breakout hedge

  • Detected via:

    • Volatility

    • Strong candle

  • Open opposite position to lock risk

🚨 Emergency hedge

  • Triggered by high drawdown

  • Freezes losses


🔹 5. Smart Closing (Profit Offset Engine)

  • New trades (larger lots) generate profit

  • Profit is used to close older losing trades

📌 Rule:

Profit ≥ Loss + minimum margin

👉 Closes both → clears the grid


🔹 6. Automatic Reopening

  • Closed trades can be reopened

  • Keeps the cycle continuous


🔹 7. Scalper Strategy (First and Last Trade)

⚡ First order:

  • Always active

  • Short TP (e.g., 50 pts)

  • Closes and reopens immediately

👉 Generates constant flow


⚡ Last order:

  • Last grid level

  • Acts as a consolidation scalper

  • Larger TP (e.g., 80 pts or optimized)


🔹 8. Take Profit

Configurable per side:

  • Fixed TP

  • Dynamic TP (ATR)

  • TP based on grid average price


🔹 9. Operation Modes

  • BUY only

  • SELL only

  • Both (hedge)


🔹 10. Independent Parameters per Side

Each side can have:

  • Different TP

  • Different grid

  • Different multiplier

  • Order limit

  • Custom strategy


🧠 📊 INTELLIGENT FILTERS

📈 Trend filter

Using:

  • Moving Average

  • Average Directional Index

Rules:

  • Strong trend:

    • Avoid trading against it

    • Or increase grid spacing


🌪️ Volatility filter

  • Based on Average True Range


📰 News filter

  • Avoid trading during major events

  • Or activate automatic hedge


🧱 Block zone

  • Avoid entries in critical regions:

    • Breakouts

    • Support/resistance


🛡️ 🔒 PROTECTION SYSTEM (ANTI-BLOWUP)

🚨 1. Global equity stop

  • Example: -10% / -20%

👉 Close everything and reset


📉 2. Grid level limit

  • Example: max 5–10 orders


⚖️ 3. Total lot limit

  • Limit per side and global


📊 4. Margin protection

  • Minimum Margin Level:

    • <200% → stop entries

    • <150% → reduce positions


🔄 5. Partial closing

  • Gradually reduces exposure


⏸️ 6. Automatic pause

  • After:

    • Global stop

    • High volatility

    • Losing streak


🎯 7. Global take profit (basket)

  • Example: +2% or +5%

👉 Close everything and restart


📉 8. Lot reduction during drawdown

  • Adaptive anti-martingale


🔗 9. Correlation control

  • Avoid duplicated exposure in correlated pairs


📅 10. Session control

  • Avoid risky trading hours


🔢 11. Cycle limit

  • After X cycles → pause


🔄 🔁 FULL EA CYCLE
  1. Opens BUY + SELL

  2. Market moves

  3. Grid expands on losing side

  4. Lots increase

  5. Scalpers generate profit

  6. Profits close old losses

  7. Hedge protects during critical events

  8. System clears positions

  9. Basket closes in profit

  10. Automatically restarts


⚠️ 📉 IMPORTANT TRUTH (NO ILLUSION)

Even with all this:

  • ✅ Risk is GREATLY reduced

  • ❌ Risk does NOT disappear

Why:

👉 Grid + prolonged trend = structural risk


🧠 🔥 PROFESSIONAL LEVEL (FINAL UPGRADE)

To make it truly robust:

👉 Adaptive mode

  • Sideways market → activates GRID

  • Trending market → activates trend mode (no aggressive grid)


🧩 CONCLUSION

You’ve created a system that is:

  • Extremely sophisticated

  • Focused on constant cash flow

  • Strong in sideways markets

  • Equipped with multiple protection layers

    👉 Requires:

  • Strict risk management

  • Clear limits

  • Extensive testing


Responded

1
Developer 1
Rating
(438)
Projects
650
53%
Arbitration
35
63% / 20%
Overdue
7
1%
Working
2
Developer 2
Rating
(1)
Projects
1
100%
Arbitration
0
Overdue
0
Free
3
Developer 3
Rating
(111)
Projects
184
25%
Arbitration
25
16% / 76%
Overdue
16
9%
Free
4
Developer 4
Rating
(22)
Projects
28
7%
Arbitration
9
33% / 33%
Overdue
1
4%
Working
5
Developer 5
Rating
(7)
Projects
10
70%
Arbitration
0
Overdue
0
Working
Published: 1 article, 2 codes
6
Developer 6
Rating
(10)
Projects
17
18%
Arbitration
3
0% / 67%
Overdue
3
18%
Working
7
Developer 7
Rating
(2)
Projects
3
33%
Arbitration
0
Overdue
2
67%
Free
8
Developer 8
Rating
(13)
Projects
23
39%
Arbitration
8
0% / 50%
Overdue
4
17%
Free
9
Developer 9
Rating
(4)
Projects
10
60%
Arbitration
1
0% / 0%
Overdue
0
Working
10
Developer 10
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Published: 2 codes
11
Developer 11
Rating
Projects
1
0%
Arbitration
0
Overdue
0
Free
Published: 4 codes
12
Developer 12
Rating
(1)
Projects
2
0%
Arbitration
2
0% / 100%
Overdue
0
Working
13
Developer 13
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Published: 3 codes
14
Developer 14
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
15
Developer 15
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
16
Developer 16
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
17
Developer 17
Rating
(567)
Projects
864
61%
Arbitration
33
27% / 45%
Overdue
24
3%
Free
Published: 1 code
Similar orders
I need an independent review of an existing MT5 EA and Python AI bridge. Fixed budget: USD 50 for an initial audit only, not a complete rewrite or profitability guarantee. Please prioritize: 1. Duplicate/stale commands and account/group isolation. 2. Shared position limits and cross-group closing, including partial failures. 3. Restart recovery, stale status, deployment failures and credential protection. Deliver a
I am looking for a quantitative strategy researcher and MQL5 developer to help research, validate and prototype a fast automated XAUUSD trading system for MT5. The target is tick-level trading with positions typically held for seconds, closely spaced entries, and configurable bursts of multiple positions during a qualifying opportunity. IMPORTANT: We do not yet have a validated profitable strategy. I need someone who
un écosystème logiciel asynchrone multi-comptes dopé par un module de supervision par Intelligence Artificielle (Guardian AI). La solution assure le pilotage automatisé, le filtrage de marché en temps réel et le contrôle des risques pour 20+ comptes MetaTrader 4/5 (via MetaApi) et Deriv sur VPS Equinix NY4. vous aurez plus de detail dans les échanges
Specification 1. Objective To acquire or develop a technological solution that allows the generation of temporary “FLASH” USDT on the TRON (TRC20) network, with an on-chain lifespan equal to or greater than 180 days . 2. Functional Scope 2.1 FLASH USDT Generation Creation of temporary USDT tokens visible on the TRON TRC20 blockchain. Minimum lifespan: 180 days (or higher, depending on configuration). 2.2
RA_BOT 2.0 36+ USD
//@version=4 study(title="UT Bot Alerts", overlay = true) // Inputs a = input(1, title = "Key Vaule. 'This changes the sensitivity'") c = input(10, title = "ATR Period") h = input(false, title = "Signals from Heikin Ashi Candles") xATR = atr(c) nLoss = a * xATR src = h ? security(heikinashi(syminfo.tickerid), timeframe.period, close, lookahead = false) : close xATRTrailingStop = 0.0 xATRTrailingStop := iff(src >
I am looking for an experienced trading software developer interested in building a long-term working relationship. Im a professional Trader, Coach and Mentor, I work with traders and Student who require customized trading solutions, including automated trading bots, Expert Advisors, custom indicators, trading strategies and other algorithmic trading tools. I am looking for a technically skilled developer who can
O Trading Ventures 30 - 2000 USD
a trading bot that can open and close trade by its self a stop loss of 1.2 lot size and good tp it should be able to learn trends and learn from its mistakes
I have a Telegram signal bot that trades SPX 0DTE options. Each signal includes: entry time, strike, entry price range, stop (~45% of entry), stepped targets (T1..T10, each step ~50% of entry), and a cancel rule. I have the full archive of its signals and its daily chart images (6 support/resistance lines). Task: Build a Python bot that produces the same entries as the original bot in real time and sends them to
Hello, I need a high-quality, reliable, and well-coded Expert Advisor (EA) for MetaTrader 5. The code must be clean, without errors, and optimized for safe trading. The robot needs to trade based on basic technical indicators. Every trade must have a strict Stop Loss and Take Profit for risk management. Please apply only if you are an experienced MT5 developer with a high rating and clean coding history. Best
I'm looking for a developer to build a simple cloud-based monitoring and alert system for a trading account whose performance statistics are displayed on a third-party website. The system should: 1. Monitor the account's balance, equity and open positions. 2. Calculate the current floating drawdown as a percentage of account balance. 3. Send a single alert, preferably via WhatsApp or alternatively email, when

Project information

Budget
200 - 500 USD
Deadline
from 1 to 7 day(s)