OPEN-SOURCE SCRIPT
Yuki Leverage RR Calculator

**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.
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の精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。