Risk and Lot Size Calculator Panel
- 实用工具
- 版本: 1.0
- 激活: 5
Risk and Lot Size Calculator works out the lot size for the amount you are prepared to lose. Drag three lines on the chart (entry, stop loss, take profit) and the panel shows the lot size, the money at risk, the profit at the take profit, the risk:reward ratio and the estimated margin. It is a calculation and display tool only: it never opens, modifies or closes any order. The numbers are an estimate; the real fill, profit/loss and margin are decided by your broker's conditions.
HOW IT WORKS
- Three horizontal lines: entry (dashed), stop loss and take profit. Move the mouse onto a line and drag it. A stop loss below the entry means a buy, above the entry means a sell.
- The entry line can also follow the current price ("Follow price" button).
- The lot size is rounded DOWN to the symbol's volume step, and kept within the minimum and maximum volume.
- Text on each line: lot size, stop distance and money at risk, take-profit distance, profit and risk:reward.
- Buttons: Copy lot (saves the lot size to a terminal global variable, see below), Reset lines, Follow price. Click the title bar to collapse the panel.
WHAT THE PANEL SHOWS
- Lot size (large) and direction.
- Risk: money at risk and its % of the base, and the target amount you set.
- Stop loss distance (pips on forex symbols, price difference and points on other symbols) and the distance including the spread.
- Take profit distance, risk:reward, profit at the take profit.
- Margin required (estimate), spread, loss per 1 lot.
- Warnings: the minimum lot already exceeds your risk (the minimum lot is shown and the actual risk is larger than the target), limited to the maximum lot, not enough free margin, stop closer than the stops level, new trades or this direction not allowed on the symbol, take profit on the wrong side.
RISK BASE
- % of balance, % of equity, a fixed amount in account currency, or a % of the prop-account loss room left (the smaller of the daily room and the max room).
- Optional: add the current spread to the stop distance (on by default) and a round-turn commission per 1 lot (0 by default).
PROP ACCOUNT ROOM (optional)
- Daily and max loss limits in % of the initial balance or as an amount. The daily % can be based on the initial balance or on the balance at day start.
- Daily reset time in server time, UTC, Central Europe (CET/CEST) or New York (EST/EDT); summer time is handled automatically.
- Today's P/L automatic (equity minus balance at day start) or entered by hand.
- For trailing max-loss rules, enter the current max-loss equity level by hand (the indicator does not track the trailing peak).
- The panel shows the daily room and the max room left, and both "after a stop-out" at the current lot size, with a warning when this stop-out would reach a limit.
- Presets and firm names are not included. Check the current rules of your own program and set the inputs to match.
CURRENCY CONVERSION
- Symbols quoted against your account currency use the stop-loss / take-profit price for the conversion (for example USDJPY on a USD account). Cross symbols use the current rate of a conversion symbol (via USD if needed).
- On some CFD symbols (gold, silver, indices, crypto, oil) the "tick value" returned by MetaTrader 5 may not be converted to the account currency. The indicator checks the tick value against price distance x contract size x conversion rate and uses the latter when they differ by more than 5%.
- Before release the calculation was checked on demo accounts in JPY and USD on 15 to 17 symbols (forex, gold, silver, stock indices, BTC, ETH, oil): the lot sizes matched a hand calculation, and the loss per lot differed from the terminal's own profit calculation by less than 0.5%. These are results for the accounts, symbols and time of the check; other brokers and symbols can differ.
LIMITS YOU SHOULD KNOW
- Line prices are chart (Bid) prices. A buy is filled at Ask, so the spread is added once to the stop distance as a simple, conservative approximation (for both buy and sell). The spread at the time of the order, slippage and gaps can make the real loss larger.
- The margin is an estimate from the symbol's margin settings, because indicators cannot call the terminal's margin function. Symbols with other margin types (for example futures) show "—".
- Swap is not included.
- One copy per chart. While the mouse is on a line, chart scrolling is paused so that the line can be dragged.
- Copy lot does not use the clipboard (not available to MQL5 programs). It saves the lot size to the global variables RLC_Lot and RLC_Lot_<symbol> (press F3 to see them).
- The lines stay on the chart when the terminal is closed and are back at the same prices after a restart. Removing the indicator removes the lines.
- Do not set the daily reset to a time that occurs twice when summer time ends (02:00-02:59 Central Europe).
IMPORTANT
- This is a calculation tool. It is not a trading signal or advice, and it does not guarantee any result or that a loss stays within any amount or rule. Trade decisions and their results are your own responsibility.
- Before you place an order, check the volume and the expected loss in your trading platform's order window.
OTHER
- MetaTrader 5 only. Hedging and netting accounts, any symbol and timeframe.
- English or Japanese, chosen automatically from the terminal language (can be set by hand). Colors follow the chart background (or set light/dark). Any corner, three sizes.
- No DLLs, no internet access, no files (except an optional debug CSV).
- A PDF user guide (English or Japanese) is available: send a message through MQL5 after purchase and it will be sent to you.
- Support through MQL5 messages, reply within 3 business days: installation, settings and bug reports only. Questions about how much to risk, how a particular program's rules should be read, market views or trade decisions cannot be answered.
