Rocket Fx Multi Target EA
- Utilità
- Jeffrey Bucsit
- Versione: 3.2
- Aggiornato: 16 maggio 2025
- Attivazioni: 5
This MetaTrader 4 Expert Advisor (EA) is designed to place multi-target pending orders (both buy and sell) with individual take profit levels and shared stop loss. Here's how it operates:
Key Features
-
Multi-Target Order Placement: Creates pending orders (Stop or Limit) with up to 4 take profit targets
-
Risk Management: Calculates position size based on account balance and user-defined risk percentage
-
User Interface: Provides input fields for entry prices, stop losses, take profits, and lot size
-
Order Management: Includes functions to close all orders and toggle between stop/limit orders
Operation Flow
Initialization
-
Creates a GUI with input fields for:
-
Buy/Sell entry prices
-
Stop loss levels
-
Take profit targets (4 levels)
-
Lot size
-
-
Sets up buttons for placing orders, closing all positions, toggling order type, and calculating lot size
-
Displays risk management information (account balance, risk percentage, max lot size)
Order Placement
-
User enters parameters in the input fields:
-
Entry prices (buy and/or sell)
-
Stop loss levels
-
Take profit targets (up to 4)
-
Lot size (or calculates automatically)
-
-
When "Place Orders" is clicked:
-
Converts pending orders into 4 separate orders (one for each TP level)
-
Each order has 1/4 of the total lot size
-
Uses either stop or limit orders based on toggle setting
-
Assigns unique magic numbers and comments to track orders
-
Risk Management
-
Calculates maximum lot size based on:
-
Account balance
-
User-defined risk percentage (default 5%)
-
Distance between entry and stop loss
-
-
Updates risk information in real-time on the chart
Additional Functionality
-
Close All: Closes all open positions and deletes pending orders
-
Order Type Toggle: Switches between stop and limit orders
-
Auto Lot Calculation: Calculates appropriate lot size based on stop loss distance
-
Trailing Stop: Moves stop loss to breakeven when first TP is hit
-
Security Checks: Validates authorized accounts and license expiration
Technical Details
-
Uses separate orders for each TP level rather than partial closes
-
Maintains visual feedback through chart labels
-
Includes error handling for order operations
-
Designed for forex markets (handles JPY pairs correctly)
This EA provides a structured way to implement multi-target trading strategies while maintaining strict risk control parameters.
