Risk Manager & Position Sizer [martineye15]Prop Firm Risk Manager & Position Sizer — a position-size calculator and rule checker built for funded-account and challenge traders. Place your entry, stop-loss and take-profit on the chart, and the panel returns the exact lot size for your chosen risk, then checks that trade against your prop-firm rules before you take it.
THE CORE IDEA: RISK IS FIXED, LOT SIZE FLOATS
Risk money = account size x risk % (or a fixed cash amount). Lot size = risk money / (stop distance x value per lot + commission). Widening the stop shrinks the position; tightening it grows the position. The money at risk never changes. Sizes are rounded DOWN to your broker's lot step, so actual risk never exceeds planned risk.
TRADE LEVELS
Entry, stop-loss and take-profit are interactive price inputs — click to place them when you add the indicator, then drag the price lines to re-plan and watch every number update live. Entry can follow the current price (market) or sit at a placed level (pending). Direction is derived from the stop's side of entry, or forced long/short to validate your geometry. Optionally, an ATR module sets the stop and target automatically at entry -/+ ATR x multiplier, using the chart timeframe or a higher one, and either the live or the last closed bar's ATR.
ACCOUNT & INSTRUMENT
Set your account size, account currency and risk (percent of account or a fixed cash amount). If the symbol's quote currency differs from your account currency, a conversion rate is fetched automatically (direct pair first, then inverse) and a warning appears if neither resolves. Broker specs are fully adjustable: contract size (auto-derived or manual, for the many CFD symbols whose specs differ from the exchange's), lot step, minimum and maximum lot, and round-trip commission per lot, which is treated as part of the loss. A manual lot override works in reverse: enter a size you already have in mind and the panel tells you the risk money and risk percentage it actually carries.
PROP-FIRM RULE ENGINE
Enter your firm's limits — maximum daily loss, maximum total drawdown, per-trade risk cap, maximum lots, maximum portfolio open risk, and profit target (typical challenge rules are 5% daily, 10% total, 10% target). Log how much you have already lost today and your running P/L, and the panel shows:
- Remaining daily loss budget, and whether this trade fits inside it
- How many identical losing trades it would take to breach the daily limit
- Remaining total drawdown buffer, reduced by any running loss
- Pass/fail on the per-trade risk cap, the lot cap, and combined open risk across positions
- Distance to your profit target, in money and in R multiples of this trade's risk
- A minimum risk:reward check
With hard block enabled, any failed check turns the panel header red and shows DO NOT TRADE.
PANEL, DRAWINGS & ALERTS
A dashboard table (four corner positions, normal or compact, dark or light) shows direction, levels, lot size, units, risk and reward in money and percent, risk:reward, per-pip value for the sized position, every rule check, and a plain-language warnings list explaining anything that is wrong or clamped. Entry, stop and target are drawn as labelled lines with shaded risk and reward zones. Alerts are available for entry, stop or target touches — with the computed lot size and risk in the message — and for any rule check flipping to fail.
HOW TO USE
Add the indicator, click to place entry, stop and target. Set your account size, currency and risk percentage, then enter your broker's contract size, lot step and commission (check these against your own account — CFD specs vary between brokers). Enter your firm's daily loss, drawdown, target and cap rules once. Before each trade, drag the levels to your plan, update the loss-taken-today and current P/L fields, read the lot size, and only take the trade if every check passes.
WHAT MAKES IT DIFFERENT
Most position sizers stop at the lot size. This one continues into the rules that actually end funded accounts: it treats the daily loss budget, the drawdown buffer and total open risk as constraints the trade must fit inside, tells you how many more losses you can survive today, expresses your remaining profit target in R multiples of the position in front of you, and can visibly block the trade when a rule fails. Commission is priced into the size, results are rounded conservatively, and every clamp or failure is explained in plain language rather than silently applied.
IMPORTANT LIMITATIONS — PLEASE READ
Pine Script cannot access your broker account. Account size, loss already taken today, current P/L and risk committed to other open positions are MANUAL inputs — the tool is only as accurate as what you enter, so keep them current during the session. It cannot read your live balance, equity, open positions, spread, swap or margin, and it cannot place, modify or close orders — this is a calculator and a checklist, not an execution tool. TradingView's symbol specifications may not match your prop firm's CFD specifications, which is what the manual contract size override is for: verify the lot size against your broker before trading. The total drawdown check assumes a static limit measured from the initial balance and does not model trailing drawdown. Figures update live with the current bar (ATR in "Current" mode changes as the bar forms); use the "Previous" ATR setting for stable values.
This is a calculation and decision-support tool. It is not a strategy, generates no trade signals, and is not financial advice. Always verify position sizes against your own broker and risk rules. Indicator

GuidedByGod-Position Size Calculator -NQ/ES/YMPosition Size Calculator — NQ/ES/YM (Mini & Micro)
A simple risk-based position sizing tool for Nasdaq (NQ/MNQ), S&P (ES/MES), and Dow (YM/MYM) futures.
Enter how much you're willing to risk (either a fixed dollar amount or a % of your account) and your stop-loss distance in points. The indicator instantly tells you how many contracts to trade so your risk stays exactly where you want it — no manual math, no guessing.
Features:
Works with both mini and micro contracts across NQ, ES, and YM
Auto-detects the contract from your chart, or set it manually
Risk by fixed $ amount or % of account
Stop loss by points, or by entry/stop price
Clean, color-coded panel — green when your size is valid, red if something's off
Fully customizable: dark/light theme, accent color, text size, panel position
Compact mode for a minimal footprint on your chart
Built-in customizable reminder banner to reinforce good risk habits every time you look at the chart
Built for traders who want a quick, reliable way to size positions consistently — especially useful for prop firm evaluations and funded accounts where risk discipline matters most. Indicator

Sumarna17 Control Plan TradingSumarna17 Trade Plan Control System
Adalah indikator TradingView yang dirancang untuk membantu trader membuat keputusan entry dengan lebih disiplin, terukur, dan terencana. Indikator ini menggabungkan sistem Trade Plan, Risk Reward Manager, Lot Calculator, Checklist Validasi, Smart Execution Panel, Running Trade Management, dan Review Journal dalam satu alat lengkap.
Dengan fitur Pre Entry, Running Trade, dan Review Mode, trader bisa mengecek kelayakan setup sebelum entry, mengelola posisi saat trade berjalan, hingga mengevaluasi hasil setelah trade selesai. Cocok untuk trader yang ingin mengurangi entry asal-asalan, menjaga risk management, menghindari overlot, dan membangun kebiasaan trading yang lebih profesional.
Fitur utama:
- Smart Trade Plan System
- RR dan Lot Calculator
- Validasi Entry, SL, dan TP
- Checklist disiplin sebelum entry
- Smart Execution Panel
- TP1, TP2, TP3 Scale Out
- Break Even, Lock Profit, dan Trailing Helper
- Prop Firm Guard
- Running Trade Management
- Review Journal untuk evaluasi trade
Indikator ini cocok untuk trader XAUUSD, Forex, BTCUSD, US100, dan market lainnya yang ingin trading lebih rapi, disiplin, dan tidak emosional.
Catatan Pengembangan:
Indikator ini masih terus dikembangkan dan belum sempurna. Setiap fitur dibuat untuk membantu trader lebih disiplin, bukan untuk menjamin profit. Gunakan indikator ini sebagai alat bantu analisis, bukan sebagai pengganti pemahaman market, manajemen risiko, dan kontrol emosi.
Trade with plan, manage with discipline, review with honesty.
Indicator

Discipline Guard [CrestAlgo]Discipline Guard
🔍 What This Indicator Does
Every trader has sessions they should avoid. The post-lunch chop. The pre-market noise. The late-night revenge trade window. You know these windows exist because your journal proves it. The problem is remembering in the moment.
Discipline Guard is a behavioral guardrail that visually obscures the chart during user-defined time windows where you have identified that you tend to underperform. It serves as a pattern-interrupt: a deliberate visual barrier between you and a trade you should not be taking.
This is not a signal indicator. It does not tell you what to trade. It tells you when to stop.
🛑 How It Works — The Four Stages
The indicator uses a progressive warning system so you are never caught off guard mid-position:
Stage 1 — Early Warning (15 minutes before window)
A subtle amber tint appears on the chart background. This is your cue to begin winding down any open positions and stop scanning for new setups.
Stage 2 — Approaching (5 minutes before window)
The amber tint deepens and a warning label appears above the current bar showing the window name. Final warning before the blackout begins.
Stage 3 — Active Block (during the window)
The chart is covered with a configurable-opacity dark overlay and a centered message. The default reads "NO-TRADE ZONE — SCHEDULED PAUSE" but you can customize it to anything. This is the core of the indicator — making it psychologically harder to enter a trade during your known bad window.
Stage 4 — Recovery (5 minutes after window ends)
The overlay fades gradually back to a clean chart. This gives you a moment to recalibrate before re-engaging.
The progressive ramp can be toggled off if you prefer an instant blackout with no lead-in.
🌍 Per-Window Timezone Support
Each window has its own timezone selector with 14 options covering all major trading sessions:
America/New_York (default), America/Chicago, America/Los_Angeles, Europe/London, Europe/Amsterdam, Europe/Frankfurt, Asia/Tokyo, Asia/Hong_Kong, Asia/Singapore, Asia/Shanghai, Asia/Dubai, Australia/Sydney, UTC, and Chart (uses the symbol's exchange timezone).
This means you can configure one window for the NY lunch chop in Eastern time and another for the London close in GMT on the same chart. Each window resolves its own day-of-week and time-of-day independently.
⚙️ Configuration
Up to 5 independent no-trade windows can be configured. Each window has:
Enable/Disable toggle
Custom label (e.g., "Post-Lunch Slump", "Pre-FOMC", "Revenge Trade Zone")
Timezone selector (14 options)
Day-of-week checkboxes (Mon through Sun)
Start and end time in 24-hour HHMM-HHMM format
Visual settings (global):
Blackout color (default: near-black #0A0A0A)
Blackout opacity (40-95%, default 70%)
Warning tint color (default: amber)
Warning symbol (🛑 🚫 ⛔ ❌ 🔒 ⚠️)
Custom blackout message text
Message font size (Small / Medium / Large / Huge)
Progressive ramp toggle (on/off)
Historical display:
Show Historical Windows toggle (off by default — keeps your chart clean)
Realtime Range (how many bars back from current to shade, default 48)
🔔 Alerts
Two alert conditions are available:
Window approaching (fires when Stage 2 begins, 5 minutes before the blackout)
Window active (fires when Stage 3 begins)
To set an alert: right-click the indicator name on your chart → "Add alert on Discipline Guard."
🕐 Timeframe Compatibility
This indicator works on all timeframes and all markets (futures, stocks, forex, crypto, commodities, indices).
For the full four-stage progressive warning to render correctly, use on timeframes of 15 minutes or less. On higher timeframes (1H, 4H, Daily), the warning stages may collapse onto a single bar since each bar spans more time than the 15-minute lead-in window. The blackout itself works correctly on all timeframes.
Practical guidance:
1m to 5m: Full progressive ramp renders smoothly. Ideal for day traders and scalpers.
15m: Warning stages may render on only 1 bar each. Still functional.
1H and above: Use with progressive ramp disabled (instant blackout mode). The blackout still activates at the correct time.
📐 Default Configuration
Window 1 is enabled out of the box:
Label: "NY Post-Lunch Slump"
Timezone: America/New_York
Time: 13:00 – 13:30 ET
Days: Monday through Friday
This targets the well-known low-volume, choppy lunch period in US equity index futures trading. Adjust or disable it to match your own trading journal findings.
Windows 2-5 are pre-configured with common session labels (NY Pre-Open, London Lunch, Tokyo Fix, Custom) but disabled by default. Enable and adjust them to fit your own discipline rules.
⚠️ Limitations
This indicator enforces time-based discipline rules. It does not analyze price action, volume, or any market data beyond the current bar's timestamp.
The timing logic is derived from bar timestamps, not a separate wall clock. On inactive symbols where bars do not print continuously, the warning stages may not appear if no bar falls within the warning window.
Windows that cross midnight in their configured timezone (e.g., 23:30 to 00:30) require both days to be enabled in the day-of-week settings. Each day is evaluated independently.
The blackout is a visual overlay only. It does not prevent order execution or interact with your broker in any way. You can still place trades during a blackout if you choose to. The decision is always yours.
⚖️ Disclaimer
This indicator is a behavioral visualization tool for educational and informational purposes only. It does not constitute financial, investment, or trading advice. It does not generate trade signals, recommendations, or any form of market analysis.
No representation is made that using this tool will improve trading performance, reduce losses, or produce any specific result. Trading discipline is a personal responsibility. This tool provides a visual reminder; it does not guarantee behavioral change.
Trading futures, options, and other financial instruments involves substantial risk of loss and is not appropriate for all investors. Past performance is not indicative of future results. Indicator

Risk Management & Position size calculator (FinPip)# Risk Management & Position size calculator (FinPip)
**Size your trades by risk.** Set your capital, risk %, entry and stop-loss — the indicator gives you position size in units, a take-profit level from your reward:risk ratio, and a clear summary on the chart.
Works on any symbol (stocks, forex, crypto, futures). Pine Script v6 · Mozilla Public License 2.0
---
## How to add to your chart
1. In TradingView, open **Indicators** (or search **“Risk Management”** / **“Finpip Risk Manager”**).
2. Select **Risk Management & Position size calculator (FinPip)** and add it to the chart.
3. Open **Settings** (gear on the indicator label) to set your capital, risk %, entry price, and stop-loss price.
---
## What you get
- **Entry, Stop-Loss & Take-Profit** — Drawn as horizontal lines on the chart (direction is Long if Entry > SL, Short if Entry < SL).
- **Position size** — Number of units (shares, lots, contracts) so that if price hits your SL, you lose only your chosen risk amount.
- **Info panel** — Capital, Risk %, Risk $, Reward $, R:R, Size (units), Risk/Unit, Entry/SL/TP prices, and direction. You can move the panel to any corner and change text size.
---
## Settings (inputs)
**Risk & Capital**
- **Total Account Capital ($)** — Capital used for risk (default 10000).
- **Risk per Trade (%)** — % of capital to risk on this trade (default 2.5%).
**Trade Levels**
- **Entry Price** — Your planned or actual entry.
- **Stop-Loss Price** — Exit price if the trade goes against you.
**Profit Target**
- **Reward:Risk Ratio** — Target as multiple of risk (e.g. 4 = 4R). TP is placed at Entry ± (SL distance × R:R).
**Display**
- **Show Info Panel** — On/off for the metrics table.
- **Round to Whole Shares/Units** — On for stocks/shares (whole numbers); off for forex/fractional.
- **Panel Position** — Top Left, Top Right, Bottom Left, Bottom Right.
- **Text Size** — Tiny / Small / Normal / Large.
- **Show Level Labels** — Price labels for Entry, SL, TP on the right.
**Colors** — Customize Entry, SL, TP lines and panel colors.
---
## How it’s calculated
- **Risk $** = Capital × (Risk % ÷ 100)
- **Risk per unit** = |Entry − Stop-Loss|
- **Position size** = Risk $ ÷ Risk per unit (optionally rounded down to whole units)
- **Take-profit** = Entry + (Risk per unit × R:R) for Long, or Entry − (…) for Short
- **Reward $** = Risk $ × R:R
---
## If something looks wrong
- **“Invalid setup — Entry and SL must be different prices”** — Your Entry and Stop-Loss are the same; change one of them.
- **“0 units (rounds to 0)”** — Risk $ is too small for the distance to SL with whole units. Increase capital or risk %, or turn off **Round to Whole Shares/Units** to see fractional size.
---
*Published on TradingView. Open source (MPL 2.0).*
Indicator

Pi Cycle BTC Top + Pre-Alert BandsPi Cycle BTC Top + Pre-Alert Bands is an advanced implementation of the classic Pi Cycle Top model, designed for Bitcoin cycle analysis on higher timeframes (especially 1D BTCUSD/BTCUSD·INDEX).
The original Pi Cycle Top uses two moving averages:
• 111-day SMA (short MA)
• 350-day SMA ×2 (long MA)
A Pi Top is signaled when the 111 SMA crosses above the 350×2 SMA. Historically, this has occurred near major BTC cycle highs.
This script extends that idea with a 3-step early-warning sequence:
• Pi Green – early compression: short/long MA ratio crosses upward into the green band (convergence from below is required).
• Pi Yellow – mid-cycle warning: only fires if a valid Green has already occurred in the same cycle.
• Pi Cycle Top – final top: the classic Pi Cycle cross, limited to one top signal per cycle. After a top, no new Yellow or Top signals can appear until a new Green event starts the next cycle.
Background shading shows the active phase (Green / Yellow / late-cycle zone), so you can see at a glance where BTC is within its Pi-based macro structure.
All logic is non-repainting: request.security() uses lookahead_off and no future data is accessed.
Typical use
This indicator is intended as a macro-cycle timing and risk-awareness tool, not a stand-alone entry system. Many traders use it to:
• Watch for Pi Green as the start of a potential late-cycle advance.
• Treat Pi Yellow as a rising-risk environment and tighten risk management.
• Use the Pi Cycle Top as a historical high-risk zone where large profit-taking or hedging may be considered.
Always combine this with your own analysis (trend, volume, on-chain, macro) before making decisions.
How to set alerts
Add the indicator to your chart (1D BTCUSD or BTCUSD·INDEX recommended).
Click Alerts → Condition → Pi Cycle BTC Top + Pre-Alert Bands.
Choose one of:
• Pi Cycle – Green Pre-Alert (early convergence)
• Pi Cycle – Yellow Pre-Alert (after Green only)
• Pi Cycle – TOP (Single per Cycle, after Green)
Use “Once per bar close” for higher-timeframe reliability.
Disclaimer
This tool is for educational and analytical purposes only. The Pi Cycle concept is based on historical behavior and does not guarantee future results. This is not financial advice; always do your own research and manage risk appropriately. Indicator

QTY@RISK VWAP based calculationVWAP Volatility-Based Risk Management Calculator for Intraday Trading
Overview
This script is an innovative tool designed to help traders manage risk effectively by calculating position sizes and stop-loss levels using the Volume Weighted Average Price (VWAP) and its standard deviation (StdDev). Unlike traditional methods that rely on time-based calculations, this approach is time-independent within the intraday timeframe, making it particularly useful for traders seeking precision and efficiency.
Key Concepts
VWAP (Volume Weighted Average Price): VWAP is a trading benchmark that represents the average price a security has traded at throughout the day, based on both volume and price. It provides insight into the average price level over a specific period, helping traders understand the market trend.
StdDev (Standard Deviation): In the context of VWAP, the standard deviation measures the volatility around the VWAP. It provides a quantifiable range that traders can use to set stop-loss levels, ensuring they are neither too tight nor too loose.
How the Script Works
1. VWAP Calculation: The script calculates the VWAP continuously as the market trades, integrating both price and volume data.
2. Volatility Measurement: It then computes the standard deviation of the VWAP, giving a measure of market volatility.
3. Stop-Loss Calculation: Using user-defined StdDev factors, the script calculates two stop-loss levels. These levels adjust dynamically based on market conditions, ensuring they remain relevant throughout the trading session.
4. Position Sizing: By incorporating your risk tolerance, the script determines the appropriate position size. This ensures that your maximum loss per trade does not exceed your predefined risk value.
How to Use the Calculator
1. Select Two VWAP StdDev Factors: Choose two standard deviation factors for calculating stop-loss levels. For example, you might choose 0.5 and 0.75 to set conservative and aggressive stop-losses respectively.
2. Set Your Trading Account Size: Enter your total trading capital. For example, $50,000.
3. Maximum Lot Size: Define the maximum number of shares you are willing to trade in a single position. For instance, 200 shares.
4. Risk Value per Trade: Input the maximum amount of money you are willing to risk on a single trade. For instance, $50.
5. Plotting Options: If you wish to visualize the stop-loss levels, enable the plot option and choose the price base for the plot, such as the closing price or the average of the high and low prices (hl2).
Example of Use
1. Initial Setup: After the market opens, wait for at least 15 minutes to ensure the VWAP has stabilized with sufficient volume data.
2. Parameter Configuration: Input your desired parameters into the calculator. For instance:
- VWAP StdDev Factors: 0.5 and 0.75
- Trading Account Size: $50,000
- Maximum Lot Size: 200 shares
- Risk Value per Trade: $50
- Plot Option: On, using "hl2" or "close" as the price base
3. Execution: Based on the inputs, the script calculates the position size and stop-loss levels. If the calculated stop-loss falls within the selected VWAP StdDev range, it will provide you with precise stop-loss prices.
4. Trading: Use the calculated position size and stop-loss levels to execute your trades confidently, knowing that your risk is managed effectively.
Advantages for Traders
- Time Independence: By relying on VWAP and its StdDev, the calculations are not dependent on specific time intervals, making them more adaptable to real-time trading conditions.
- Focus on Strategy: Novice traders can focus more on their trading strategies rather than getting bogged down with complex calculations.
- Dynamic Adjustments: The script adjusts stop-loss levels dynamically based on evolving market conditions, providing more accurate and relevant risk management.
- Flexibility: Traders can tailor the calculator to their risk preferences and trading style by adjusting the StdDev factors and risk parameters.
By incorporating these concepts and using this risk management calculator, traders can enhance their trading efficiency, improve their risk management, and ultimately make more informed trading decisions. Indicator

Curved Management (Zeiierman)█ Overview
The Curved Management (Zeiierman) is a trade management indicator tailored for traders looking to visualize their entry, stop loss, and take profit levels. Unique in its design, this indicator doesn't just display lines; it offers rounded or curved visualizations, setting it apart from conventional tools.
█ How It Works
At its core, this indicator leverages the power of the Average True Range (ATR), a metric for volatility, to establish logical stop-loss levels based on recent price action. By incorporating the ATR, the tool dynamically adapts to the market's changing volatility. What sets it apart is the unique curved visualization. Instead of the usual straight lines representing entry/sl levels, users can choose between rounded and straight edges for their take profit and stop loss levels. This aesthetic tweak gives the chart a cleaner look and offers a more intuitive understanding of risk management.
█ How to Apply the Indicator
Upon initially loading the indicator, a label appears that reads, "Set the 'xy' time and price for 'Curved Management (Zeiierman).'" This prompts you to click on the chart at your entry point. After selecting your entry point on the chart, the indicator will load. Ensure you adjust the trend direction in the settings panel based on whether you took a long or short position.
█ How to Use
Use the tool to manage your active position.
Long Entry
Short Entry
█ Settings
The indicator comes packed with various settings allowing customization:
Trade Direction
Decide the direction of the trade (long/short).
Reward multiplier
Sets the ratio for take profit relative to stop loss. Increasing this value will set your take profit further from the entry, and decreasing it will bring it closer.
Risk multiplier
Multiplier for calculating stop loss based on the ATR value. Increasing this makes your stop loss further from the entry, while decreasing brings it closer.
█ Related Free Scripts
Trade & Risk Management Tool
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
Indicator

Scalper's toolkit - ATR WidgetWidget specifically designed for scalping. Many settings to fit the instrument and view preferences to make it fit into your chart window how you like, even on mobile.
** I have 5 other features to add into this in the very near future, as I use this as my primary tool for Risk reward. This script will be updated in the near future as more features are coded into it. See bottom for notes on plans
Features:
Displays a quick view of the ATR value on the chart, in decimal PIPs or directly in Points - a key value for scalping using the DOM for point value settings and one click trading on fast time frames.
Automatic calculation of stop and target distance for a predetermined Risk Reward Ratio (Set with the settings panel), and then also displayed in PIPs or Points for easy use in quick trading.
Works on most all instruments/pairs/cryptos with multiple precision levels for correct values to be shown in the widget.
Fully customizable -
ATR period Base setting, just like a normal ATR indicator
Display in : PIPs or Points
ATR based stop distance, using a multiplier. 2 is the most common multiplier used, and the default setting.
Risk Reward Calculation using the Stop Loss value.
-Quickly helps with proper target and stop sizing for the volatility in the price on the current trade entry point.
-Set to any ratio you wish, from 1:0.1 all the way to 1:100 or more, unlimited R ratio settings to fit your strategy and risk tolerances.
Position anywhere on the chart window with 9 preset locations available (Pine script limitation)
Show as a column layout or a row layout
Customize the Size, with 5 preset widget sizes, from tiny to huge (Pine script limitation)
-Mobile Friendly - Tiny or Small may be too small on PC, but can be used for Mobile so the widget does not become too large over the chart.
Custom text, background, and boarder colors
Custom Boarder Size - 0 size is no boarder
Set up:
-Open the settings panel.
First section is the basic settings for the ATR - the length (Default is 14) and to use a PIP value display, or Point value display.
Here you also see a "Precision" Setting. **Because each instrument returns different precision ATR values, it is difficult to determine with code what those values will be ahead of time to do the math in the background. Even some 2 decimal instruments return 5 decimal ATR values, so this setting filters that** Just use the dropdown and choose how many decimal places the instrument has from 2 - 5 decimals
The second section is for risk and reward calculations, and can be disabled if you do not want to see these values.
The first value is the "ATR Multiplier" Typically, a 2x multiplier is used on the ATR to determine how far away to place your stop loss from the entry, placing it out of harm's way from normal market activity.
The second value is the Reward target distance, based from the stop loss size. This quickly calculates your target to match your intended reward ratio, saving some manual work to calculate this by hand every trade.
** Note: because of the math used in the code, you may see odd values on some instruments, like indexes. If you have the precision correct, try changing the "Show in Pips" to "Show in Points", as this may solve the issue.
The last two sections are purely for how the widget looks and how/where it shows on the screen. These can be set however you like. To have no boarder, just set the "Frame size" value to 0.
Additional Updates planned:
Pip value calculation (2 feature uses)
-This will serve 2 purposes. The widget will calculate the value of the trade based on the lot size. It will also have a risk limit, so if the ATR get's too high for the current risk settings, It will show red to warn you of a high risk situation before you trade.
Example, you have a set limit of 3 dollars per trade using .02 lot sizing. If the ATR get's too high, The Stop value will be more risk than you would like to use at that trade sizing. Reduce the trade size, or wait for ATR to come lower.
Purpose 2: lot size calculation, so if you wanted to maximize the use of risk available. If you wanted to risk 600 for example, it would use the ATR you have set for the risk, and determine the proper lot size for the amount of volatility in the market. This way, you Risk Exactly, or as close as possible to 600 for the the current trade conditions.
Extra use for this value: Show the Current trade amounts at risk and for gain in money values on the side of the pip/point value. Know what you're risking and also trading for in monetary value.
ATR candle Comparison- Early momentum Detection (2 feature uses)
Will show an additional section on the bottom of the widget to show how each candle compares to the one before, up to the last 5, and show if ATR went down, up, or stayed the same over the last 5 candles.
Show an additional symbol to indicate the current candle status in comparison to the close of the last candle. Real time of if the ATR is getting larger, smaller, or staying the same. Indicator

Indicator

Strategy

Value At Risk Channel [AstrideUnicorn]The Value at Risk Channel (VaR Channel) is a trading indicator designed to help traders control the level of risk exposure in their positions. The user can select a time period and a probability value, and the indicator will plot the upper and lower limits that the price can reach during the selected time period with the given probability.
CONCEPTS
The indicator is based on the Value at Risk (VaR) calculation. VaR is an important metric in risk management that quantifies the degree of potential financial loss within a position, portfolio or company over a specific period of time. It is widely used by financial institutions like banks and investment companies to forecast the extent and likelihood of potential losses in their portfolios.
We use the so-called “historical method” to compute VaR. The algorithm looks at the history of past returns and creates a histogram that represents the statistical distribution of past returns. Assuming that the returns follow a normal distribution, one can assign a probability to each value of return. The probability of a specific return value is determined by the distribution percentile to which it belongs.
HOW TO USE
Let’s assume you want to plot the upper and lower limits that price will reach within 4 hours with 5% probability. To do this, go to the indicator Settings tab and set the Timeframe parameter to "4 hours'' and the Probability parameter to 5.0.
You can use the indicator to set your Stop-Loss at the price level where it will trigger with low probability. And what's more, you can measure and control the probability of triggering.
You can also see how likely it is that the price will reach your Take-Profit within a specific period of time. For example, you expect your target level to be reached within a week. To determine this probability, set the Timeframe parameter to "1 week" and adjust the Probability parameter so that the upper or lower limit of your VaR channel is close to your Take-Profit level. The resulting Probability parameter value will show the probability of reaching your target in the expected time.
The indicator can be a useful tool for measuring and managing risk, as well as for developing and fine-tuning trading strategies. If you find other uses for the indicator, feel free to share them in the comments!
SETTINGS
Timeframe - sets the time period, during which the price can reach the upper or lower bound of the VaR channel with the probability, set by the Probability parameter.
Probability - specifies the probability with which the price can reach the upper or lower bound of the VaR channel during the time period specified by the Timeframe parameter.
Window - specifies the length of history (number of historical bars) used for VaR calculation. Indicator

Indicator
