거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Facebook에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
Experts

Portfolio Allocation Planner — budget-to-lots dashboard and CSV - MetaTrader 5용 expert

Fabien Martino
Fabien Martino
30 years of programming. 7 years of trading. 5 published MetaTrader 5 Expert Advisors.
| Korean Français
조회수:
166
평가:
(1)
게시됨:
업데이트됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

Portfolio Allocation Planner

Before configuring a basket, see which target weights fit your broker's minimum lots. This free open-source tool turns an explicit hypothetical notional budget and percentages into a chart dashboard. It shows the minimum-lot notional, lots rounded down, calculated allocation, target shortfall and status of each row. Recalculate on demand, hover for details, paginate longer baskets and optionally export the displayed snapshot to CSV.

Native MT5 allocation dashboard, US500 rounded down

Native MT5 snapshot: hypothetical 5,000 USD notional budget, weights 50/30/20, quote age limit = 0 (historical quotes permitted). Page 1/3: US500 rounded down to 0.3 lot.

Install and use

  1. Copy PortfolioAllocationPlanner.mq5 to MQL5/Experts and compile with F7 in MetaEditor.
  2. Select the exact broker symbols in Market Watch and wait for quotes.
  3. Attach the utility to a separate chart without a trading EA. It is an interface EA with no trading function.
  4. Enter InpBudget, the explicit InpBudgetCurrency, comma-separated InpSymbols and matching InpWeightsPct. Use a decimal point; total weights must be greater than zero and at most 100%. Weights are not normalized. Empty symbols uses the chart symbol with one weight.
  5. Click Recalculate for a new snapshot; press F7 to change inputs. Choose PAP_FR or PAP_EN for the panel language.
  6. CSV export is off by default. Enable InpAllowCSVExport and click Export CSV to create a uniquely named UTF-8 semicolon-separated file in MQL5/Files.

InpPanelMaxWidth caps the panel width (default 1100 pixels, minimum 580 pixels). The panel also adapts to the chart window; longer portfolios use pages when available height is limited.

What the results mean

Long-side notional is Ask × contract size × an explicit currency conversion rate. Volume is rounded down on the broker lot-step grid, capped by the per-order maximum and static directional limit. Below-minimum targets stay at zero lots. The minimum notional budget estimate is the largest minimum-lot notional / target weight among resolved positive rows. It is not a recommended account deposit; unresolved rows make the basket incomplete, and the estimate does not guarantee exact weights or accepted orders.

The broker profit currency determines the native notional currency. For a different budget currency, supply exact already selected direct/inverse Forex symbol names in InpFXSymbols. Q/B uses Ask and B/Q uses 1/Bid. The route is verified from base/profit currency metadata; names and cross rates are never guessed. Quotes older than InpMaxQuoteAgeSeconds (120 by default) are unavailable; 0 explicitly permits historical estimates.

Supported calculation modes: Forex, Forex No Leverage, CFD, CFD Index, CFD Leverage, Exchange Stocks and Exchange Stocks MOEX. Futures, bonds, options and custom/synthetic symbols are unsupported. Notional is neither margin nor maximum loss. Existing exposure, session availability, funds, commission, swap, slippage and liquidity are outside scope. Static directional caps do not account for existing positions.

No orders are sent and no account number, balance, equity or positions are read. Only uniquely prefixed objects belonging to this tool are drawn and removed. Chart settings, other chart objects, Market Watch selection and terminal globals are unchanged. Files are written only after CSV opt-in and an explicit export click. No DLL, WebRequest or external library. Original utility by Fabien Martino; MIT license is included in the source.

Native MT5 allocation dashboard, USTEC below minimum lot

Same snapshot, page 2/3: USTEC target is below the broker minimum lot; calculated volume remains zero.



Broker Basket Preflight — read-only contract and minimum-volume diagnostics Broker Basket Preflight — read-only contract and minimum-volume diagnostics

Read-only MT5 script for exact Market Watch symbols: contract and volume rules, quote age and spread, isolated BUY/SELL margin, one-tick price moves and spread-only results in account currency. MIT source; Experts journal output.

AgentGuard — Independent Risk Guard for AI Agents in MetaTrader 5 AgentGuard — Independent Risk Guard for AI Agents in MetaTrader 5

Independent Risk Guard for AI Agents in MetaTrader 5.

Risk-Based Lot Size Calculator Script with On-Chart Panel Risk-Based Lot Size Calculator Script with On-Chart Panel

Calculates the lot size for a chosen risk percent and stop loss distance, and shows the result in a clean panel on the chart.

MACD Signals MACD Signals

Indicator edition for new platform.