UTT RISK REWARD PRO - MT5 (INDICATOR + EA)
==========================================
UltimateTrading.tools  |  https://ultimatetrading.tools
Version 1.01  |  Standalone builds - no Include files needed

WHAT IT IS
----------
A position-size and risk-reward calculator for MetaTrader 5, built for Deriv
synthetic indices as well as Forex, Gold and Crypto. Pick how much to risk,
and it works out the lot size, stop loss and a TP1 / TP2 / TP3 ladder
(1R / 2R / your target R:R, default 1:3), then draws the trade on the chart.

Two editions share the same engine:
  Indicator  UTT_RiskReward_Pro_Indicator_STANDALONE_version_2.mq5
             calculator, chart levels, drag lines, EA-readable buffers
  EA         UTT_RiskReward_Pro_EA_STANDALONE_version_2.mq5
             everything above + a one-click trade button + exact margin

The EA never opens a trade on its own. It only sends an order when you
click the trade button twice (arm, then confirm).

INSTALLATION
------------
Indicator: File > Open Data Folder > MQL5 > Indicators
EA:        File > Open Data Folder > MQL5 > Experts
Copy the .mq5 there, open it in MetaEditor and press Compile (F7), then
refresh the Navigator and drag it onto a chart. For the EA, enable
Algo Trading in the toolbar and "Allow Algo Trading" in its settings.
Use one edition per chart - both draw the same panel.

WHY NOT PIPS
------------
Deriv synthetics have no standard pip, so pip-based calculators get the
lot size wrong there. Risk Reward Pro measures the stop in price and does
the money math from the symbol's own tick size and tick value, so the
result is right on Volatility, Boom/Crash, Step and Jump indices as well
as on FX, metals and crypto.

MARKET AUTO-DETECTION
---------------------
  Deriv synthetic  Volatility, Boom, Crash, Step, Jump, Range Break, DEX,
                   Drift Switch, Basket, Trek, or a Synthetic/Derived path
  Metals           Gold, Silver (XAU, XAG, XPT, XPD)
  Crypto           BTC, ETH, LTC, XRP, BCH, DOGE, SOL, ADA, DOT, BNB
  Forex            currency pairs
  CFD / Other      everything else
The detected class is shown on the panel badge. Distances are shown in
pips on Forex and Gold, and in price points everywhere else.

THREE SIZING MODES (panel button cycles them)
---------------------------------------------
1. ATR AUTO     SL = ATR(14) of the last closed bar x market multiplier
                  Volatility 1.5   Boom/Crash 2.0   Step 1.5   Jump 2.0
                  Forex 1.5        Gold/Metals 1.5  Other 1.5
                (all editable, or one override for every market)
2. MANUAL       SL = a fixed distance (pips on FX/Gold, points on
                synthetics)
3. DRAG LINES   drag the Entry, SL and TP3 lines on the chart; direction
                follows the side the SL is on
The spread is added to the stop distance by default.

WHAT THE PANEL SHOWS
--------------------
  Market badge, BUY/SELL button, sizing-mode button
  Symbol, account balance or equity and currency
  ATR and multiplier, spread (and spread as % of the SL)
  Entry, Stop Loss, TP1 (1R), TP2 (2R), TP3 (target R:R) with money
  LOT SIZE (rounded down to the volume step)
  Risk: the real money at risk after rounding, and its % of the account
  Margin and free margin (estimated "~" in the Indicator, exact in the EA)
  Open risk: money at risk to the stop in open positions, on this symbol
    and on the whole account, plus any open positions with no SL
  Daily budget: closed P/L today vs your daily max loss %
  Status line with the most important warning
The panel is navy/gold, minimisable, scales with screen DPI, and remembers
mode, direction, minimised state and line positions per symbol.

WARNINGS
--------
  MIN LOT       the smallest lot risks more than you asked - shows the
                real risk
  Max lot / volume limit reached
  Insufficient free margin
  Exceeds the daily loss budget
  Spread is 25% or more of the stop
  SL/TP inside the broker's stops level
  Open positions without a stop loss

ON THE CHART
------------
Entry, SL, TP1, TP2 and TP3 lines, red risk and green reward boxes (25 bars
to the right), and labels with each price and its money result.

EA EDITION - ONE-CLICK TRADING
------------------------------
  Click 1   arms the button (it turns orange: "CONFIRM ... click again")
  Click 2   within 5 seconds sends the order
  Single position at TP1, TP2 or TP3 (input, default TP3), or
  Split into 3 positions closing at TP1, TP2 and TP3 (if a third of the
  lot is at least the minimum lot)
  Drag Lines mode: if the Entry line is away from price, a pending
  Buy/Sell Stop or Limit order is placed instead (good till cancelled)
  Refuses to send when Algo Trading is off, the account does not allow
  EA trading, free margin is not enough or the lot is zero
  Inputs: show/enable trade button, TP level, split, magic number
  (20261105), max slippage (30 points), order comment

INPUTS (both editions)
----------------------
Risk               risk mode (% or money), risk value (1%), risk base
                   (balance / equity), target R:R (3), daily max loss % (3),
                   commission per lot round-turn
Stop Loss Engine   sizing mode, direction, ATR period (14), ATR timeframe,
                   add spread to SL, manual SL distance, multiplier override
ATR Multipliers    one per market type
Chart Drawing      lines, boxes, labels, box length
Panel              X / Y position, start minimised, font size

INDICATOR BUFFERS (for EAs via iCustom / CopyBuffer, shift 0)
-------------------------------------------------------------
  0  Lot size
  1  Stop loss price
  2  TP3 price
  3  Direction (+1 buy / -1 sell, 0 = not ready)

DISCLAIMER
----------
Educational tool, not financial advice. Trading synthetic indices, forex,
metals and crypto carries a high risk of loss. Test on a demo account first.
