Global Net Liquidity (TG fork)Worldwide net liquidity, with trend coloring.
Global Net Liquidity attempts to represent worldwide net liquidity, and is defined as: Fed + Japan + China + UK + ECB - RRP - TGA , Where the first five components are central bank assets.
On TradingView, the indicator can be reproduced with the following equations: Global Net Liquidity = FRED:WALCL + FRED:JPNASSETS * FX_IDC:JPYUSD + CNCBBS * FX_IDC:CNYUSD + GBCBBS * FX:GBPUSD + ECBASSETSW * FX:EURUSD + RRPONTSYD + WTREGEN
However, this indicator adds a moving average cloud, and margin coloring, which eases historical trend assessment at a glance.
This indicator can be seen as an alternative representation of the accumulation/distribution indicator (and hence the same terms can be used in this description).
The Moving Average Cloud is simply the filling between the moving average (by default an EMA) and the current value. This feature was inspired by D7R ACC/DIST closed-source indicator, kudos to D7R for making such neat visual indicators.
Usage instructions:
Blue is more likely a phase of accumulation because the current value is above its historical price as defined by the moving average,
red is when this is more likely a phase of distribution.
Yellow is when the difference is below the margin, so we consider it is insignificant and that the trend is undecided. This can be disabled by setting the margin to 0.
While the color indicates if it's more likely an accumulation (blue) or distribution (red) phase or undecided (yellow), the cloud's vertical size allows to assess the strength of this tendency and the horizontal size the momentum, so that the bigger the cloud, the stronger the accumulation (if cloud is blue) or distribution (if cloud is red).
Why is that so? This is because the cloud represents the difference between the current tendency and the moving averaged past one, so a bigger cloud represents a bigger departure from recently observed tendencies. In practice, when there is accumulation, a pump in price can be expected soon, or if it already happened then it means it is indeed supported by volume, whereas if distribution, either a dump is to be expected soon, or if it already happened it means it's supported by volume.
Or maybe not necessarily a dump, but if there is a move upward in price, but the indicator indicates a strong distribution, then it means that the price movement is not supported and may not be sustainable (reversal may happen at anytime), whereas if price is going upward AND there is an accumulation (blue coloring) then it is more sustainable. This can be used to adapt strategies accordingly (risk on/risk off depending on whether there is concordance of both price and accumulation/distribution).
This indicator also includes sentiment signals that can be used to trigger alarms.
This indicator is a remix of Dharmatech's, who authored the first this Global Net Liquidity equation, kudos to them! Please show them some love if you like this indicator!
Cari skrip untuk "Cycle"
MVRV Z-ScoreThe MVRV ratio was created by Murad Mahmudov & David Puell. It simply compares Market Cap to Realised Cap, presenting a ratio (MVRV = Market Cap / Realised Cap). The MVRV Z-Score is a later version, refining the metric by normalising the peaks and troughs of the data.
Fierytrading: Volatility DepthDear Tradingview community,
I'd like to share one of my staple indicators with you. The volatility depth indicator calculates the volatility over a 7-day period and plots it on your chart.
This indicator only works for the DAILY chart on BTC/USD.
Colors
I've color coded the indicator as follows:
- Red: Extreme Volatility
- Orange: High Volatility
- Yellow: Normal Volatility
- Green: Low Volatility
Red: extreme changes in price. Often during local tops and bottoms.
Orange: higher than average moves in price. Often before or after a "red" period. Often seen in the middle of bear or bull markets.
Yellow: normal price action. Often seen during early stage bull-markets and late stage bear-markets.
Green: very low price movement. Often during times of indecision. Once this indicator becomes green, you can expect a big move in either direction. Low volatility is always followed by high volatility.
In a long-term uptrend, a green period often signals a bullish break out. In a long-term downtrend it often signals a bearish break out.
How to use
Save the indicator and apply it to your chart. You can change the length in the settings, but it's optimized for 7 days, so no need to change it.
I've build in alerts for all 4 different volatility periods. In most cases, the low volatility alert is enough.
Good luck!
Fed Projected Interest RatesThis script shows you the current interest rates by the FED (see ZQ symbol nearest expiration)
and the next expirations (see ZQ further expiration dates).
It is important to keep your expiration and descriptions up to date, to do that to the indicator inputs and change as you please.
RS Stage AnalysisThis script trying to detect different lifecycle of stock / Stages.
There is mainly 4 stages of stocks.
1) stage 1 - Accumulation = color = aqua
2) stage 2 - Advancing = color = green
3) stage 3 - Distribution = color = yellow
4) stage 4 - Declining = color = red
At some point the condition i wrote wont detect any stage.
Stan Weinstein Trend IndicatorThis indicator is a trend indicator for trading charts based on the method of Stan Weinstein. It uses various technical methods to identify four trend phases on an asset: consolidation, advancement, plateauing, and decline. Users can customize the indicator by modifying parameters such as the periods for various calculations, such as the exponential moving average (EMA), the relative strength index (RSI), and support and resistance levels. The results of these calculations are then used to determine if an asset is in a phase of consolidation, advancement, plateauing, or decline.
The results are displayed as markers on the chart, with the following colors:
White: Consolidation
Green: Advancement
Blue: Plateauing
Red: Decline
According to the method of Stan Weinstein, it is recommended to buy an asset during an advancement phase and sell it during a plateauing phase. Similarly, it is recommended to sell an asset during a decline phase and cut this sale when the consolidation phase starts. It is important to note that this indicator is for informational purposes only and should not be used as investment advice. It is important to conduct fundamental and technical analysis before making an investment decision. It is also recommended to combine this analysis with other methods for optimal results and to consider the risks associated with any investment.
All default parameters of this indicator have been carefully chosen to provide the best possible results, however, it is possible to modify them according to personal preferences. It is important to note that modifying certain parameters may make the indicator less relevant and it is therefore recommended not to deviate too much from default values, unless you have a good understanding of the Stan Weinstein method and the technical indicators used.
It is important to note that this indicator is optimized for 1-week charts. It can be used to look at charts at other timeframes but calculations will always be based on weekly data.
Also, it is noteworthy that this indicator is optimized for cryptocurrencies, except Bitcoin, as it is used to calculate the relative strength of a token. However, you can choose the asset or index you want in the menu to calculate the relative strength. Furthermore, all the default settings are carefully chosen, but users are free to modify them, but doing so may result in less relevant results.
AlexD Market annual seasonalityThe indicator displays the percentage of bullish days with a given date over several years.
This allows you to determine the days of the year when the price usually goes up or down.
Indicator has a built-in "simple moving average" shifted back by half a period, due to which the delay of this smoothing is removed.
ciclo e velocita cicloCycle analisys made by MA builted usisng the difference between 2 MA , one with lenght double then the other one. Cycle speed indicator is the moment of the Cycle MA and give us the up or down of the Cycle MA
4h 相对超跌筛选器 · Webhook v2.0## 指标用途
用于你的「框架第2步」:在**美股 RTH**里,按**4h 收盘**(06:30–10:30 PT 为首根)筛出相对大盘/行业**显著超跌**且结构健康的候选标的,并可**通过 Webhook 自动推送**`symbol + ts`给下游 AI 执行新闻甄别(第3步)与进出场评估(第4步)。
## 工作原理(核心逻辑)
* **结构健康**:最近 80 根 4h 中,收盘 > 4h_SMA50 的占比 ≥ 阈值(默认 55%)。
* **跌深条件**:4h 跌幅 ≤ −4%,且近两根累计(≈8h)≤ −6%。
* **相对劣化**:相对大盘(SPY/QQQ)与相对行业(XLK/XLF/… 或 KWEB/CQQQ)各 ≤ −3%。
* **流动性与价格**:ADV20_USD ≥ 2000 万;价格 ≥ 3 美元。
* **只在 4h 收盘刻评估与触发**,历史点位全部保留,便于回放核验。
* **冷却**:同一标的信号间隔 ≥ N 天(默认 10)。
## 主要输入参数
* **bench / sector**:大盘与行业基准(例:SPY/QQQ,XLK/XLF/XLY;中概用 KWEB/CQQQ)。
* **advMinUSD / priceMin**:20 日美元成交额下限、最小价格。
* **pctAboveTh**:结构健康阈值(%)。
* **drop4hTh / drop8hTh**:4h/8h 跌幅阈值(%)。
* **relMktTh / relSecTh**:相对大盘/行业阈值(%)。
* **coolDays**:冷却天数。
* **fromDate**:仅显示此日期后的历史信号(图表拥挤时可用)。
* **showTable / tableRows**:是否显示右上角“最近信号表”及行数。
## 图表信号
* **S2 绿点**:当根 4h 收盘满足全部筛选条件。
* **右上角表格**:滚动列出最近 N 条命中(`SYMBOL @ yyyy-MM-dd HH:mm`,按图表本地时区)。
## Webhook 联动(生产用)
1. 添加指标 → 🔔 新建警报(Alert):
* **Condition**:`Any alert() function call`
* **Options**:`Once per bar close`
* **Webhook URL**:填你的接收地址(可带 `?token=...`)
* **Message**:留空(脚本内部 `alert(payload)` 会发送 JSON)。
2. 典型 JSON 载荷(举例):
```json
{
"event": "step2_signal",
"symbol": "LULU",
"symbol_id": "NASDAQ:LULU",
"venue": "NASDAQ",
"bench": "SPY",
"sector": "XLY",
"ts_bar_close_ms": 1754524200000,
"ts_bar_close_local": "2025-06-06 10:30",
"price_close": 318.42,
"ret_4h_pct": -5.30,
"ret_8h_pct": -7.45,
"rel_mkt_pct": -4.90,
"rel_sec_pct": -3.80
}
```
> 建议以 `symbol + ts_bar_close_ms` 做去重键;接收端先快速 `200 OK`,后续异步处理并交给第3步 AI。
## 使用建议
* **时间框架**:任意周期可用,指标内部统一拉取 240 分钟数据并仅在 4h 收盘刻触发。
* **行业映射**:尽量选与个股业务最贴近的 ETF;中国 ADR 可用 `PGJ/KWEB/CQQQ` 叠加细分行业对照。
* **回放验证**:Bar Replay **不发送真实 Webhook**;仅用于查看历史命中与表格。测试接收端请用 Alert 面板的 **Test**。
## 适配说明
* Pine Script **v5**。
* 不含成分筛查逻辑(请在你的 500–600 只候选池内使用)。
* 数字常量不使用下划线分隔;如需大数可用 `20000000` 或 `2e7`。
## 常见问题
* ⛔️ 报错 `tostring(...)`:Pine 无时间格式化重载,脚本已内置 `timeToStr()`。
* ⛔️ `syminfo.exchange` 不存在:已改用 `syminfo.prefix`(交易所前缀)。
* ⛔️ 多行字符串拼接报 `line continuation`:本脚本已用括号包裹或 `str.format` 规避。
## 免责声明
该指标仅供筛选与研究使用,不构成投资建议。请结合你的第3步新闻/基本面甄别与第4步执行规则共同决策。
CHAN CRYPTO RS🩷 ATR RS (Crypto / High-based 2.1x, Decimal Safe v2)
This indicator is designed for crypto position sizing and stop calculation using ATR-based risk management. It helps traders automatically determine the stop price, per-unit risk, and optimal position size based on a fixed risk amount in USDT.
🔧 Core Logic
ATR Length (Daily RMA) — calculates the daily Average True Range (ATR) using RMA smoothing.
ATR Multiplier (2.1× default) — defines how far the stop is placed from the daily high.
Stop Price (for Longs) = Daily High − ATR × Multiplier
Per-Unit Risk = (Entry − Stop) × Point Value
Position Size = Risk Amount ÷ Per-Unit Risk
Automatically handles decimal precision for micro-priced crypto assets (e.g., PEPE, SHIB).
Includes safeguards for minimum size and maximum position caps.
💡 Features
Uses Daily ATR without lookahead (no repainting).
Dynamically switches between current and previous ATR for stable results when the daily bar isn’t yet confirmed.
“Snap to tick” ensures stop prices align with the symbol’s tick size.
Table display summarizes ATR, stop price, per-unit risk, total risk, size, and bet amount.
Optional stop label on the chart for visual clarity.
🧮 Output Table
Metric Description
ATR(10) Daily RMA-based ATR
ATR used Chosen ATR (current or previous)
Stop Calculated stop price
Per-unit Risk per coin/unit
Risk Total risk in USDT
Size Optimal position size
Bet Total position value (Entry × Size)
🧠 Ideal For
Crypto traders who use fixed-risk ATR strategies and need precise, decimal-safe position sizing even for ultra-low-priced tokens.
Ahi Ultimate Script v6Ultimate Script v6 – a clean and flexible tool for monitoring price action:
Shows key moving lines for tracking market direction, with options to turn each line on or off.
Highlights short-term levels where price may react, using small horizontal lines.
Displays visual signals like “LONG” or “SELL” directly on the chart to help spot opportunities.
Marks important time-based ranges with colored boxes for quick reference.
All elements are clear, adjustable, and designed to keep your chart neat and easy to read
Index of Civilization DevelopmentIndex of Civilization Development Indicator
This Pine Script (version 6) creates a custom technical indicator for TradingView, titled Index of Civilization Development. It generates a composite index by averaging normalized stock market performances from a selection of global country indices. The normalization is relative to each index's 100-period simple moving average (SMA), scaled to a percentage (100% baseline). This allows for a comparable "development" or performance metric across diverse markets, potentially highlighting trends in global economic or "civilizational" progress based on equity markets.The indicator plots as a single line in a separate pane (non-overlay) and is designed to handle up to 40 symbols to respect TradingView's request.security() call limits.Key FeaturesComposite Index Calculation: Fetches the previous bar's close (close ) and its 100-period SMA for each selected symbol.
Normalizes each: (close / SMA(100)) * 100.
Averages the valid normalizations (ignores invalid/NA data) to produce a single "Index (%)" value.
Symbol Selection Modes:Top N Countries: Selects from a predefined list of the top 50 global stock indices (by market cap/importance, e.g., SPX for USA, SHCOMP for China). Options: Top 5, 15, 25, or 50.
Democratic Countries: ~38 symbols from democracies (e.g., SPX, NI225, NIFTY; based on democracy indices ≥6/10, including flawed/parliamentary systems).
Dictatorships: ~12 symbols from authoritarian/hybrid regimes (e.g., SHCOMP, TASI, IMOEX; scores <6/10).
Customization:Line color (default: blue).
Line width (1-5, default: 2).
Line style: Solid line (default), Stepline, or Circles.
Data Handling:Uses request.security() with lookahead enabled for real-time accuracy, gaps off, and invalid symbol ignoring.
Runs calculations on every bar, with max_bars_back=2000 for historical depth.
Arrays are populated only on the first bar (barstate.isfirst) for efficiency.
Predefined Symbol Lists (Examples)Top 50: SPX (USA), SHCOMP (China), NI225 (Japan), ..., BAX (Bahrain).
Democratic: Focuses on free-market democracies like USA, Japan, UK, Canada, EU nations, Australia, etc.
Dictatorships: Authoritarian markets like China, Saudi Arabia, Russia, Turkey, etc.
Usage TipsAdd to any chart (e.g., daily/weekly timeframe) to view the composite line.
Ideal for macro analysis: Compare democratic vs. authoritarian performance, or track "top world" equity health.
Potential Limitations: Relies on TradingView's symbol availability; some exotic indices (e.g., KWSEIDX) may fail if not supported. The 40-symbol cap prevents errors.
Interpretation: Values >100 indicate above-trend performance; <100 suggest underperformance relative to recent averages.
This script blends financial data with geopolitical categorization for a unique "civilization index" perspective on global markets. For modifications, ensure symbol tickers match TradingView's format.
Friday’s Close – Futures Weekend AnchorPurpose:
This indicator highlights the US futures weekend close price — the exact level where CME markets end trading on Friday at 4:00 PM CT / 5:00 PM ET.
It’s designed primarily for crypto traders who want to compare weekend market behavior to the traditional finance (TradFi) close.
Why it matters:
Crypto trades 24/7, but global liquidity and sentiment still pivot around the Friday futures close. During the weekend, crypto can “drift” relative to traditional markets — this line shows exactly where the week ended for Wall Street, giving you a clean reference point until futures reopen on Sunday evening.
Features
Precise Friday close capture (CME weekend close minute, not just daily bar)
Works on any ticker — especially useful for BTC, ETH, or other crypto assets
Adjustable for time zone (New York / Chicago / custom)
Option to select prior weeks with weekOffset
Draws a single clean line from Friday’s close forward — no clutter, no vertical stitches
Optional right-edge label with the close value and timestamp
Usage Tips
Keep the chart’s timezone in sync with your anchor (America/New_York = 5 PM ET, America/Chicago = 4 PM CT).
Use weekOffset = 1 to view last week’s Friday close.
Combine with volume, funding, or open interest indicators to see how weekend moves relate to the TradFi close.
Ideal for weekend analysis — shows whether crypto is trading rich or cheap vs. the Friday benchmark before futures reopen.
Recommended For
Crypto traders, analysts, and quant enthusiasts who monitor TradFi–crypto decoupling or weekend premium behavior.
ADOLFO'S NINJA TURTLE SOUPThis indicator signals when there is a turtle soup of m30 in the NY session following the trend of a supertrend indicator in a 1-hour time interval, being excellent for taking RR trades 1 to 1. Created by Engineer Adolfo Pérez Espinoza.
CE+ZLSMA RovTrading StrateryThe strategy is optimized for scalping in small timeframes like M15 and M30, as well as M5.
It combines two indicators: CE and ZLSMA.
Try it now!
Matt Market EfficiencyThis is a custom Pine Script v5 indicator for TradingView that creates a Market Efficiency Heatmap as a background overlay on your chart. It visualizes how "efficient" the market's price movement is over a specified period—essentially measuring how much of the total price volatility (wiggle room) resulted in net directional progress, weighted with volume activity.
High efficiency (stronger, less transparent color) indicates a clean trend with minimal wasted movement (e.g., a strong uptrend or downtrend).
Low efficiency (fainter color) suggests choppy, inefficient price action (e.g., ranging or noisy market).
Color coding: Teal for bullish (net price up), Purple for bearish (net price down).
The heatmap intensity scales from 1% opacity (very low efficiency) to 25% opacity (high efficiency), making it subtle yet informative without overwhelming the chart.
Moyennes Mobiles Pertinentes ema21vert ma50 bleue ma200 rougeUtilisez sur un même script un indicateur avec plusieurs moyennes mobiles servant de supports
First 30M Candle Rule Ref / 5M EntriesThis strategy highlights and reacts to two key 30-minute candles on the Romanian market schedule — at 10:30 AM and 15:30 or 16:30 (depending on daylight saving time).
It is designed to run on a 5-minute chart, using the 30-minute candles as reference points for potential entries.
When each 30-minute candle closes, the script:
Colors the background during that specific 30-minute period (green for the morning session, red for the afternoon session)
Sends an alert confirming the candle’s closure
Places a symbolic long trade after the 10:30 candle closes and a symbolic short trade after the afternoon candle closes (for backtesting purposes)
This setup allows traders to test or automate strategies that rely on market reactions following key time-based candles, without plotting any extra lines on the chart.
USCBBS-WDTGAL-RRPONTSYDThis is the U.S. Financial Market Net Liquidity.
The calculation method is to subtract the U.S. Treasury General Account balance (WDTGAL) and then the Overnight Reverse Repo balance (RRPONTSYD) from the Federal Reserve's balance sheet total (USCBBS).
Time Line Indicator - by LMTime Line Indicator – by LM
Description:
The Time Line Indicator is a simple, clean, and customizable tool designed to visualize specific time periods within each hour directly in a dedicated indicator pane. It allows traders to mark important intraday minute ranges across multiple past hours, providing a clear visual reference for time-based analysis. This indicator is perfect for identifying recurring hourly windows, session patterns, or custom time-based events in your charts.
Unlike traditional overlays, this indicator does not interfere with price candles and draws its lines in a separate pane at the bottom of your chart for clarity.
Key Features:
Custom Hourly Lines:
Draw horizontal lines for a specific minute range within each hour, e.g., from the 45th minute to the 15th minute of the next hour.
Multi-Hour Support:
Choose how many past hours to display. The indicator will replicate the line for each selected hourly period, following the same minute logic.
Automatic Start/End Logic:
If your chosen start minute is in the previous hour, the line correctly begins at that time.
The end minute can cross into the next hour when applicable.
If the selected end minute does not yet exist in the current chart data, the line will extend to the latest available bar.
Dedicated Indicator Pane:
Lines appear in a fixed, non-intrusive y-axis within the indicator pane (overlay=false), keeping your price chart clean.
Customizable Appearance:
Line Color: Choose any color to match your chart theme.
Line Thickness: Adjust the width of the lines for better visibility.
Inputs:
Input Name Type Default Description
Line Color Color Orange The color of the horizontal lines.
Line Thickness Integer 2 The thickness of each line (1–5).
Start Minute Integer 5 The minute within the hour where the line begins (0–59).
End Minute Integer 25 The minute within the hour where the line ends (0–59).
Hours Back Integer 3 Number of past hours to display lines for.
Use Cases:
Intraday Analysis: Quickly visualize recurring minute ranges across multiple hours.
Session Tracking: Mark critical time windows for trading sessions or market events.
Pattern Recognition: Easily identify time-based patterns or setups without cluttering the price chart.
How It Works:
The indicator calculates the nearest bars corresponding to your start and end minutes.
It draws horizontal lines at a fixed y-axis value within the indicator pane.
Lines are drawn for each selected past hour, replicating the chosen minute span.
All logic respects the actual chart data; lines never extend into the future beyond the most recent bar.
Notes:
Overlay is set to false, so lines appear in a dedicated pane below the price chart.
The indicator is fully compatible with any timeframe. Lines adjust automatically to match the chart’s bar spacing.
You can change the number of hours displayed at any time without affecting existing lines.
If you want, I can also draft a shorter “TradingView Store / Public Library description” version under 500 characters for the “Short Description” field — concise and punchy for users scrolling through indicators.
Forecast PriceTime Oracle [CHE] Forecast PriceTime Oracle — Prioritizes quality over quantity by using Power Pivots via RSI %B metric to forecast future pivot highs/lows in price and time
Summary
This indicator identifies potential pivot highs and lows based on out-of-bounds conditions in a modified RSI %B metric, then projects future occurrences by estimating time intervals and price changes from historical medians. It provides visual forecasts via diagonal and horizontal lines, tracks achievement with color changes and symbols, and displays a dashboard for statistical overview including hit rates. Signals are robust due to median-based aggregation, which reduces outlier influence, and optional tolerance settings for near-misses, making it suitable for anticipating reversals in ranging or trending markets.
Motivation: Why this design?
Standard pivot detection often lags or generates false signals in volatile conditions, missing the timing of true extrema. This design leverages out-of-bounds excursions in RSI %B to capture "Power Pivots" early—focusing on quality over quantity by prioritizing significant extrema rather than every minor swing—then uses historical deltas in time and price to forecast the next ones, addressing the need for proactive rather than reactive analysis. It assumes that pivot spacing follows statistical patterns, allowing users to prepare entries or exits ahead of confirmation.
What’s different vs. standard approaches?
- Reference baseline: Diverges from traditional ta.pivothigh/low, which require fixed left/right lengths and confirm only after bars close, often too late for dynamic markets.
- Architecture differences:
- Detects extrema during OOB runs rather than post-bar symmetry.
- Aggregates deltas via medians (or alternatives) over a user-defined history, capping arrays to manage resources.
- Applies tolerance thresholds for hit detection, with options for percentage, absolute, or volatility-adjusted (ATR) flexibility.
- Freezes achieved forecasts with visual states to avoid clutter.
- Practical effect: Charts show proactive dashed projections instead of retrospective dots; the dashboard reveals evolving hit rates, helping users gauge reliability over time without manual calculation.
How it works (technical)
The indicator first computes a smoothed RSI over a specified length, then applies Bollinger Bands to derive %B, flagging out-of-bounds below zero or above one hundred as potential run starts. During these runs, it tracks the extreme high or low price and bar index. Upon exit from the OOB state, it confirms the Power Pivot at that extreme and records the time delta (bars since prior) and price change percentage to rolling arrays.
For forecasts, it calculates the median (or selected statistic) of recent deltas, subtracts the confirmation delay (bars from apex to exit), and projects ahead by that adjusted amount. Price targets use the median change applied to the origin pivot value. Lines are drawn from the apex to the target bar and price, with a short horizontal at the endpoint. Arrays store up to five active forecasts, pruning oldest on overflow.
Tolerance adjusts hit checks: for highs, if the high reaches or exceeds the target (adjusted by tolerance); for lows, if the low drops to or below. Once hit, the forecast freezes, changing colors and symbols, and extends the horizontal to the hit bar. Persistent variables maintain last pivot states across bars; arrays initialize empty and grow until capped at history length.
Parameter Guide
Source: Specifies the data input for the RSI computation, influencing how price action is captured. Default is close. For conservative signals in noisy environments, switch to high; using low boosts responsiveness but may increase false positives.
RSI Length: Sets the smoothing period for the RSI calculation, with longer values helping to filter out whipsaws. Default is 32. Opt for shorter lengths like 14 to 21 on faster timeframes for quicker reactions, or extend to 50 or more in strong trends to enhance stability at the cost of some lag.
BB Length: Defines the period for the Bollinger Bands applied to %B, directly affecting how often out-of-bounds conditions are triggered. Default is 20. Align it with the RSI length: shorter periods detect more potential runs but risk added noise, while longer ones provide better filtering yet might overlook emerging extrema.
BB StdDev: Controls the multiplier for the standard deviation in the bands, where wider settings reduce false out-of-bounds alerts. Default is 2.0. Narrow it to 1.5 for highly volatile assets to catch more signals, or broaden to 2.5 or higher to emphasize only major movements.
Show Price Forecast: Enables or disables the display of diagonal and target lines along with their updates. Default is true. Turn it off for simpler chart views, or keep it on to aid in trade planning.
History Length: Determines the number of recent pivot samples used for median-based statistics, where more history leads to smoother but potentially less current estimates. Default is 50. Start with a minimum of 5 to build data; limit to 100 to 200 to prevent outdated regimes from skewing results.
Max Lookahead: Limits the number of bars projected forward to avoid overly extended lines. Default is 500. Reduce to 100 to 200 for intraday focus, or increase for longer swing horizons.
Stat Method: Selects the aggregation technique for time and price deltas: Median for robustness against outliers, Trimmed Mean (20%) for a balanced trim of extremes, or 75th Percentile for a conservative upward tilt. Default is Median. Use Median for even distributions; switch to Percentile when emphasizing potential upside in trending conditions.
Tolerance Type: Chooses the approach for flexible hit detection: None for exact matches, Percentage for relative adjustments, Absolute for fixed point offsets, or ATR for scaling with volatility. Default is None. Begin with Percentage at 0.5 percent for currency pairs, or ATR for adapting to cryptocurrency swings.
Tolerance %: Provides the relative buffer when using Percentage mode, forgiving small deviations. Default is 0.5. Set between 0.2 and 1.0 percent; higher values accommodate gaps but can overstate hit counts.
Tolerance Points: Establishes a fixed offset in price units for Absolute mode. Default is 0.0010. Tailor to the asset, such as 0.0001 for forex pairs, and validate against past wick behavior.
ATR Length: Specifies the period for the Average True Range in dynamic tolerance calculations. Default is 14. This is the standard setting; shorten to 10 to reflect more recent volatility.
ATR Multiplier: Adjusts the ATR scale for tolerance width in ATR mode. Default is 0.5. Range from 0.3 for tighter precision to 0.8 for greater leniency.
Dashboard Location: Positions the summary table on the chart. Default is Bottom Right. Consider Top Left for better visibility on mobile devices.
Dashboard Size: Controls the text scaling for dashboard readability. Default is Normal. Choose Tiny for dense overlays or Large for detailed review sessions.
Text/Frame Color: Sets the color scheme for dashboard text and borders. Default is gray. Align with your chart theme, opting for lighter shades on dark backgrounds.
Reading & Interpretation
Forecast lines appear as dashed diagonals from confirmed pivots to projected targets, with solid horizontals at endpoints marking price levels. Open targets show a target symbol (🎯); achieved ones switch to a trophy symbol (🏆) in gray, with lines fading to gray. The dashboard summarizes median time/price deltas, sample counts, and hit rates—rising rates indicate improving forecast alignment. Colors differentiate highs (red) from lows (lime); frozen states signal validated projections.
Practical Workflows & Combinations
- Trend following: Enter long on low forecast hits during uptrends (higher highs/lower lows structure); filter with EMA crossovers to ignore counter-trend signals.
- Reversal setups: Short above high projections in overextended rallies; use volume spikes as confirmation to reduce false breaks.
- Exits/Stops: Trail stops to prior pivot lows; conservative on low hit rates (below 50%), aggressive above 70% with tight tolerance.
- Multi-TF: Apply on 1H for entries, 4H for time projections; combine with Ichimoku clouds for confluence on targets.
- Risk management: Position size inversely to delta uncertainty (wider history = smaller bets); avoid low-liquidity sessions.
Behavior, Constraints & Performance
Confirmation occurs on OOB exit, so live-bar pivots may adjust until close, but projections update only on events to minimize repaint. No security or HTF calls, so no external lookahead issues. Arrays cap at history length with shifts; forecasts limited to five active, pruning FIFO. Loops iterate over small fixed sizes (e.g., up to 50 for stats), efficient on most hardware. Max lines/labels at 500 prevent overflow.
Known limits: Sensitive to OOB parameter tuning—too tight misses runs; assumes stationary pivot stats, which may shift in regime changes like low vol. Gaps or holidays distort time deltas.
Sensible Defaults & Quick Tuning
Defaults suit forex/crypto on 1H–4H: RSI 32/BB 20 for balanced detection, Median stats over 50 samples, None tolerance for exactness.
- Too many false runs: Increase BB StdDev to 2.5 or RSI Length to 50 for filtering.
- Lagging forecasts: Shorten History Length to 20; switch to 75th Percentile for forward bias.
- Missed near-hits: Enable Percentage tolerance at 0.3% to capture wicks without overcounting.
- Cluttered charts: Reduce Max Lookahead to 200; disable dashboard on lower TFs.
What this indicator is—and isn’t
This is a forecasting visualization layer for pivot-based analysis, highlighting statistical projections from historical patterns. It is not a standalone system—pair with price action, volume, and risk rules. Not predictive of all turns; focuses on OOB-derived extrema, ignoring volume or news impacts.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino