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
Forcast
Volume Based Analysis V 1.00
Volume Based Analysis V1.00 – Multi-Scenario Buyer/Seller Power & Volume Pressure Indicator
Description:
1. Overview
The Volume Based Analysis V1.00 indicator is a comprehensive tool for analyzing market dynamics using Buyer Power, Seller Power, and Volume Pressure scenarios. It detects 12 configurable scenarios combining volume-based calculations with price action to highlight potential bullish or bearish conditions.
When used in conjunction with other technical tools such as Ichimoku, Bollinger Bands, and trendline analysis, traders can gain a deeper and more reliable understanding of the market context surrounding each signal.
2. Key Features
12 Configurable Scenarios covering Buyer/Seller Power convergence, divergence, and dominance
Advanced Volume Pressure Analysis detecting when both buy/sell volumes exceed averages
Global Lookback System ensuring consistency across all calculations
Dominance Peak Module for identifying strongest buyer/seller dominance at structural pivots
Real-time Signal Statistics Table showing bullish/bearish counts and volume metrics
Fully customizable inputs (SMA lengths, multipliers, timeframes)
Visual chart markers (S01 to S12) for clear on-chart identification
3. Usage Guide
Enable/Disable Scenarios: Choose which signals to display based on your trading strategy
Fine-tune Parameters: Adjust SMA lengths, multipliers, and lookback periods to fit your market and timeframe
Timeframe Control: Use custom lower timeframes for refined up/down volume calculations
Combine with Other Indicators:
Ichimoku: Confirm volume-based bullish signals with cloud breakouts or trend confirmation
Bollinger Bands: Validate divergence/convergence signals with overbought/oversold zones
Trendlines: Spot high-probability signals at breakout or retest points
Signal Tables & Peaks: Read buy/sell volume dominance at a glance, and activate the Dominance Peak Module to highlight key turning points.
4. Example Scenarios & Suggested Images
Image #1 – S01 Bullish Convergence Above Zero
S01 activated, Buyer Power > 0, both buyer power slope & price slope positive, above-average buy volume. Show S01 ↑ marker below bar.
Image #2 – Combined with Ichimoku
Display a bullish scenario where price breaks above Ichimoku cloud while S01 or S09 bullish signal is active. Highlight both the volume-based marker and Ichimoku cloud breakout.
Image #3 – Combined with Bollinger Bands & Trendlines
Show a bearish S10 signal at the upper Bollinger Band near a descending trendline resistance. Highlight the confluence of the volume pressure signal with the band touch and trendline rejection.
Image #4 – Dominance Peak Module
Pivot low with green ▲ Bull Peak and pivot high with red ▼ Bear Peak, showing strong dominance counts.
Image #5 – Statistics Table in Action
Bottom-left table showing buy/sell volume, averages, and bullish/bearish counts during an active market phase.
5. Feedback & Collaboration
Your feedback and suggestions are welcome — they help improve and refine this system. If you discover interesting use cases or have ideas for new features, please share them in the script’s comments section on TradingView.
6. Disclaimer
This script is for educational purposes only. It is not financial advice. Past performance does not guarantee future results. Always do your own analysis before making trading decisions.
Tip: Use this tool alongside trend confirmation indicators for the most robust signal interpretation.