Mantra Order Info Panel
- Utilitários
- Fathan Afif Arsetya
- Versão: 2.0
- Ativações: 5
This expert advisor (EA) for MetaTrader 5, titled Amanda, is a sophisticated monitoring and diagnostic tool designed for multi-asset traders. Unlike standard trading bots that focus solely on execution, Amanda acts as a comprehensive real-time dashboard, providing an intricate breakdown of exposure, performance metrics, and risk assessment for two of the most volatile assets in the financial markets: Gold (XAUUSD) and Bitcoin (BTCUSD). It is engineered to bridge the information gap often found in the standard MT4/MT5 terminal interface by consolidating disparate data points into a single, readable chart overlay.
One of the most powerful features of this script is its Dynamic Symbol Suffix Detection. Traders frequently encounter issues when moving between brokers because of varied naming conventions, such as XAUUSDc , XAUUSD.m , or XAUUSD.i . This EA eliminates that friction by scanning the market watch for partial matches, ensuring that the logic remains functional regardless of the broker’s specific naming architecture. This adaptability makes it a versatile tool for professional traders who manage accounts across multiple brokerage platforms.
The code implements a meticulous Dual-Asset Tracking Engine that separates Buy and Sell positions for both XAUUSD and BTCUSD. By iterating through the global position pool, the EA calculates specific running profits, total lot sizes, and position counts for each direction. This allows a trader to see at a glance if they are over-leveraged in a particular direction or if their "hedge" is actually performing as intended. It provides a granular view that the standard "Trade" tab in MetaTrader simply cannot offer.
A critical component of the Amanda EA is the Volume-Weighted Average Price (VWAP) Calculation. For traders who utilize grid strategies or multiple entry points, knowing the exact break-even price of a basket of trades is vital. The script calculates the average entry price by weighting each entry against its volume ($Total\ Value / Total\ Lots$). This value is then rendered on the chart using the specific decimal precision (Digits) of the underlying asset, ensuring that XAUUSD’s 2-digit format and BTC’s 0-digit format are displayed with clinical accuracy.
Beyond current performance, the EA introduces Proactive Risk and Reward Projections by analyzing Take Profit (TP) and Stop Loss (SL) levels. It doesn't just show where the prices are; it calculates the potential monetary outcome of those levels in real-time. By utilizing the SYMBOL_TRADE_TICK_VALUE and SYMBOL_TRADE_TICK_SIZE functions, the code determines exactly how many dollars will be gained or lost if the targets are hit. This helps traders visualize their "Potential LONG Profit" versus "Potential LONG Loss" without manual calculation.
To provide a broader context of the trading day, the script includes a Daily Gain and Realized Profit module. It compares the current account equity against the "Balance at the Beginning of the Day" (BOD). By filtering through the account history for deals closed since the last midnight, it calculates a "Today's Gain" metric. This feature is essential for disciplined traders who set daily profit targets or maximum drawdown limits, as it provides a percentage-based growth figure relative to the starting daily balance.
The user interface of the EA is built using a Clean-Stream Commenting System, which replaces the cluttered default chart information with a structured, high-contrast dashboard. The output is organized into distinct sections using visual separators, making it easy to distinguish between Gold and Bitcoin data. This design philosophy ensures that even during periods of high market volatility, a trader can digest the most important information—such as running drawdowns or total exposure—within a split second.
Finally, the Amanda EA is built with High-Efficiency Execution in mind. The code is optimized to run within the OnTick() event, ensuring that every price movement triggers a refresh of the data. However, it is also designed to be lightweight, avoiding unnecessary memory overhead. By centralizing all calculations into a single, modular script, it provides a powerful "command center" for the modern trader, turning a standard chart into a professional-grade analytical workstation.
