New free code from MQL5: indicators, EAs, and scripts for traders.
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:
-
Request Handling: How to structure multiple MqlTradeRequest calls in a single loop.
-
Validation: Basic checks for SymbolInfoDouble to ensure Stop Levels and Lot steps are respected.
-
UI Integration: Use of ChartObjects for a clean, non-intrusive interface.
-
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