Risk Lot Panel — drag the stop line, read the lot size for your risk percentage
Info
The Risk Lot Panel — drag the stop line, read the lot size for your risk percentage is a Indicator for MetaTrader 5 that how to useattach the indicator. A red STOP line appears 3 × ATR below the price and a green TARGET line at 2 R.
Usage
This tool is typically used for enhancing chart analysis and decision making.
Platform
This Indicator works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Indicators folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use Risk Lot Panel — drag the stop line, read the lot size for your risk percentage
1. Installation: Place your file in the MQL/Indicators folder via "Open Data Folder" and restart your terminal.
2. Loading: Find the indicator in the Navigator, drag it onto your chart, and configure the input parameters in the popup window.
3. Customization: Press Ctrl+I to open the indicator list, select your tool, and click "Properties" to change colors, levels, or visual styles.
4. Updating: Replace the old file in the Indicators folder with the new version and restart the platform to apply changes.
Frequently Asked Questions
Q: Why is my indicator not showing? A: Verify the file is in the MQL/Indicators folder, or try right-clicking the "Indicators" tree in the Navigator and clicking "Refresh."
Q: Do custom indicators slow down the platform? A: Too many complex indicators can impact performance; remove unused ones via the "Indicator List" (Ctrl+I).
Q: Can I use MT4 indicators on MT5? A: No, MQL4 and MQL5 are distinct languages; ensure the indicator is compiled specifically for your platform version.
What this tool does
How to useAttach the indicator.
Typical Use Case
This Indicator excels in automated trading and technical analysis on MetaTrader 5.
Compatible Platform & Setup
This Indicator works on MetaTrader 5. Place the file in the MQL5/Indicators folder and restart the terminal.
Description & Settings
Related: Swap Cost Panel — tonight's rollover cost for every open position - another powerful indicator for MetaTrader 5 traders.
Also recommended: Account Information Panel with Daily P/L and Equity Drawdown - similar indicator with strong performance on MetaTrader 5.
How to use
Attach the indicator. A red
STOP
line appears 3 × ATR below the price and a green
TARGET
line at 2 R.
Drag the STOP line to where your stop belongs. Put it above the price for a sell.
Read
LOTS
in the panel and enter that size in your order.
The panel updates every second and immediately when a line is dragged.
Panel row
Meaning
Risk
Risk % and the money it represents
Entry
Ask for a buy, bid for a sell
Stop
Stop price and distance in points
1 lot loses
Money lost by 1.00 lot between entry and stop
LOTS
Size rounded
down
to the volume step (raw value in brackets)
At risk
Money actually at risk at that size
Target
Reward:risk of the target line
Why it is correct on gold
Pip-value formulas break on gold and CFDs: contract sizes differ between brokers (100 oz, 10 oz, 1 oz), profit currencies differ, and the account may be in EUR, GBP or INR. The panel asks the terminal with OrderCalcProfit() how much 1 lot loses between entry and stop, using the broker's own contract specification.
double
LossPerLot(
const
ENUM_ORDER_TYPE
t,
const
double
entry,
const
double
sl) {
double
p=
0.0
;
if
(!
OrderCalcProfit
(t,
_Symbol
,
1.0
,entry,sl,p))
return
(
0.0
);
return
(
MathAbs
(p)); }
// lots = equity * risk% / 100 / LossPerLot(...), rounded down to SYMBOL_VOLUME_STEP
Stop distance and size
A wider stop gives a smaller size; the money at risk stays the same. If the minimum lot would already risk more than your budget, the panel shows
0.00
in red: the stop is too wide for that account size.
Inputs
Input
Default
Description
Risk per trade, %
0.50
Risk per trade
Risk base
Equity
Equity or balance
Initial stop, ATR ×
3.0
Where the stop line first appears
ATR timeframe
H1
ATR timeframe
Show target line
true
Reward:risk line
Initial target, R
2.0
Where the target line first appears
Panel X / Y, colours
—
Layout
You may also like: ATR Stop Distance and Risk-Based Lot Size Calculator Panel - excellent alternative for indicator users on MetaTrader 5.
Source Code
#property copyright "RobotFX"
#property link "https://robotfx.org"
#property version "1.00"
#property description "This code is educational. Feel free to use, modify and upgrade as you wish. Visit ROBOTFX.ORG for professional trading tools"
#property indicator_chart_window
#property indicator_plots 0
enum ENUM_RLP_BASE
{
RLP_EQUITY=0,
RLP_BALANCE=1
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.