OPEN-SOURCE SCRIPT

Yuki Leverage RR Calculator

84
**YUKI LEVERAGE RR CALCULATOR**

A professional-grade risk/reward calculator for leveraged crypto or forex trades.
Instantly visualizes entry, stop loss, targets, leverage, and risk-to-reward ratios — helping you plan precise positions with confidence.

──────────────────────────────
**WHAT IT DOES**
Calculates position value, quantity, stop-loss price, liquidation estimate, and per-target profit.
Displays everything in an on-chart table with optional price tags and alerts.

──────────────────────────────
**KEY FEATURES**
• Long / Short toggle (only one active at a time)
• Leverage-aware position sizing based on Position Cost ($) and Leverage
• Dynamic Stop Loss: input % → auto price + $ risk
• Up to 3 Take-Profit Targets with scaling logic
• Instant R:R ratios per target
• Liquidation estimate (approximation only)
• ENTRY / SL / T1 / T2 / T3 / LIQ visual tags
• Dark/Light mode, adjustable table and tag size
• Built-in alerts for Targets and Stop Loss

──────────────────────────────
**INPUTS**
• Long or Short selection
• Entry Price, Stop Loss %
• Target 1 / Target 2 / Target 3 + Take Profit %
• Position Cost ($), Leverage
• Visual preferences: show/hide table, table corner, font size, tag offset, text size

──────────────────────────────
**TABLE OUTPUTS**
Position Info: Type, Entry, Position Cost, Leverage, Value
Risk Section: Stop Loss %, Stop Loss Price, Total Risk ($), Liquidation % & Price
Targets 1–3: Profit ($), R:R, Take Profit ($), Runner % or PnL

──────────────────────────────
**ALERTS**
• Target 1 Hit – when price crosses T1
• Target 2 Hit – when price crosses T2
• Target 3 Hit – when price crosses T3
• Stop Loss Hit – triggers based on direction

(Use TradingView Alerts → Condition → Indicator → select desired alert)

──────────────────────────────
**HOW TO USE**

1. Choose Long or Short
2. Enter Entry Price, Stop Loss %, Position Cost, and Leverage
3. Add Targets 1–3 with optional Take Profit %
4. Adjust visuals as desired
5. Monitor table + alerts for live trade planning

──────────────────────────────
**NOTES**
• Liquidation values are estimates only
• Fees, slippage, and funding not included
• Designed for educational and planning purposes

──────────────────────────────
⚠️ **DISCLAIMER**
For educational use only — not financial advice.
Trading leveraged products involves high risk of loss.
Always confirm calculations with your exchange and trade responsibly.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.