-->

Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

Metatrader 5 Expert Advisor | Bulk Trade and Position Manager | Expert Advisor Code

New free code from MQL5: indicators, EAs, and scripts for traders.

Bulk Panel on Chart

Bulk Trade and Position Opener is a lightweight MQL5 utility designed to automate the simultaneous opening of multiple market positions. It is particularly useful for developers and traders testing grid-based strategies, scalping techniques, or stress-testing execution speeds across different brokers. 🛠️

✨ Key Features

  • 📦 Batch Execution: Opens up to 5 positions per click using the CTrade class for reliable execution.

  • 🔢 Automatic Pip Calculation: Handles 3/5 digit broker differences automatically for SL/TP placement.

  • ⚡ Filling Mode Detection: Includes logic to detect the broker's supported filling modes (FOK, IOC, Return).

  • 🧹 Global Management: A simple "Close All" function to wipe all positions associated with the tool’s Magic Number.

  • 📊 Real-time Stats: On-screen display of floating Profit/Loss and position count.

⚙️ Technical Implementation Notes

The source code demonstrates:

  1. Request Handling: How to structure multiple MqlTradeRequest calls in a single loop.

  2. Validation: Basic checks for SymbolInfoDouble to ensure Stop Levels and Lot steps are respected.

  3. UI Integration: Use of ChartObjects for a clean, non-intrusive interface.

  4. Magic Number Isolation: Ensures the tool only manages trades it opened, preventing interference with other EAs.

📥 Input Parameters

  • Positions_Count (int): Number of market orders to open (default 5).

  • Lot_Size (double): Trading volume for each position.

  • Stop_Loss_Pips (int): SL distance from price.

  • Take_Profit_Pips (int): TP distance from price.

  • Magic_Number (long): ID to track trades.

  • Order_Comment (string): Custom comment for order history.

🔥 Upgrade to the Professional Version

For users requiring Stealth Mode (virtual SL/TP), pending order support, or higher position limits (up to 100), please refer to the Pro version here: 👉 Get the Pro Version here

Experience adaptive trading with the Fluid Expert Advisor for MT4/MT5. Dynamic money management and trend detection. Click for info.

Build better strategies with RobotFX professional tools – check them out.

69373

Best MetaTrader Indicators + Profitable Expert Advisors