Advanced Adaptive Grid EA

MQL4 专家

指定

Project Overview: Advanced Adaptive Grid EA

This document outlines the development specifications for a sophisticated MQL4 Expert Advisor. The EA is designed to be a fully featured, institutional-grade trading tool employing an adaptive grid strategy with advanced risk management and user control.

Core Features

  1. Advanced Risk Control:

  • Equity Protection: Automatically closes all trades and halts trading if drawdown exceeds a user-defined percentage of the account balance.

  • Adaptive Lot Sizing: Automatically calculates lot sizes based on account equity, a fixed value, or a risk percentage per trade.

  • ATR-Based Stop Loss: Sets dynamic stop losses based on market volatility using the Average True Range (ATR) indicator.

  • Margin Limit: Prevents new trades if the used margin percentage exceeds a specified limit.

  1. Smarter Grid System:

  • Adaptive Grid Spacing: Dynamically adjusts the distance between grid orders using ATR or Bollinger Bands, widening the grid in volatile markets and tightening it in calm markets.

  • Asymmetric Spacing: Allows for different grid spacing for buy and sell trades.

  1. Intelligent Exit Logic:

  • Partial Profit-Taking: Closes a portion of a trade at a preliminary take profit level (TP1), letting the remainder run.

  • Equity-Based Trailing Basket: Trails a stop loss for the entire basket of trades (buys or sells) based on the total floating profit, locking in gains as the basket becomes more profitable.

  1. On-Chart Control & Transparency:

  • Quick Control Panel: Interactive buttons on the chart to immediately close all buys, close all sells, close all trades, or pause/resume new trading.

  • Expanded Dashboard: A comprehensive real-time display of account balance, equity, margin usage, floating P/L for buys and sells, current drawdown percentage, and EA status.

  1. Dynamic Market Adaptability:

  • Dynamic Slippage Handling: Automatically increases allowed slippage during periods of high volatility (e.g., news events) to ensure order execution.

  • News & Session Filters: Avoids trading during high-impact news events (requires external URL) and outside of specified trading sessions.

  1. Analysis & Optimization:

  • Detailed Trade Logs: Exports a detailed CSV log of every trading decision (order open, close, modify), including the reason, for easy performance review and optimization.

Part 1: EA Settings (Global extern Variables)

These inputs provide full control over the EA's behavior.

  • General Settings

  • MagicNumber: int - Unique identifier for the EA's trades.

  • TradeComment: string - Custom comment for trades.

  • Risk Management

  • LotSizing_Mode: enum - (EQUITY_BASED, FIXED_LOT, RISK_PERCENT)

  • Equity_Per_Lot: double - (e.g., 10000) Dollars of equity per 1.0 lot.

  • Lot_Size: double - Lot size to use(fixed,Equity percentage) 

  • Risk_Percent_Per_Trade: double - Risk % of balance for SL calculation if mode is RISK_PERCENT.

  • Max_Drawdown_Percent: double - The drawdown % of balance at which to close all trades and stop.

  • Stop_Trading_After_DD: bool - If true, the EA will not trade again after hitting the max drawdown.

  • Max_Margin_Usage_Percent: double - Maximum allowed margin level % before new trades are blocked.

  • ATR_SL_Period: int - Period for the ATR indicator for stop loss calculation.

  • ATR_SL_Multiplier: double - Multiplier for the ATR value to set the stop loss distance.

  • Grid Strategy

  • Grid_Spacing_Mode: enum - (ATR_BASED, BOLLINGER_BANDS, FIXED_POINTS)

  • Grid_ATR_Period: int - Period for the ATR indicator for grid spacing.

  • Grid_ATR_Multiplier_Buy: double - Multiplier for ATR to determine buy grid spacing.

  • Grid_ATR_Multiplier_Sell: double - Multiplier for ATR to determine sell grid spacing.

  • Grid_Fixed_Points: int - Grid spacing in points if mode is FIXED_POINTS.

  • Exit Strategy

  • Enable_Partial_Close: bool - Master switch for partial closing.

  • Partial_Close_TP1_Points: int - Profit in points to trigger the first partial close.

  • Partial_Close_Percent: double - Percentage of the trade to close at TP1 (e.g., 50.0).

  • Enable_Equity_Trail: bool - Master switch for basket equity trailing.

  • Equity_Trail_Start_Profit: double - Amount of profit in account currency to activate the trail.

  • Equity_Trail_Distance: double - Amount of profit to give back before the trail stops out the basket.

  • Filters & Slippage

  • Enable_Session_Filter: bool - Enable trading only during specific hours.

  • Session_Start_Hour, Session_End_Hour: int - Trading session hours (server time).

  • Base_Slippage: int - Normal slippage in points.

  • Volatility_Slippage_Multiplier: double - Multiplier for slippage during high volatility.

  • Volatility_ATR_Threshold: double - ATR value (as % of price) to trigger higher slippage.

  • Logging & Dashboard

  • Enable_CSV_Log: bool - Enable writing detailed logs to a CSV file.

  • CSV_Log_Filename: string - Filename for the log.

Part 2: Program Structure

  • OnInit(): Initializes the EA. Creates the on-chart dashboard and control panel buttons. Opens the CSV file for logging if enabled.

  • OnDeinit(): Cleans up resources. Deletes all chart objects and closes the CSV file.

  • OnTick(): The main execution loop. The logic must be ordered carefully:

  1. Check if trading is globally stopped.

  2. Check for and handle any button clicks from the control panel.

  3. Run all safety checks: Max Drawdown, Margin Limit, Session Filter.

  4. Run all exit logic for existing trades: Equity Trailing, Partial Closing.

  5. Run all management for existing trades: Apply ATR-based Stop Losses.

  6. Run logic for placing new grid orders if conditions are met.

  7. Update the on-chart dashboard with the latest information.

  • OnChartEvent(...): Handles user interaction with the on-chart control panel buttons.

Part 3: Helper Function Implementation

This EA will be composed of many specialized functions to keep the code clean and manageable.

  • Risk & Lot Size Functions: CheckMaxDrawdown(), CalculateLotSize(), IsMarginLevelOK().

  • Grid & Order Placement Functions: CalculateGridSpacing(), PlaceNewGridOrders().

  • Trade Management Functions: ManageOpenTrades(), ApplyATRStopLossToAll(), HandlePartialClosing(), HandleEquityTrailing().

  • Filter Functions: IsInTradingSession().

  • Dashboard & Control Functions: CreateDashboard(), UpdateDashboard(), CreateControlPanel(), HandleButtonClicks().

  • Logging Functions: InitializeCSVLog(), LogTradeAction(...).

  • Utility Functions: CloseAllByDirection(...), GetBasketProfit(...), GetCurrentDrawdownPercent().


附加的文件:

反馈

1
开发者 1
等级
(230)
项目
286
27%
仲裁
14
50% / 36%
逾期
9
3%
已载入
2
开发者 2
等级
(94)
项目
135
17%
仲裁
4
25% / 25%
逾期
12
9%
已载入
3
开发者 3
等级
(13)
项目
17
18%
仲裁
3
67% / 0%
逾期
0
工作中
4
开发者 4
等级
(12)
项目
14
0%
仲裁
1
0% / 0%
逾期
0
工作中
5
开发者 5
等级
(51)
项目
65
40%
仲裁
1
0% / 100%
逾期
7
11%
空闲
6
开发者 6
等级
(460)
项目
904
77%
仲裁
25
16% / 68%
逾期
99
11%
工作中
发布者: 1 文章, 6 代码
7
开发者 7
等级
项目
0
0%
仲裁
3
0% / 33%
逾期
0
工作中
8
开发者 8
等级
(4)
项目
8
13%
仲裁
0
逾期
2
25%
工作中
9
开发者 9
等级
(14)
项目
19
11%
仲裁
1
0% / 100%
逾期
5
26%
空闲
10
开发者 10
等级
(2)
项目
2
0%
仲裁
0
逾期
0
工作中
11
开发者 11
等级
(11)
项目
11
18%
仲裁
1
0% / 0%
逾期
1
9%
空闲
12
开发者 12
等级
项目
0
0%
仲裁
0
逾期
0
空闲
13
开发者 13
等级
(109)
项目
137
43%
仲裁
8
38% / 38%
逾期
6
4%
空闲
14
开发者 14
等级
(1)
项目
1
0%
仲裁
0
逾期
0
空闲
15
开发者 15
等级
(11)
项目
17
18%
仲裁
6
50% / 50%
逾期
4
24%
繁忙
16
开发者 16
等级
(270)
项目
550
49%
仲裁
55
40% / 36%
逾期
227
41%
工作中
17
开发者 17
等级
(138)
项目
170
53%
仲裁
10
80% / 0%
逾期
0
空闲
发布者: 1 代码
18
开发者 18
等级
(1)
项目
1
0%
仲裁
2
0% / 0%
逾期
0
工作中
19
开发者 19
等级
(77)
项目
232
73%
仲裁
6
100% / 0%
逾期
1
0%
空闲
20
开发者 20
等级
(3)
项目
1
0%
仲裁
3
0% / 67%
逾期
0
工作中
21
开发者 21
等级
(4)
项目
4
25%
仲裁
2
0% / 0%
逾期
0
繁忙
相似订单
Catégorie : Experts → Développement d’EA (MQL5) Plateforme : MetaTrader 5 (option MT4 si besoin) Type : Projet au forfait (Escrow MQL5) Budget cible : 250 – 500 USD (négociable selon complexité) Délais souhaités : 10 –20 jours pour v1 🎯 Objectif Créer (ou améliorer) un Expert Advisor MQL5 de suivi de tendance (Forex majeures + XAUUSD, option indices). L’EA doit détecter et exploiter les mouvements directionnels avec
Développeur MQL5 expérimenté – EA de scalping & multi-actifs (budget serré) Catégorie : Experts → Développement d’EA (MQL5) Plateforme : MetaTrader 5 (option MT4 si besoin) Type : Projet au forfait (Escrow MQL5) Budget cible : 250 - 500 USD (négociable selon complexité) Délais souhaités : 10 –20 jours pour v1 🎯 Objectif Créer (ou améliorer) un Expert Advisor MQL5 axé scalping et multi-actifs (Forex majeures +
Hello, i already have an algorithm and a vps server to run the algo need help on the operations behind that situation would you able to assist in this i have all knowledge and all vidoes that would help you out for this task Ongoing support with operations and monitoring (additionally also your consideration or your opinion on how to scale it more using more prop firms etc using different scripts and strategies)
Modify existing ea 30 - 35 USD
Help me modify my EA, its in Mql4 with these simple parameter and also cross check for smooth running. 1) check if equity dd, balance dd are on point. Additions of parameters: 2)max spread 3)cover all commission, spillages and others for breakeven not to be negative amount or loss money, 4)set close and start of trading days with time (true or false) 5)close all open trades before market close on fridays with time
I need a ready made EA to make a lot of trades every day to earn broker rebates. EA should be stable and do not blow account suitable for forex or gold should work with low deposits like 500-1000 should open min 5 lots daily should be compatible with high spread accounts like 50 for EURUSD only ready made solutions, I dont have any strategy and all methods are allowed. if you have any thing ready please send test
I need an over tu internet copier, but i will require a complex architecture; the dev must be really knowledge able to handle this. Feel free to dm and tell me if you can do this
HELLO DEVELOPERS, I NEED THE BEST DEVELOPER TO BE ABLE TO ADD GPAHICAL MODIFICATIONS AS WELL AS A SEQUENCE TO MY EXPERT FOR TRADING. IF YOU HAVE TIME TO DO IT AS QUICKLY AS POSSIBLE PLEASE APPLY. IT IS GOOD THING TO BE ABLE TO SPEAK ENGLISH SO THE COMMUNICATION WILL BE GOOD. ALSO IN THIS JOB YOU WILL BE REQUIRED TO WORK ON TELEGRAM AS THE EXPERT HAS ALERTS THAT ARE SENT THERE. MUST HAVE DONE MANY JOBS ON HERE AND
Automate my trading 30 - 100 USD
I have a trading strategy that I would like to automate. It uses Moving average, CCI and RSI. I need and experienced developer to build me an EA out of that. Kindly let me know your experience as this project is huge. Thanks
THE BOT 10000+ USD
📌 Trading Bot Requirements & Functional Description 1. Core Objective The bot is designed to automate trading on MT5 using ICT-based and price-action strategies with dynamic trade management. It should integrate signal generation , risk management , and execution , while allowing flexibility for future strategy adjustments. 2. Technical Requirements Platform : Python-based, connected to MetaTrader 5 (MT5) for order
I want a bot that reads signals from my Telegram channel and auto-executes those trades on my Pocket Option account. 1. Direction mode hedge_both: open BUY (CALL) and SELL (PUT) at the same time (typically split the amount 50/50 per side). signal_only: open only the direction specified by the signal (CALL or PUT). 2. Respect signal direction When direction_mode = signal_only, a CALL signal opens a CALL; a PUT signal

项目信息

预算
100+ USD
截止日期
 2  5 天

客户

(1)
所下订单7
仲裁计数0