Coasyn Risk GateCOASYN Risk Gate is a pre-trade risk checking tool for FX traders.
It does not generate entries, trade signals, or orders. The trader decides what they want to trade, then enters the planned trade information into Risk Gate before sizing the position.
The purpose is simple: check whether the proposed trade fits your own risk rules before you commit capital.
How to use it
Open the indicator settings and enter your planned trade information.
Choose LONG or SHORT, then enter your intended Entry Price and Stop Price.
Next, configure the risk limits you want Risk Gate to enforce:
Account Size — the account value used for the risk calculation.
Max Account Risk % — the maximum percentage of the account you are willing to risk on one trade.
Planned TradingView Risk % — the percentage you are currently planning to use when sizing the trade.
Minimum Reward R Required — the minimum reward-to-risk level you want displayed as an acceptable target.
Minimum / Maximum Stop Distance Pips — your acceptable stop-distance range.
ATR Stop Reality Gate — compares the proposed stop distance with current ATR so unusually tight or unusually wide stops can be flagged.
Min / Max Stop ATR — determines the acceptable stop-distance range relative to ATR.
Once the entry and stop are entered, Risk Gate calculates the proposed stop distance, ATR relationship, allowed account risk, planned monetary risk, and projected R levels.
Reading the panel
The top of the panel shows the current risk status.
RISK ACCEPTABLE means the trade currently passes the risk rules you configured.
Other messages explain why the trade has failed the precheck, including:
ENTRY REQUIRED — no entry price has been entered.
STOP REQUIRED — no stop price has been entered.
INVALID STOP — entry and stop are the same price.
STOP ON WRONG SIDE — a long trade has the stop above the entry, or a short trade has the stop below the entry.
RISK ABOVE LIMIT — the planned account risk exceeds your configured maximum.
STOP TOO WIDE / STOP TOO TIGHT — the proposed stop falls outside your pip-distance limits.
STOP WIDE VS ATR / STOP TIGHT VS ATR — the proposed stop falls outside your configured ATR-relative range.
At the bottom of the panel:
CAN SIZE means the setup has passed the configured risk gates.
DO NOT SIZE means one or more risk conditions still fail.
Chart levels
When Show Entry / Stop / R Lines is enabled, the indicator draws the proposed:
Entry
Stop
Minimum acceptable R target
directly on the chart.
These are planning references only. They do not place or modify orders.
The panel also displays the calculated 1R price, your configured minimum acceptable R price, and the 2R price.
Example workflow
You identify a trade setup independently.
You plan:
Direction → Entry → Stop
Enter those values into COASYN Risk Gate.
Risk Gate then checks the proposed trade against your configured risk limits.
If the panel returns CAN SIZE, you can move on to your normal position-sizing or order-entry process.
If it returns DO NOT SIZE, review the reason shown in the panel before proceeding.
Important
COASYN Risk Gate is a risk decision-support tool, not a trading system.
It does not determine whether a trade is good, predict market direction, calculate an automatic entry, or execute orders.
Your strategy determines whether you want the trade.
Risk Gate helps determine whether the proposed risk structure fits the rules you configured. Wskaźnik

The Fluid Trader compassTHE FLUID TRADER COMPASS 🧩
The Fluid Trader Compass is an essential utility tool designed for disciplined traders who want to safeguard their accounts from high-impact market events and structural transitions. Originally built to prevent rule violations on prop firm accounts (such as FTMO's news restrictions), this indicator acts as your structural dashboard directly on the chart.
🛡️ Key Features
Custom News Buffer Zones: Input up to 3 major news events. The indicator dynamically calculates a customizable buffer window (e.g., 3 minutes before and after the release) and locks the chart down visually.
Aggressive "No-Trade" Visuals: When a news zone is active, the chart paints the candles bright red, overlays warning crosses, and applies a danger-zone background. There is less chance of accidentally taking a trade.
Candle Close Countdown Alerts (1m Warning): Tracks UTC candle closes tailored specifically for the crypto and FX market structures. It alerts you exactly 1 minute before the opening of a new 1H, 4H, or Daily candle so you never get caught in volatile candle transitions.
Live Status Dashboard: A sleek, color-coded HUD in the top right corner that instantly displays your trading environment status:
🔴 NO-TRADE ZONE! (Active high-impact event)
🍑 ALERT (1m to Daily-Open) (Purple)
🟠 ALERT (1m to 4H-Open) (Orange)
🔵 ALERT (1m to 1H-Open) (Blue)
✅ TRADING: OK (Green)
Integrated Webhook Alerts: Pre-configured alerts that trigger exactly when a No-Trade Zone starts and clears, perfect for push notifications to your phone or mail.
⚙️ How to Use It
Input Your Schedule in the morning when you're pre-planning and making your daily bias: Look up high-impact news events (like CPI, FOMC, or NFP) and input the dates and times into the indicator settings. Use FTMO site and Cryptocraft for example.
Protect your capital. Protect your funded accounts. Trade with direction.
🆕Extra release note:
A new feature is now live: built-in Weekend Rollover Protection specifically designed for FTMO funded standard/scalp accounts. The indicator now tracks the Friday market close and flags upcoming rollover windows so you avoid accidental weekend holding breaches.
Risk | Rules | Process | Control Wskaźnik

Futures ATR Risk & Position SizerATR Risk & Position Sizer
What it does
This tool answers one question before every trade: "Given how much I'm willing to lose and how volatile this market is right now, how many contracts can I actually take?"
Instead of using a fixed stop distance, the stop is derived from the Average True Range (ATR) of the instrument, so position size automatically shrinks when volatility rises and grows when it falls — the dollar risk stays constant, the contract count adapts.
The asset is auto-detected from the chart you're viewing. You only choose whether you're trading the Mini or Micro version of it.
How the calculation works
Stop distance = ATR(length) × Multiplier
- ATR length defaults to 14 (configurable).
- The multiplier (default 1.5) controls how wide the stop is relative to current volatility — this is what makes the risk "dynamic": as ATR expands or contracts, so does the stop, and so does the resulting position size.
Tick rounding — a stop can only be placed at a valid price increment (tick), so the raw ATR-based distance is rounded down to the nearest whole tick for the detected instrument before anything else is calculated. For example, on ES (tick = 0.25), a raw distance of 10.4 points becomes 10.25 points (41 ticks) — never a value that couldn't actually be set as a stop order.
Risk per contract = Stop Distance (points) × Dollar value per point (for the selected Mini/Micro size).
Contracts allowed = floor(Max Risk $ ÷ Risk per contract), then optionally rounded down to the nearest even number (see below).
Max Risk (displayed) is recalculated from the final, rounded contract count — so it reflects your actual exposure, which will always be at or under your configured max risk, never over it.
Auto-detection
The script reads the chart's root symbol (works with both continuous contracts like ES1! and dated contracts like ESZ2025) and matches it — along with its known Micro ticker — against a built-in list of instruments. If the symbol isn't recognized, the table is replaced with a clear red "Unsupported Asset" warning instead of showing incorrect numbers.
If the asset is recognized but the size you selected (Mini/Micro) doesn't actually exist for that instrument (e.g. there's no Micro Platinum), you'll get an orange warning instead of silently wrong output.
Supported instruments and their specs:
Asset | Root / Micro ticker(s) | Tick Size | Mini $/pt | Micro $/pt
E-mini S&P 500 | ES / MES | 0.25 | $50 | $5
E-mini Nasdaq 100 | NQ / MNQ | 0.25 | $20 | $2
E-mini Dow | YM / MYM | 1.0 | $5 | $0.50
E-mini Russell 2000 | RTY / M2K | 0.10 | $50 | $5
Gold | GC / MGC (also XAUUSD, GOLD) | 0.10 | $100 | $10
Silver | SI / SIL (also XAGUSD) | 0.005 | $5,000 | $1,000
Platinum | PL | 0.10 | $50 | N/A
Copper | HG / MHG | 0.0005 | $25,000 | $2,500
Crude Oil | CL / MCL | 0.01 | $1,000 | $100
Natural Gas | NG / MNG | 0.001 | $10,000 | $1,000
Heating Oil | HO | 0.0001 | $42,000 | N/A
RBOB Gasoline | RB | 0.0001 | $42,000 | N/A
US Dollar Index | DX | 0.005 | $1,000 | N/A
Euro FX | 6E / M6E | 0.00005 | $125,000 | $12,500
British Pound | 6B / M6B | 0.0001 | $62,500 | $6,250
Australian Dollar | 6A / M6A | 0.0001 | $100,000 | $10,000
30-Yr T-Bond | ZB | 1/32 (0.03125) | $1,000 | N/A
10-Yr T-Note | ZN | 1/64 (0.015625) | $1,000 | N/A
Wheat | ZW | 0.25 | $50 | N/A
Soybeans | ZS | 0.25 | $50 | N/A
Corn | ZC | 0.25 | $50 | N/A
Cotton | CT | 0.01 | $500 | N/A
Sugar | SB | 0.01 | $1,120 | N/A
Coffee | KC | 0.05 | $375 | N/A
Cocoa | CC | 1.0 | $10 | N/A
"N/A" means that instrument currently has no Micro-sized version on the exchange — the script will flag this rather than show a value.
Inputs
Max Risk Amount ($) – the dollar amount you're willing to risk on the trade.
ATR Length – lookback period for ATR (default 14).
ATR Multiplier – multiplies ATR to set the stop distance (default 1.5).
Force Even Number of Contracts – when enabled (default), an odd contract count is rounded down to the nearest even number; disable to allow any whole number.
Contract Type – Mini or Micro. Pick whichever you actually trade; the asset detection is independent of this.
Table Position / Text Size – purely cosmetic.
Reading the table
Header – detected asset, contract size, ATR multiplier in use, and your configured risk amount.
Contracts Allowed – the final, tick-valid, (optionally) even-rounded contract count.
Stop Loss Distance – the tick-rounded stop distance, shown in both points and whole ticks.
Max Risk ($) – your actual dollar risk at that contract count — always at or below your configured max risk.
Notes & disclaimer
Contract specifications (tick size, point value) reflect standard CME/ICE specs at the time of publishing. Exchanges occasionally revise these — please verify against your broker/exchange before relying on this for live sizing.
This indicator does not generate entry or exit signals. It is a risk-management and position-sizing calculator only.
Nothing in this script constitutes financial advice. Futures trading involves substantial risk of loss and is not suitable for all investors. Past volatility is not indicative of future volatility.
Wskaźnik

EMA 50x200 Cross Trend Barometer The 50/200 moving-average cross is one of the most-watched signals in markets:
the "golden cross" and the "death cross." Trend Barometer turns that classic into
a clean, at-a-glance read on the prevailing regime, the way a barometer reads the
pressure before the storm.
When the fast average (50) sits above the slow one (200), the market is in a
risk-on regime and the chart glows fair-weather green (☀). When it slips below,
conditions turn risk-off and the chart shifts to storm red (⛈). One look tells you
which side of the trend you're standing on.
WHAT IT SHOWS
• Regime-coloured EMA 50 and EMA 200, with a shaded gap between them
• A soft background tint for the current regime (risk-on / risk-off)
• Golden-cross ▲ and death-cross ▼ markers on the exact flip bar
• A compact weather panel: current regime, bars held in it, and the last cross
• Alerts on every regime flip
MAKE IT YOURS
Switch between EMA and SMA, set your own fast/slow lengths (50/200 by default),
and recolour everything to match your chart.
HONEST BY DESIGN
This is a regime lens, not a buy/sell system. A barometer reports the conditions;
it doesn't place your trades. The 50/200 cross is trend-following context: great for
reading the prevailing regime and filtering out noise, but it lags turns and is not
an entry trigger on its own. Use it to frame your bias and manage risk alongside
your own analysis.
NO REPAINTING
Some indicators quietly rewrite their own past: you look back and see a signal at a
perfect spot that simply wasn't there when the bar formed. That flatters them in
hindsight. This one can't do that. It only ever reads the current and earlier bars,
never the future (no request.security, no forward references), so a cross printed
two years ago sits exactly where it printed at the time.
One caveat, true of every indicator: the newest bar is still forming, so the colour
can flicker while it's live. A cross is only final once that bar closes. Wskaźnik

Risk/Reward Visualizer - Trade Management [Dots3Red]🎯 RISK/REWARD VISUALIZER — POSITION SIZER & OUTCOME TRACKER
A risk/reward calculator answers one question and then forgets it existed. Click three prices on your chart — entry, stop, target — and this tool draws the zones, sizes the position from your account risk, and shows the ratio plainly. But it also remembers. Every plan you set is tracked to its actual outcome, building a real record of how your own planning has played out over time.
✨ WHY THIS MATTERS
This script treats every set of levels you draw as a real plan worth remembering — not just a static suggestion.
📊 Plans Resolved: 14W / 6L Hit Rate: 70% Total R: +9.2R
That's not a backtest of a strategy. It's a running record of the actual entry/stop/target combinations you personally set on this chart and what genuinely happened to each one afterward.
⚙️ HOW IT WORKS
🖱️ Click-to-place levels — Entry, Stop Loss, and Target are set by clicking directly on the chart rather than typing numbers into a settings box. Direction is detected automatically: if your stop sits below entry, it's read as long; above entry, short.
💰 Position sizing from account risk — enter your account size and how much of it you're willing to risk per trade (as a percentage), and the script calculates exactly how large a position keeps that risk fixed regardless of how wide your stop is. The result is rounded to whatever step size fits your instrument — whole shares, or fractional units for crypto.
📏 Risk and reward zones — the space between entry and stop is shaded as your risk; the space between entry and target as your reward. Seeing both zones side by side on the chart makes a lopsided plan (all risk, little reward) visually obvious in a way a bare number doesn't.
🧾 Plan tracking — every distinct entry/stop/target combination is treated as its own plan. When price later reaches either level, the plan resolves:
• Target hit — counted as a win, and the actual R multiple achieved is added to your running total
• Stop hit — counted as a loss (–1R)
• Same-bar ambiguity (a single bar's range touches both stop and target) always resolves as a loss — the conservative, honest call when intrabar order can't be known
• Neither hit within the tracking window — dropped from the record entirely, counted as neither a win nor a loss
Setting new levels automatically starts a new plan; the previous one, if still unresolved, is simply dropped from active tracking without being force-graded.
🔒 Non-repainting — all outcome grading happens strictly on confirmed bars.
🧭 HOW TO USE
1️⃣ Set your account size and risk % first , before placing levels — this is what turns a simple price plan into an actual position size you can act on.
2️⃣ Click Entry, then Stop, then Target on the chart. The dashboard updates immediately with direction, R:R ratio, position size, and dollar risk/reward.
3️⃣ Use the zones to sanity-check the plan visually before committing — a reward zone that looks tiny next to a wide risk zone is worth reconsidering even if the calculated ratio technically clears your minimum.
4️⃣ Check your plan history periodically , not just the current plan. A single setup can look great in isolation; the accumulated hit rate and total R tell you whether your actual level-picking has been working over time.
5️⃣ Adjust the tracking window to match your typical hold time — a scalper and a swing trader need very different values for how many bars a plan should be given before it's dropped as inconclusive.
🛠️ SETTINGS
🎯 Trade Levels — Entry, Stop Loss, Target — each set by clicking on the chart
💰 Account & Risk
• Account Size, Risk per Trade (%) — drive the position size calculation
• Position Size Rounding — match this to your instrument's minimum tradable increment
🎨 Visualization
• Risk/Reward Zones, Level Labels — toggle independently
• Max Bars to Track a Plan — how long an unresolved plan stays active before being dropped
🖥️ Dashboard — show/hide, position — direction, R:R ratio, position size, dollar risk/reward, and the full plan history in one place
📝 NOTES
Only one plan is actively tracked for outcome purposes at a time — setting new levels while a previous plan is still pending drops that previous plan from the record without grading it, rather than running two plans in parallel. This is a planning and tracking tool: it does not know your actual fills, slippage, or whether you genuinely took the trade — it measures what price did relative to the levels you set, not your live trading result.
⚠️ DISCLAIMER
This is an analytical and visualization tool. It does not generate trade signals, does not execute trades, and does not constitute financial advice. Historical plan outcomes do not guarantee how any future plan will resolve. Wskaźnik

Realized volatility term structureVolatility has a curve too. See whether the short end is screaming or sleeping.
Description
Measures realized volatility of bar returns over five horizons at once, from short to long, and draws the resulting curve at the right edge of the pane so you can see its shape rather than a single number.
How it calculates
Realized volatility at each horizon is the population standard deviation of log returns over that many bars, scaled by the square root of the number of bars in a year for the current timeframe, shown as a percentage. The plotted history is horizon one divided by horizon five. The curve is drawn as four connected segments through five points placed just past the last bar, each point's height equal to that horizon's volatility divided by the longest horizon's.
How to read it
Above 1.0 the short end is running hotter than the long end, which is what a fresh shock looks like. Below 1.0 the short end is quieter than the long end, which is what compression looks like. The pane shades amber while the short end is elevated. The curve at the right edge is normalized to the longest horizon so its shape is comparable across instruments and timeframes. Each point is labeled with its horizon in bars and its annualized value.
Repainting
Closed bars do not repaint. The live bar updates until it closes. The curve at the right edge is redrawn on the last bar only.
Originality and attribution
Realized volatility over a window is standard. What is original here is presenting it as a term structure: five horizons measured together, the short-to-long ratio tracked through time, and the live curve drawn on the chart as connected points. This is not derived from and does not reuse code from any existing published script.
Honest limitations
Realized volatility is backward looking by construction. The short end reacts within a few bars. The long end takes as many bars as its horizon to fully reflect a change.
Annualization is a display convention. The trading-minutes-per-day and days-per-year inputs only scale the percentages shown.
On timeframes above daily the annualization assumes 52 weekly or 12 monthly bars per year.
The elevated and subdued thresholds are conventions, not calibrations.
Five horizons is a choice. The curve between them is a straight line.
Nothing here is a signal. An elevated short end is not a direction. Wskaźnik

Range Compression Percentile - Hour RankedThis indicator gives no directional signal. It answers a single question: will the amplitude of the coming hours be large enough to be worth paying a round turn?
What makes it different
Intraday amplitude on a futures contract varies by a factor of 3 to 4 across the trading day. Any absolute threshold — "range below 50 points means compression" — therefore mostly measures what time it is, not the state of the market. A quiet 10:00 in New York and a busy 02:00 can show the same raw range while meaning opposite things.
This script ranks the current range as a percentile against the history of the same hour of the day. That hour-for-hour ranking is the part I have not seen elsewhere, and it is what makes the reading comparable at any time of day.
How it is calculated
The range of the last N bars (default 78, which is 6h30 on a 5-minute chart, one full RTH session) is measured as (highest high − lowest low) / close, expressed in basis points so it is comparable across instruments and across price levels.
Once per elapsed hour, that value is stored in a circular buffer belonging to that hour of the day. Each of the 24 hours keeps its own history, 120 observations by default — roughly six months of sessions.
The current range is then ranked against that hour's stored history. The result is a percentile from 0 to 100, plotted as a histogram and coloured by quintile.
A second reading divides the current range by a user-supplied round-turn cost, giving an amplitude-to-cost ratio.
What the measurements show
Tested on MNQ 5-minute data (12 months, 317 sessions) and GC 5-minute data (5.6 years, 1,737 sessions). Range of the following 2 hours, grouped by the quintile this indicator reports, computed causally — ranking only against hours already elapsed, exactly as the script does live:
MNQ: 39.3 / 43.4 / 47.0 / 53.8 / 64.4 bp from Q1 to Q5
GC: 35.2 / 37.9 / 41.0 / 44.2 / 59.8 bp from Q1 to Q5
Monotonic on both instruments. The bottom quintile runs at roughly 0.6x the amplitude of the top quintile.
The effect also survives a control for the last hour's range, which is the amplitude predictor already widely known: adding the compression indicator to a regression already containing the one-hour range gives it a coefficient of −10.65 bp (t = −8.65) on MNQ and −4.58 bp (t = −7.27) on gold, with hour-of-day fixed effects and standard errors clustered by session.
The result runs against the common belief. Compression does not announce expansion here. It announces more quiet.
What it does not do
It carries no directional information, and I would rather state that plainly than let the histogram suggest otherwise. On the same samples, the signed return of the 2 hours following a compression is indistinguishable from zero (MNQ −0.47 bp, t = −0.55). A range breakout traded as a symmetric bracket loses about the same amount whether traded with the break or against it (−0.241 R versus −0.258 R) — two opposite directions losing the same amount is what no information looks like.
Use it to decide whether conditions are worth trading, never which way.
How to use it
Bottom quintile (red, below 20): the next hours are likely to stay quieter than usual for this time of day. Fixed costs buy less movement.
Top quintile (green, above 80): wide amplitude relative to this hour.
The amplitude-to-cost ratio is the absolute check, and it is independent of the percentile. A market can be compressed for its hour and still offer plenty of room. Both readings are shown because they answer different questions.
Settings
Range window: number of bars in the measured range. 78 is the value the effect was measured on.
Closed bars only: freezes the range on the previous bar so the value stops moving inside the forming bar.
Reference time zone: used only to split the day into hours.
Observations kept per hour, and minimum before displaying: control how much history is required before a percentile is shown.
Round-turn cost in basis points: commission plus slippage against notional. Reference points measured on micro futures: MNQ 0.98, MES 1.89, MYM 2.06, MGC 3.00 to 3.44 depending on the price of gold. This figure depends on price and is never constant over time, so it is an input rather than a constant.
Notes and limitations
No repainting. The percentile is computed only against hours that are over and closed.
The indicator needs history before it displays anything: 20 observations for a given hour by default, so about 20 sessions.
The numbers quoted above come from two instruments over the periods stated. They are measurements on that data, not a guarantee of future behaviour.
Designed and measured on 5-minute futures charts. On other timeframes or asset classes the window length should be reconsidered. Wskaźnik

Momentum Rotor | Basket Breakout & Leadership RotationWhat it does
Momentum Rotor ranks a basket of correlated symbols (default: AAPL, MSFT, NVDA, GOOGL, AMZN, META, TSLA, AVGO — fully user-editable) by N-bar rate-of-change momentum, recalculated every bar via request.security(). It only opens a long position on the chart's own symbol when that symbol is simultaneously the strongest performer in the basket (rank #1 by momentum) and breaking its own N-bar price high. If the held symbol later loses the #1 rank to another basket member, the strategy closes the position — it "rotates out" of a fading leader rather than holding through a reversal.
Core features
Live leaderboard table — ranks the full basket by momentum every bar, with gradient-colored scores and trend glyphs (↑/↓) so you can see who's strengthening or fading at a glance
Regime/leadership dashboard — shows your symbol's current rank, how many bars the leader has held the top spot, and basket-wide breadth (% of symbols with positive momentum) as a quick risk-on/risk-off gauge
Risk-based position sizing — position size is calculated from a fixed % of equity risked against an ATR-based stop distance, not a fixed share count
ATR stop + R-multiple take-profit — stop distance and profit target both scale with volatility instead of using static price offsets
Optional rotation-confirmation filter — require the leader to lose #1 rank for N consecutive bars before exiting, to reduce whipsaw from brief rank flickers
Optional regime filter — require price above a long SMA before taking new entries, to avoid trading breakouts in a broader downtrend
Realistic backtest defaults — includes commission, slippage, and margin settings out of the box rather than assuming frictionless, infinite-leverage fills
How the strategy works
Each bar, the script pulls the N-bar ROC (rate of change) for every symbol in the basket and sorts them from strongest to weakest. Your chart's symbol only becomes eligible to trade when it holds rank #1 and closes above its own N-bar high — combining a relative-strength filter with an absolute breakout trigger, so entries require both "stronger than its peers" and "breaking out on its own chart" to align. Exits are twofold: an ATR stop/target pair from the entry, and a rotation exit that closes the trade the moment (or, with the confirmation filter on, N bars after) another basket member overtakes it in the momentum ranking.
What makes it distinct
Most retail breakout scripts evaluate a single symbol in isolation. Momentum Rotor brings relative-strength rotation — a concept used by institutional sector/factor rotation strategies — into a single-chart script by polling an entire basket with request.security() and gating trade eligibility on relative rank, not just absolute price action. The live leaderboard turns that ranking process into something visible and auditable on the chart itself, rather than a black-box filter.
Tips for use
Chart the strategy on one of the basket's own symbols (or add your target symbol to the basket inputs) — the "am I #1" check only works when your chart's ticker matches a basket entry
This instance only manages a position on its own chart's symbol; it does not automatically route orders to whichever symbol becomes the new leader. To rotate capital across the whole basket, run separate instances on each symbol
Momentum/breakout systems are inherently prone to false breakouts and whipsaws in choppy markets — the optional regime filter and rotation-confirmation delay are there to dampen that; test both on/off for your instrument and timeframe
Sector ETFs (lower dispersion, steadier trends) and mega-cap tech names (higher dispersion, sharper momentum swings) behave differently in this framework — adjust lenMom/lenBreak accordingly
Backtest results depend heavily on commission, slippage, and margin assumptions set in Properties — review and adjust these to match your actual broker before drawing conclusions
Limitations
This is an educational strategy template, not a production-ready system or financial advice. It has not been optimized or validated for any specific instrument, timeframe, or market regime. Past performance in this backtest does not indicate future results. Strategia

Return Dispersion Matrix [The Quant Science]Introduction
The Return Dispersion Matrix is a quantitative analysis tool that maps the temporal dependence of returns. In technical terms, performs a two-dimensional, 1-lag autocorrelation analysis, measuring the relationship and relative frequency between the return of the previous session (Yesterday) and that of the current session (Today) within specific volatility ranges.
It answers the key questions:
💭 🔑 “When a candle closes in the green or red, what is the most common range of returns?”
💭 🔑 “When the price did X yesterday, what does it probably do today?”
What does this indicator do?
1. Automatically calculate the probability of future returns for a given range of values and display the result in the right-hand column.
2. Instantly identify the market trend using the quadrants. Calculates the quadrant with the highest number of points and highlights it by lighting it up.
🟢 Q1
A green candle followed by another green candle
High concentration of points indicates that positive days tend to generate immediate additional momentum
Suitable for trend-following and bullish breakout strategies
🟢 Q2
A red candle followed by a green candle
Heavy trading volume indicates a “resilient” market: buyers step in immediately when prices fall (“buy the dip”)
Suitable for accumulation strategies on pullbacks
🔴 Q3
A red candle followed by another red candle
Indicates that sales generate further sales without immediate support
Sign of underlying weakness or persistent downtrends
🔴 Q4
A green candle followed by a red candle
There are many indications that rallies are short-lived and lead to rapid profit-taking in the Suitable for “sell the rally” strategies
The horizontal X-axis represents the return of the previous candle (t-1), while the vertical Y-axis shows the return of the current candle (t). This allows you to visually determine whether a positive or negative day tends to be followed by one of the same sign (persistence) or the opposite sign (mean reversion).
X-axis
To the right of 0: previous candle closed in positive territory (+)
To the left of 0: previous candle closed in negative territory (-)
Y-axis
Above 0: current candle is closing / has closed in positive territory (+)
Below 0: current candle is closing / has closed in negative territory (-)
3. Automatically calculates volatility bands. It identifies the maximum range observed during the analysis period and divides the positive values into bands. These values are displayed in the left column in white.
4. Automatically calculates frequency clusters. The density and transparency of the points immediately reveal where most sessions are concentrated and which events represent anomalies or extreme outliers.
Uses
Identifying the Market Regime
Observing the concentration of points reveals the prevailing nature of the asset:
Q1 / Q3 Prevalence (Trend / Inertia): The market tends toward continuation. The best strategy is to buy on breakouts or sell on support breaks.
Prevalence of Q2 / Q4 (Mean Reversion): Buying at highs is statistically a losing strategy.
Assessment of Asymmetry and Risk Management (Fat Tails)
By comparing the vertical extent of the points on the positive and negative sides:
If, on the negative side (Q3 / Q4), the points frequently reach the extreme ranges (e.g., -L4 or -L5), while on the positive side they stop at +L2, the asset exhibits asymmetric downside volatility (crash risk). Essential for the correct calculation of position sizing and for the strategic placement of stop-loss orders.
Operational Execution Filter (Probabilistic Edge)
The tool acts as a statistical validator before entering the market:
Example: A trader wants to go long on an asset. The matrix shows that, under current conditions, Quadrant Q2 has a frequency of 45% (high probability that a red day will be followed by a green day). Instead of buying during the positive candle, the trader waits for a negative session to close before placing a buy order at the next opening, thereby maximizing expected return.
Settings
Traders can easily adjust the indicator's parameters using the user interface.
Data Points Visualization: adjust the number of points within the matrix
Matrix Offset: move the table to the right on the graph
Levels Color: set the indicator colors
Highlight Dominant Quadrant: apply automatic calculation of the winning quadrant
Wskaźnik

Wskaźnik

Risk Sizer### Risk Sizer
**Risk Sizer** is a fast position-sizing and execution-risk tool designed for discretionary intraday and breakout trading.
Instead of choosing a position size first, place the draggable **SL** at the level where your trade idea is invalidated. Risk Sizer then calculates the position size based on your account risk while accounting for trading costs and execution conditions.
The indicator displays:
* **REC QTY** — liquidity-adjusted recommended position size
* **RISK QTY** — maximum size based on your configured risk
* **POSITION** — recommended position notional
* **SL** — stop price and percentage distance
* **ATR** — ATR for the current chart timeframe
* **SL / ATR** — stop distance relative to current volatility
* **BUFFER** — configurable slippage/execution allowance
* **RT FEES** — estimated round-trip trading fees
* **FEE / SL** — how significant fees are relative to the stop distance
* **RISK USED** — estimated total risk versus your configured risk budget
* **CAP USED** — percentage of the configured maximum position limit
* **1M LIQ** — average 1-minute notional volume used as a liquidity proxy
* **LIQ MULT** — suggested size reduction when the position is large relative to observed volume
* **EXECUTION** — simple green / amber / red execution warnings
### Position sizing
Position size accounts for:
**Structural SL + execution buffer + estimated round-trip fees**
This helps prevent extremely tight stops from producing unrealistically large position sizes.
For example, if your stop is only `0.01%` but your round-trip trading costs are `0.08%`, fees are already significantly larger than the structural stop. Risk Sizer highlights this through the **FEE / SL** metric and includes those costs when determining size.
### Liquidity-adjusted sizing
Risk Sizer also calculates an optional liquidity recommendation using average **1-minute TradingView notional volume**.
If your risk-based position would represent more than your configured target percentage of average 1-minute volume, the indicator reduces the recommended size and shows the resulting **LIQ MULT**.
Example:
```text
RISK QTY 100 ETH
LIQ MULT 0.40x
REC QTY 40 ETH
```
The risk-based quantity remains visible so you can distinguish between:
**Risk capacity** — how much you could trade based on your stop and risk budget.
**Execution capacity** — a more conservative recommendation based on observed market activity.
### Execution status
The indicator classifies conditions into simple execution warnings.
**Green — OK**
No obvious sizing or execution issue detected.
**Amber — Review**
* High fees relative to SL
* Very tight or wide SL relative to ATR
* Liquidity-based size reduction
* Position notional cap reached
**Red — Attention**
* Round-trip fees exceed the structural SL percentage
* Invalid or impractical calculated position size
### Typical workflow
**1. Identify the trade setup**
**2. Drag SL to structural invalidation**
**3. Check EXECUTION status**
**4. Read REC QTY**
**5. Execute**
The indicator is intentionally designed for quick visual use during fast-moving markets.
### Important limitations
The liquidity model is a **proxy**, not an order-book or slippage prediction.
It uses TradingView's available 1-minute volume data and does not know the actual depth, spread, liquidity-provider inventory, or execution quality available at your broker or exchange.
Actual fills may differ due to:
* Spread
* Order-book depth
* Market impact
* Latency
* Volatility
* Slippage
* Broker/exchange execution
* Fees and instrument specifications
Fees, quantity increments, point value, maximum notional and liquidity thresholds are configurable and should be adjusted to match the instrument and venue you trade.
**Risk Sizer is an execution and risk-management aid, not a trading signal or financial advice.**
Wskaźnik

Leg Anatomy - Measured Retracement and ExtensionEvery trader draws the same three numbers on every chart: 38.2, 50 and 61.8. Those numbers were not derived from this market, this timeframe, or this instrument. They were not derived from any market. They are a convention that spread because it spread.
This script measures the real thing instead.
WHAT IT MEASURES
Price is broken into confirmed swing legs. A running extreme is tracked, and when price closes back from that extreme by more than a configurable multiple of ATR, the extreme is confirmed as a swing and a new leg begins.
Every completed leg is measured as a ratio of the leg immediately before it. A leg that travelled 60 percent of the previous leg records 0.60. A leg that went 140 percent past it records 1.40. That single number, the leg-to-leg ratio, is the entire dataset.
From the last N legs on the chart you have open, the panel reports:
The median leg, expressed as a multiple of the one before it.
The interquartile range, the middle half of the distribution.
The share of legs that were shallow, under 0.62.
The share that were deep, between 0.62 and 1.00.
The share that were extensions, past 1.00.
On some symbols and timeframes the conventional levels sit close to the measured centre. On many they do not, and the gap between what a chart actually does and what the convention assumes is visible in one row of the panel.
THE PROJECTION
The distribution is not left as a table. It is applied forward.
The leg currently forming starts from the last confirmed swing, and the leg before it has a known size. Multiplying that size by the measured median, upper quartile and ninetieth percentile gives three projected endpoints, drawn as a shaded zone in front of price with a dashed median line and a price label.
The panel shows how far the forming leg has travelled as a percentage of its median expectation. Below 100 percent the leg is still inside its normal range. Above it, the leg has already outrun the typical case for this chart, which is information whether you are holding it or fading it.
The zone is not a forecast. It is where the middle of the distribution sits, and roughly half of past legs fell short of it.
THE SKELETON
Confirmed legs are drawn as a thick zigzag across the chart, each one labelled with its own ratio, so the distribution in the panel can be read directly off the price action that produced it. Candles are tinted by the direction of the leg currently forming.
Because swings only confirm on closed bars and a confirmed swing is never revisited, the skeleton behind price is final. Only the leg at the right edge is still forming, and the projection zone updates only when a new leg is confirmed.
SETUPS
When a swing confirms, a new leg begins, and the script produces a complete setup at that close.
The stop sits just beyond the swing that was just confirmed, plus an ATR buffer. That swing is the level the leg depends on. If it goes, the leg reading was wrong.
The three targets are the lower quartile, the median and the upper quartile of the measured distribution, projected from the swing. They are not multiples of risk and they are not conventional ratios. They are the shape of this chart's own legs.
Only one setup is tracked at a time. The panel records whether the first target or the stop was reached first, and prints collecting until the sample is large enough to mean anything. That number measures one mechanical rule and is not a backtest.
SETTINGS
Reversal Threshold is the only structural dial. It decides what counts as a leg. A low value produces many small legs and a distribution dominated by noise. A high value produces few large legs and a distribution with a small sample. The default sits between the two, and changing it changes the entire analysis, which is the point: a leg on a scalping horizon is not a leg on a swing horizon, and the measured distribution should differ between them.
Volatility Length sets the ATR lookback used for the reversal threshold and the stop buffer.
Legs Kept In Sample bounds the history, so the distribution tracks the current regime instead of averaging in a market from years ago.
REPAINTING
Swing confirmation, leg measurement, the distribution, setups and alerts all evaluate on confirmed bars. A confirmed swing is never moved and a drawn leg is never redrawn. The projection zone in front of price is recomputed only when a new leg begins. The script requests no higher timeframe data.
HOW TO READ IT
Start with the three share rows. If a chart shows most of its legs under 0.62, it is a market that retraces shallowly and continuation is the base case. If most legs sit between 0.62 and 1.00, it is a market that gives deep pullbacks and entering early is expensive. A high share above 1.00 is a trending regime where each leg outruns the last.
Then look at the forming leg's progress. A leg at 40 percent of median with a distribution that favours extension is a different situation from a leg at 130 percent in a market that rarely extends.
The ratios printed on the skeleton let you check the panel against your own eyes rather than trusting it.
This is an analysis tool, not financial advice, and not a trading system. A measured distribution describes what happened, not what will. Sample sizes are small by the standards of statistics and regimes change. Use it with your own risk management and position sizing. Wskaźnik

Risk Reward Scenario Analyzer - Entry Stop Target VisualizerOverview
Risk Reward Scenario Analyzer is an interactive trade-planning and scenario-research indicator for manually defined Entry, Stop and Target levels.
The script does not generate a market-direction signal, select an entry, recommend a stop, or predict a target. The user defines the trade geometry. The indicator then measures the planned reward-to-risk multiple, stress-tests that multiple against entry-price drift, and audits whether the Stop or Target was reached first under explicit confirmed-OHLC rules.
The implementation is centered on three connected research tasks:
1. Entry execution drift testing
2. Confirmed-OHLC first-touch auditing
3. Consecutive testing of multiple hypothetical scenarios
This combination is the main reason the script exists as a separate publication rather than as a basic risk/reward box.
Interactive trade plan
The user places four interactive values directly on the chart:
- Entry
- Anchor time
- Stop loss
- Take-profit target
The Entry and Anchor form one interactive chart point. Stop and Target can be repositioned independently.
Direction can be selected manually or derived from the geometry:
Long:
Stop < Entry < Target
Short:
Target < Entry < Stop
Invalid geometry remains visible for correction and is not processed as a valid scenario.
Two activation methods are available:
Assume filled at anchor:
The research scenario begins from the selected anchor.
Wait for entry touch:
The scenario activates only after a confirmed chart bar trades through the selected Entry. Exit evaluation begins on the following confirmed bar because chart OHLC cannot prove whether the Entry, Stop or Target occurred first inside the activation bar.
Planned R multiple
The basic calculations are:
Planned risk distance =
Absolute value of Entry - Stop
Planned reward distance =
Absolute value of Target - Entry
Gross R multiple =
Planned reward distance / Planned risk distance
The displayed gross break-even win rate is:
100 / (1 + Gross R)
This is a mathematical break-even threshold derived from the selected reward-to-risk relationship. It is not a prediction of the strategy's actual win rate.
Entry execution stress test
A planned R multiple can deteriorate when the actual entry is less favorable than the intended entry.
The Entry execution tolerance model keeps the selected Stop and Target fixed, then shifts the Entry in both directions.
The tolerance distance can be defined as:
- A percentage of the planned risk distance
- A number of minimum ticks
- A fraction of ATR captured at the anchor
For a Long scenario, the adverse entry is above the planned Entry and the favorable entry is below it.
For a Short scenario, the adverse entry is below the planned Entry and the favorable entry is above it.
The script calculates:
- Adverse entry R
- Favorable entry R
- Retained R percentage
- Low, Moderate or High R erosion
Retained R is calculated as:
Adverse entry R / Planned R x 100
This section is a sensitivity test. It does not predict spread, slippage or the price at which an order will actually be filled.
Confirmed-OHLC first-touch audit
After activation, the script audits whether the Stop or Target was reached first.
Terminal outcomes are evaluated from confirmed chart bars. The activation bar is excluded from exit evaluation because its intrabar sequence is unavailable from OHLC data alone.
The outcome states are:
- Target
- Stop
- Ambiguous
- Expired
- Active
- Waiting for entry
- Invalid
Gap opens are evaluated at the opening price before the normal high-low touch logic is applied.
If a confirmed bar touches both Stop and Target and the opening price did not already resolve the sequence, chart OHLC cannot reveal which level occurred first.
The default same-bar policy is:
Mark ambiguous
Two optional research assumptions are also available:
- Assume stop first
- Assume target first
These alternatives are explicit user-selected assumptions. They are not presented as reconstructed intrabar facts.
The scenario becomes Expired when the selected research horizon ends before Stop or Target is resolved.
Standard candlestick charts are recommended. Heikin Ashi, Renko, Kagi, Line Break, Point and Figure and other non-standard chart types can contain synthetic OHLC values. The panel identifies non-standard chart data as synthetic.
MFE, MAE and live progress
After activation, the script tracks:
- Maximum favorable excursion in R
- Maximum adverse excursion in R
- Current or terminal R
- Elapsed bars
- Research horizon
The activation bar is excluded from MFE and MAE for the same intrabar-order reason used by the first-touch audit.
Current R can change while the realtime bar is open. Target, Stop, Ambiguous and Expired outcomes are finalized from confirmed bars.
Risk budget, quantity and execution costs
The risk budget can be entered as:
- A percentage of account size
- A fixed cash amount
Cash conversion can use the symbol's point value or a manually entered point value.
Optional execution-cost assumptions include:
- Round-trip cash cost per unit
- Slippage in minimum ticks per side
Modeled loss per unit is:
Price risk per unit + Modeled execution costs
Modeled win per unit is:
Price reward per unit - Modeled execution costs
Raw quantity is:
Risk budget / Modeled loss per unit
The result is rounded down to the selected quantity step.
When costs are enabled, the script also calculates:
- Cost-adjusted R
- Cost-adjusted break-even win rate
- Modeled cash loss at Stop
- Modeled cash result at Target
The modeled quantity is an arithmetic research result. It is not a recommended, optimal or safe order size.
Point values, contract multipliers, lot conventions, commissions and margin requirements can differ by broker, exchange and instrument. Users must verify the applicable contract specifications independently.
Visual workflow
The main chart display includes:
- Reward area
- Risk area
- Entry execution tolerance band
- Entry, Stop and Target references
- Live or terminal R marker
- Compact scenario readout
The readout is intentionally limited to the information most relevant to reviewing the current scenario:
- Direction and state
- Planned or cost-adjusted R
- Mathematical break-even threshold
- Adverse entry R and retained R
- Risk budget and modeled quantity
- Modeled Stop and Target cash outcomes
- Current or terminal R
- Elapsed bars and research horizon
After a scenario resolves, the visual workflow can:
- Keep the full scenario
- Compact the result
- Clear completed visuals
Moving Entry, Anchor, Stop or Target causes Pine to recalculate the scenario from the selected inputs. A completely new placement can be started with TradingView's Reset points command.
This behavior is intended for rapid comparison of several user-defined trade hypotheses. Previous scenarios are not stored as a permanent trade journal.
Alerts
The script provides factual alert conditions for:
- Scenario activation
- Target reached first
- Stop reached first
- Ambiguous same-bar outcome
- Research horizon expiry
Users must create the desired alerts separately through TradingView's alert dialog.
Calculation behavior
The script does not use future data, lookahead or higher-timeframe data requests.
Changing an interactive point or any other input causes the available chart history to be recalculated using the new settings. This is normal input-driven Pine behavior and should not be interpreted as a persistent record of an earlier scenario.
Limitations
- Entry, Stop, Target, account values and cost assumptions are entered manually.
- The script does not identify or recommend a trade setup.
- It does not predict market direction.
- It does not read brokerage positions or Trading Panel account data.
- It does not place, modify or close orders.
- It does not reconstruct tick-by-tick movement inside historical bars.
- Same-bar Stop and Target order is unknowable from OHLC alone.
- Gap handling at the bar open is a research model, not a guaranteed fill model.
- Actual fees, spread, slippage and execution prices can differ from the entered assumptions.
- Point value can differ by broker, exchange and contract specification.
- Currency conversion, taxes, funding changes and margin requirements are not calculated automatically.
- Non-standard chart prices may not represent executable market prices.
- Results depend on the accuracy of the user's inputs.
- The script is a scenario visualization and research tool, not financial advice or a trade recommendation. Wskaźnik

Wskaźnik

Daily Range Exhaustion - ADR Probability MapAn intraday trader spends the whole session asking one question without ever measuring it: is there still room left in this move, or is the day already finished. Daily Range Exhaustion measures it.
The script records the completed range of every past day on the symbol you have open, and uses that sample to answer four things about the day in progress.
HOW MUCH OF THE DAY IS SPENT
Today's range is compared against the average daily range of the last 5, 10 or 20 days. The panel shows the result as a percentage. At 40 percent the day still has room in either direction. At 110 percent the day has already delivered more than an ordinary day and every further extension is, statistically, an outlier rather than the base case. The chart background tints once 100 percent is passed.
WHERE A FULL DAY COULD STILL REACH
Two levels are drawn:
Upside projection, today's low plus the average daily range. This is the highest point a statistically ordinary day could still print without becoming unusual.
Downside projection, today's high minus the average daily range.
Both compress as the session develops. Early in the day they sit far apart. By the afternoon they have squeezed toward price, and the distance left to each one is exactly the room the day has left. The shaded areas between price and each projection are that remaining room, made visible.
THE ODDS OF EXTENDING ANYWAY
Ranges are not a hard ceiling, so the panel reports how often the ceiling actually broke. Three lines show the share of past days whose range exceeded 100, 125 and 150 percent of the current average. On most liquid instruments roughly a quarter to a third of days exceed 100 percent, but far fewer reach 150 percent. Those numbers are the honest context for the exhaustion reading: they tell you whether a stretched day is rare or routine on this particular symbol.
WEEKDAY BREAKDOWN
A single average across all days hides a real effect. Many instruments have a quiet Monday and a violent Thursday, and judging Monday against a blended average will make it look exhausted when it is behaving normally. The panel breaks the sample down by weekday, shows the average range of each one, and expresses it as a percentage of the overall average. Today's weekday is highlighted.
HOW TO USE IT
As a filter on entries. Taking a fresh breakout when the day has already spent 120 percent of its average range is a different trade from taking the same breakout at 45 percent. The setup may be identical, the room available is not.
As target context. If the upside projection is 12 points away and your target is 30 points, the day would have to become a statistical outlier for that target to fill.
As mean reversion context. A day that hits the projection level and stalls has, by definition, reached the edge of its usual distribution.
As session planning. Check the weekday row before the session opens to know whether to expect a wide day or a narrow one.
NOTES ON THE DATA
The sample is built from the chart itself, so it needs history loaded. The panel shows a Building sample message and stays hidden until the minimum day count is reached, rather than showing statistics based on six observations.
Only intraday timeframes are supported. On a daily chart or higher the concept has no meaning, and the panel says so instead of printing misleading numbers.
Older days are dropped once the sample cap is reached, so the statistics follow the current volatility regime instead of averaging in a market from two years ago.
Days are bounded by the exchange session of the symbol. On instruments that trade nearly around the clock the day boundary is a convention, not a natural break, which slightly inflates the ranges of days that straddle a rollover.
WHAT IT IS NOT
There are no entry or exit signals here, and none are planned. This is context. A completed range is not a reversal signal, and an unfinished range is not a reason to expect continuation. Trends routinely spend two or three average ranges in a session, which is precisely why the extension odds are shown rather than hidden.
This is an analysis tool, not financial advice. Past distributions do not guarantee future ones. Use it alongside your own risk management and position sizing. Wskaźnik

Liquidity Sweep Engine Auto Targets [JPT]🔷 OVERVIEW
Liquidity Sweep Engine Auto Targets is an original Pine Script v5 indicator that detects liquidity sweep events using confirmed swing highs and swing lows. Once a valid sweep is identified, the indicator automatically builds a complete trade framework by plotting the Entry, Stop Loss, and multiple Take Profit levels directly on the chart.
The goal is to simplify market structure analysis and provide a clear visual trade plan without requiring manual calculations.
🔷 HOW IT WORKS
The indicator continuously monitors confirmed swing highs and swing lows to identify potential liquidity grabs.
Buy Setup
A bullish setup is generated when price sweeps below a previous swing low and closes back above the swept level (optional close confirmation).
After confirmation, the indicator automatically calculates:
• Entry Price
• Stop Loss
• TP1
• TP2
• TP3
Sell Setup
A bearish setup is generated when price sweeps above a previous swing high and closes back below the swept level.
The indicator then projects:
• Entry Price
• Stop Loss
• TP1
• TP2
• TP3
using user-defined Risk:Reward ratios.
🔷 VISUAL FEATURES
• Buy-side Liquidity Sweep labels
• Sell-side Liquidity Sweep labels
• Automatic Entry line
• Automatic Stop Loss line
• Three configurable Take Profit levels
• Historical trade setup visualization
• Risk-to-Reward projection
• Optional background highlighting
• Configurable line length
• Customizable colors
🔷 AUTO TARGET ENGINE
The built-in Auto Target Engine calculates trade objectives using the selected Risk:Reward values.
Supported target structure:
• TP1 = 1R (default)
• TP2 = 2R
• TP3 = 3R
Users may customize each target independently from the settings panel.
🔷 SIGNAL FILTERS
To reduce false signals, the indicator includes:
• Confirmed swing pivot detection
• Optional close confirmation
• Market structure-based liquidity detection
These filters are designed to help identify higher-quality liquidity sweep events.
🔷 INPUTS
Available settings include:
• Swing Length
• Close Confirmation
• Target Line Length
• TP1 Risk:Reward
• TP2 Risk:Reward
• TP3 Risk:Reward
• Label Visibility
• Line Colors
• Background Highlight
🔷 ALERTS
Built-in alerts are available for:
• Buy-side Liquidity Sweep
• Sell-side Liquidity Sweep
These alerts can be connected to TradingView's notification system.
🔷 COMMON WORKFLOW
A typical workflow is:
1. Wait for a confirmed liquidity sweep.
2. Allow the signal candle to close (if Close Confirmation is enabled).
3. Review the automatically plotted Entry, Stop Loss, and Take Profit levels.
4. Combine the setup with your own market structure, trend analysis, or additional confirmation before making any trading decisions.
🔷 MARKETS
This indicator can be used on:
• XAUUSD & GOLD
• Forex
• Stocks
• Cryptocurrency
• Futures
• Indices
• Commodities
It is compatible with multiple timeframes and may be adapted to different trading styles.
🔷 BEST PRACTICES
Many traders choose to combine liquidity sweeps with:
• Market Structure
• Break of Structure (BOS)
• Change of Character (CHoCH)
• Fair Value Gaps (FVG)
• Order Blocks
• Higher Timeframe Trend
These concepts are optional and can provide additional context when evaluating a setup.
🔷 DISCLAIMER
This indicator is provided as a chart analysis tool for educational and informational purposes only. It identifies trade setups according to its programmed rules and does not predict future price movements or guarantee trading results. Users should always perform their own analysis, apply sound risk management, and consider additional market factors before making trading decisions. Wskaźnik

Multi-Timeframe ATR Stop & Contract Risk TableSummary
The Multi-Timeframe ATR Stop & Contract Risk Table is an educational risk-management tool that displays Average True Range (ATR) values from multiple lower timeframes in a single table. It converts ATR into points, ticks, and estimated dollar values to help traders compare current market volatility across intraday timeframes.
The indicator is intended to assist with trade planning and position sizing. It does not generate trade signals or recommend entries or exits.
Description
Average True Range (ATR) is a widely used volatility measurement that estimates the average movement of price over a specified lookback period.
This script displays ATR values from the following timeframes:
1 Minute
2 Minute
3 Minute
5 Minute
For each timeframe the table displays:
ATR in Points
ATR converted to Ticks
Estimated Full-Size Contract Dollar Value
Estimated Micro Contract Dollar Value
The calculations can use the chart symbol's point value automatically or a manually specified value when desired.
The indicator is designed to reduce mental calculations when comparing potential stop distances across multiple intraday timeframes.
Features
Multi-timeframe ATR calculations
Independent ATR length
Multiple ATR smoothing methods
RMA
SMA
EMA
WMA
Automatic symbol point-value detection
Optional manual point-value override
Estimated dollar risk for full-size contracts
Estimated dollar risk for micro contracts
Adjustable ATR multiplier
Adjustable contract quantities
Compact table positioned on the chart
Tooltips throughout the settings and table
How to Use
Select an ATR length appropriate for your market.
Choose the desired ATR smoothing method.
Confirm or manually enter the contract point value if necessary.
Adjust the ATR multiplier if your trading plan uses stops based on a fraction or multiple of ATR.
Use the table to compare recent volatility between the 1-, 2-, 3-, and 5-minute timeframes.
The displayed values may be useful when estimating stop distances and approximate monetary exposure before entering a trade.
Educational Notes
Average True Range measures recent volatility.
ATR does not indicate:
market direction
trend strength
probability of success
optimal entry locations
ATR should be interpreted together with the user's own market analysis and risk-management methodology.
Intended Use
This script is intended for educational and informational purposes.
It assists traders by presenting volatility information in a compact format that may reduce manual calculations during trade planning.
Limitations
Dollar values are estimates based on the selected point value and contract quantity.
Actual fills, slippage, commissions, and execution costs are not included.
Different markets may use different contract specifications.
ATR is a lagging volatility measure and should not be interpreted as a predictive indicator.
Originality Statement
This indicator was developed as an original implementation using Pine Script® v6.
The calculations use publicly documented ATR methodology available within TradingView's Pine Script® environment. The implementation, table layout, user interface, conversion logic, and visualization were written specifically for this script and are not copied from another published TradingView indicator. Wskaźnik

Adaptive Regression Breakout Map | GainzAlgoThe Adaptive Regression Breakout Map (ARBM) is an advanced volatility and trend-tracking system designed to identify periods of extreme market compression and automatically map out high-probability breakout trades.
Rather than relying on traditional lagging indicators, ARBM utilizes a continuous statistical baseline to measure market "squeezes." Once a breakout is confirmed, the indicator shifts from analysis into execution mode, drawing a dynamic visual map on your chart that outlines precise Entry, Stop Loss, and Take Profit (TP1, TP2, TP3) levels, complete with automated trailing stop logic and a live performance dashboard.
How It Works
At its core, the ARBM operates on a dual-engine architecture:
Statistical Compression (The Squeeze): The script calculates a rolling linear regression baseline and wraps it in standard deviation bands. It continuously measures the width of this channel and compares it to a historical lookback period. When the bandwidth drops into a historically low percentile, the bands change color, signaling that the market is in a "squeeze" and building energy for a move.
Auto-Trendlines: Alongside the statistical bands, the script plots dynamic, auto-trendlines across recent pivot highs (cyan) and lows (magenta). These holographic lines track geometric compression and leave a visual history on the chart.
The Breakout Trigger: A signal is generated when the price violently escapes either the statistical standard deviation bands or the geometric auto-trendlines while the market is in a confirmed contraction state.
Dynamic Trade Mapping: Upon a breakout, the script calculates targets based on the volatility (bandwidth) at the time of the breakout. It plots the trade directly on your chart and actively trails the stop loss as targets are hit.
The Settings and Selections
The indicator is highly customizable, divided into four primary control groups:
Regression Model:
Regression Length: The lookback period for the linear regression baseline.
Deviation Multiplier: The width of the statistical bands (similar to Bollinger Bands).
Contraction Metrics:
Lookback Period: How far back the script looks to determine if the current channel is historically narrow.
Contraction Threshold %: The percentile the bandwidth must drop below to trigger a "squeeze" state.
Target Architecture:
TP1, TP2, TP3 Multipliers: Determines how far away your take profit targets are, dynamically scaled by multiplying the width of the channel at the time of the breakout.
Trendlines Overlay:
Show Holographic Trendlines: Toggle the geometric trendlines on or off.
Pivot Length: Determines how sensitive the script is when identifying the swing highs and lows used to draw the trendlines.
How to Use It
Trading with the ARBM is highly visual and systematic:
Wait for the Squeeze: Watch the regression channel. When the bands turn gray, volatility has compressed, and the market is consolidating.
Wait for the Signal: Look for a "Breakout, Long" or "Breakout, Short" label to appear. This confirms price has broken structure with momentum.
Follow the Map: The script will immediately draw your Entry (Blue), Stop Loss (Red), and three Take Profit targets (Green dashed lines).
Manage the Trade: The indicator handles trade management visually.
When TP1 is hit, the Stop Loss line automatically moves to your Entry price (Breakeven), and a label confirms the trail.
When TP2 is hit, the Stop Loss trails to TP1.
When TP2 is hit, the Stop Loss trails to TP1.
The trade closes entirely if TP3 or the trailing stop is hit. (Note: Hitting TP1 secures a win for the system's tracking, even if the remainder is stopped out at breakeven).
Monitor Performance: A stylized dashboard in the top right corner tracks the total number of signals, the historical Win Rate, and the Trade-by-Trade Sharpe Ratio, allowing you to quickly validate the settings for any given asset or timeframe.
Final Thoughts
The Adaptive Regression Breakout Map removes the guesswork from breakout trading. By combining continuous statistical volatility tracking with futuristic geometric trendlines, it mathematically identifies when a market is ready to move. Furthermore, by drawing the exact risk-to-reward parameters on the chart and tracking its own historical performance, it forces strict risk management and objective trade execution.
Wskaźnik

ATR Range Adaptive ATR Range Adaptive — TF-adaptive volatility bands with dashboard.
A precision volatility tool that projects the statistical extent of a "normal" bar move as five horizontal levels around the previous close — and recalculates automatically on whatever timeframe you're viewing.
How it works:
Add the indicator once. From the previous closed bar of the current chart timeframe it draws the middle line (previous close) plus four ATR-multiplied bands — ±0.5 × ATR and ±1.0 × ATR. Switch to 1H → hourly levels. Switch to 5M → 5-minute levels. No presets to change.
What it shows:
- Previous close as the anchor (middle line)
- +100% band (upper strong resistance) at previous close + 1 × ATR
- +50% band (intermediate resistance) at previous close + 0.5 × ATR
- -50% band (intermediate support) at previous close - 0.5 × ATR
- -100% band (lower strong support) at previous close - 1 × ATR
- Corner dashboard: current TF, previous close, 1 ATR as a percentage of price, and each level's value + distance from the live price
Key features:
- Fully TF-adaptive: no fixed daily/monthly assumption — bands follow the chart's timeframe
- Selectable ATR smoothing: RMA (Wilder), EMA, SMA, WMA
- Adjustable ATR length and multiplier
- Level lines extend a configurable number of bars to the right
- Middle line can be toggled independently of the ATR bands
- Dashboard: 6 anchor positions, 4 text sizes, adjustable cell transparency
- Full color palette for each band + header and text
- Tooltip on "1 ATR, %" explains volatility bands (low / normal / elevated / high)
- Clean overlay: only 5 lines and 1 dashboard, no chart clutter
Who it's for:
Traders who want a fast, timeframe-aware read on how far price has already stretched from the previous close — and where a "normal" move statistically ends. Useful for intraday range trading, scalping around ATR extremes, sizing stops, and spotting bars that break out of typical volatility. Wskaźnik

Trailing Drawdown Line Futures PropFirmsSee the exact price where your trailing drawdown gets hit — before it happens.
Built for futures prop-firm traders (Apex, Topstep, MyFundedFutures, Tradeify, BluSky and similar). Enter your firm's trailing DD size, your buffer at entry and your contract count, then click your entry point on the chart. The indicator draws your liquidation line — the price where the account would breach the trailing max drawdown — and ratchets it the way the firm actually does: it trails the implied equity peak at the FULL drawdown distance, and if you enter below your prior peak the line starts closer but does not move until price beats that peak.
Features
• Works on any futures symbol automatically — the contract's point value is read from the symbol (ES, NQ, MNQ, MES, GC, CL, ZB, …). Non-USD contracts (e.g. FDAX) display in their quote currency.
• Three trailing models: Intraday (trails every new high/low — real-time-trailing firms), Bar close, and End of day (EOD-trailing firms; needs an intraday or 1D chart).
• Live buffer readout — dollars and points left before the line — in a dark info table and an on-chart label.
• Breach is latched: once the line is touched the status stays BREACHED, because a trailing max-DD hit is terminal, not a temporary state. On historical bars the intraday model errs toward flagging (the path inside a bar is unknowable) — confirm on a lower timeframe.
• Lock support: enter the price where your firm freezes the DD (breakeven lock), or let the script derive it from your start balance + equity at entry. Status flips to LOCKED.
• Exit time: set it when you close the trade — the line and buffer freeze, because real DD levels stop moving while you're flat.
• Two alert conditions: buffer below warning level, and line touched.
How to use: add to chart → click your entry point → set contracts, firm DD size and buffer at entry (from your firm dashboard) → pick the trailing model that matches your firm → optionally create the two alerts. Re-anchor for every new trade.
Honest limitations: models ONE fixed-size position on THIS symbol. Scaling in/out or holding other instruments changes your real equity path and is not modeled. Anchor on a low timeframe (1–5 min) for precision. Educational risk-visualization tool — always confirm your firm's exact drawdown rule on their own site. Wskaźnik

Wskaźnik

[EWT] MA Extension Risk Stats MA Extension Risk Stats helps traders objectively measure how extended a stock, index, or any instrument is relative to its own historical behavior from a moving average.
Instead of guessing whether price “looks high,” this indicator calculates the percentage distance of every historical bar from a configurable SMA or EMA and then displays the Maximum, Mean, and Median deviations in a clean, updating table. By comparing the current deviation against these historical benchmarks, you get clear, data-driven context for profit booking decisions.
Key Benefits
Objective Extension Measurement: See exactly where the current price stands in the instrument’s historical distribution of moves away from its moving average.
Better Profit Booking Decisions: Know whether the current extension is normal, moderate, high, or near the historical maximum — removing emotion from scaling out of positions.
Risk Context at a Glance: Color-coded risk levels (Low / Moderate / High / Very High) combined with concise guidance help you quickly decide whether to book partial profits (30-50%) or exit most/all of a position.
All-History Perspective: Unlike rolling-window tools, this indicator uses the entire available dataset on your chart, giving you a complete picture across different market regimes.
Fully Customizable: Choose SMA or EMA, any period length, and position the compact table anywhere on the chart. The table automatically adapts to your light or dark chart theme for excellent readability.
Practical Use Cases
Trend Following & Swing Trading: When price stretches far above its MA during a strong uptrend, use the stats to scale out systematically instead of hoping for more upside.
Mean Reversion Setups: Identify when price has extended unusually far below its MA and prepare for potential bounces with better risk awareness.
Position Management: Apply consistent rules such as “book 50% when current deviation exceeds 1.5× median” or “exit fully when approaching historical maximum.”
Multi-Timeframe Analysis: Run it on daily charts for swing trades and weekly charts for positional decisions using the same logic.
Whether you trade stocks, indices, forex, or crypto, MA Extension Risk Stats gives you a professional, repeatable framework to manage extension risk and improve profit-taking discipline. It is especially valuable for traders who want to move from subjective “it looks extended” decisions to quantifiable, historically grounded rules.
Add it to your chart, adjust the MA period to match your style, and start making more confident, data-backed decisions on when to lock in profits. Wskaźnik

ATR Trailing Stop Strategy with EMA Trend FilterMost stop-loss approaches treat risk as a fixed number, a percentage, a dollar amount, a set number of points. The problem with fixed stops is that they ignore the market's actual behavior at any given moment. A 1% stop that makes sense in a low-volatility environment will get hit constantly in a high-volatility one. A wide fixed stop that survives a volatile period is needlessly large when the market quiets down.
ATR-based trailing stops solve this by scaling the stop distance to what the market is actually doing right now. ATR measures average true range, the average distance price moves per bar over a given period, including gaps. When volatility expands, the stop widens to give the trade room to breathe. When volatility contracts, the stop tightens to protect more of the open profit. The stop follows price as it moves in the trade's direction and never moves backward — only trailing further in the profitable direction or holding its level until price reverses through it and the trade closes.
The EMA filter is added for one specific reason: trailing stop systems are naturally reactive rather than predictive, which means without a trend filter they will generate signals in both directions during choppy, range-bound conditions. The 200 EMA acts as a simple regime gate.
Long trades are only considered when price is above the 200 EMA, broadly in an uptrend. Short trades are only considered when price is below it. This doesn't eliminate losing trades, but it meaningfully reduces the number of counter-trend entries that trail stop systems would otherwise generate in oscillating markets.
How the trailing stop works:
On each bar, the strategy calculates a long stop level at close - (ATR × multiplier) and a short stop level at close + (ATR × multiplier). When price is in an uptrend, the long stop ratchets upward with price but never moves down, it holds its highest reached level until price closes below it, at which point the trend flips to bearish and the stop becomes a downward-trailing short stop. The opposite applies in a downtrend. A trend flip from bearish to bullish generates a long entry signal if price is above the 200 EMA. A flip from bullish to bearish generates a short entry signal if price is below the 200 EMA.
Parameters worth adjusting:
The ATR multiplier controls the sensitivity of the trailing stop. A lower multiplier (1.5x or below) produces a tighter stop that flips trend direction more frequently, useful on lower timeframes where you want faster reaction but will generate more signals. A higher multiplier (2.5x or above) produces a wider stop that flips less often, better suited for higher timeframes where you want to stay in a trend longer and can tolerate larger drawdowns on individual trades before exit. The ATR length controls how many bars the average is computed over. Shorter lengths react faster to recent volatility changes; longer lengths smooth out volatility spikes.
The EMA length can be adjusted depending on your timeframe. 200 periods is the standard for daily charts. On a 4-hour chart, 100 to 150 periods covers a similar calendar range. On a 1-hour chart, 50 to 100 periods is reasonable. The goal is for the EMA to represent the dominant trend, not a short-term moving average that whipsaws with every swing.
What this is not:
This strategy does not predict market direction. It reacts to price behavior and exits when price reverses by a defined volatility-adjusted distance. It will produce losing trades, every trailing stop system does, and sequences of losses in choppy conditions are expected behavior, not a flaw. The expectation is that winning trades capture significantly more than they risk because the stop trails and locks in profit, while losing trades are cut at a defined ATR-based distance.
Evaluate this on your own instruments and timeframes with realistic backtest conditions before drawing any conclusions about expected performance.
Shared for educational purposes. This is not investment advice. Always backtest thoroughly and size positions according to your own risk tolerance. Strategia
