VolProfex Volatility Time Window AnalyzerVolProfex Volatility Time Window Analyzer (VPX VTWA) analyzes intraday volatility across user-defined time windows within a trading session. It displays a table ranking windows by average and median move size (price % or ATR multiples), using historical data over a lookback period, with optional trend quality filtering out choppy periods using Directional Efficiency Ratio (Kaufman ER).
Session
Session (HHMM-HHMM): Defines trading session in exchange local time (e.g., 0930-1600 for NYSE/NASDAQ).
Session Timezone: Selects timezone handling DST automatically (e.g., America/New_York).
Calculation
Analysis Window (min): Time slot size for table display (options: 5,10,15,30,60,120,240).
Intrabar Resolution (min): Lower TF for accurate intrabar data (options: 1,2,3,5,10,15,30); smaller = better precision, longer load.
Lookback Days: Recent days analyzed (1-5000, default 1000).
Move Method: High-Low Range (absolute) or Open-to-Close (directional).
ATR Normalisation: ON shows moves as ATR multiples for regime-independent comparison.
ATR Period: ATR lookback (1-200, default 14).
Trend Quality Filter
Enable Trend Quality Filter: Excludes choppy windows based on efficiency ratio.
Min Trend Quality (%): Threshold (0-100, default 30); higher = stricter directional moves.
Consolidation
Enable Consolidation: Shows top N individually, groups rest.
Show Top N Individually: Highest-vol windows at full detail (1-100, default 10).
Group Remaining Into (min): Block size for lower-vol averages (options: 5,10,15,30,60,120).
Display
Highlight Top N Rows: Green highlight count (1-10, default 3).
Table Position: Corner placement.
Text Size: Table font (Tiny,Small,Normal,Large).
Indicator

FVG Rejection Trade SystemHere's the publication description:
FVG Rejection Trade System
🔹 Introduction
This indicator — FVG Rejection Trade System — identifies Fair Value Gaps (FVGs) on your chart, detects when price returns to reject from those gaps, and automatically manages hypothetical trade entries, stop-losses, and take-profits — tracking all results in a live stats table.
The core idea is rooted in one of the more durable observations in price action: gaps created by three-candle imbalances act as unfinished business. When price returns to fill that imbalance and rejects, the gap has functioned as support or resistance. That rejection is the signal.
No indicator can guarantee the gap will hold. This model is a systematic framework for identifying and logging these events — not a prediction engine. A FVG that rejects on Tuesday may fill on Thursday. The stats table exists precisely to let you measure this empirically on your specific instrument and timeframe over time.
I'll cover the detection logic, entry rules, filtering options, and how to read the table output throughout.
🔹 The Premise
🔸 What is a Fair Value Gap?
A Fair Value Gap forms when price moves so aggressively in one direction that a three-candle sequence leaves an unfilled range. Specifically:
For a bullish FVG — the high of candle two bars ago is below the low of the current bar. That untouched range between them is the gap. Price gapped upward, leaving a pocket of inefficiency below.
For a bearish FVG — the low of candle two bars ago is above the high of the current bar. Price gapped downward.
To understand why these levels matter, consider what's happening mechanically. Assume price is trading at 5,000 on an S&P futures chart. A large aggressive buy order runs through the tape — three consecutive candles close higher with almost no overlap. The high of the first setup candle sits at 4,980. The low of the third candle is 5,010. Everything between 4,980 and 5,010 was skipped.
That range never saw two-sided trading. No sellers provided liquidity there because price moved through before they could respond. No buyers filled bids there because the move was already past them.
When price returns to that range, it is returning to the scene of unfinished business. Buyers who missed the initial move may be waiting. Sellers who were run over may defend. The gap acts as a potential inflection zone.
🔸 Why Rejection — Not Just Touch — Is the Signal
A gap retest alone isn't enough. Price entering a FVG is ambiguous — it could be reclaiming the zone cleanly, or it could be reversing hard through it. The distinction matters enormously for trade quality.
This indicator requires rejection confirmation: the candle that enters the zone must close back outside the zone on the opposite side from which it entered. For a bullish FVG, the candle's low must reach down into the zone and its close must be at or above the zone top. The candle wick penetrated — the body confirmed recovery.
This is the structural equivalent of a failed breakdown. Price tested the support area, couldn't sustain below it, and committed back above. That candle body is the market's real-time vote.
A close that confirms rejection is meaningfully different from a wick that merely touches.
🔸 Invalidation Logic — When the Gap No Longer Matters
Not all gaps deserve to be traded. This indicator implements a two-sided invalidation rule:
A bullish FVG is deleted if price closes below the gap's bottom boundary. Support is gone. There's no basis for a long setup in a zone that price has already violated on a closing basis.
A bullish FVG is also deleted if price closes above the gap's top boundary without a rejection. This means price blew through cleanly — the gap was consumed, not defended. The "retest and hold" scenario is no longer available.
The same logic applies symmetrically to bearish FVGs.
A gap that price has already escaped is no longer a valid reference level. Removing it keeps the chart clean and the trade logic honest.
🔹 How It Works
🔸 Detection and Box Rendering
FVGs are rendered as colored rectangles — green for bullish, red for bearish — extending a user-defined number of bars to the right. The minimum gap size filter (default: ATR-based) prevents the indicator from tagging every micro-gap on every bar. When Auto Min Gap Size is enabled, the gap must exceed one ATR(14) to be considered meaningful relative to current volatility. You can disable this and set a manual threshold if you prefer a fixed tick/point minimum.
Enabling Only Show Latest Gap keeps the chart uncluttered by removing previous boxes when a new one forms. Useful on lower timeframes where gaps stack quickly.
🔸 Entry Logic
When a rejection candle closes, the trade is queued — it does not enter on that candle's close. Entry fires at the open of the next bar. This is a deliberate choice: entering at the current bar's close introduces lookahead risk in backtesting. Entering at the next bar's open is what you would actually execute in practice by placing a market order after the signal candle closes.
Entry is long for bullish FVG rejections. Entry is short for bearish FVG rejections.
🔸 Stop-Loss Placement
Two stop modes are available:
FVG Zone — the stop is placed below the gap's lower boundary (for longs) or above the upper boundary (for shorts). A configurable buffer (default 10% of gap size) is added beyond the level to avoid being stopped by noise that slightly violates the zone.
Rejection Candle High/Low — the stop is placed at the extreme wick of the rejection candle itself (the low for longs, the high for shorts), again with the buffer. This produces a tighter stop and larger R:R in raw price terms, but is more susceptible to being stopped out on follow-through wicks.
The choice between these modes meaningfully changes your win rate and average risk. Neither is universally superior — the stats table exists to help you measure this on your instrument.
🔸 Take-Profit
TP is calculated as a fixed Risk:Reward multiple from entry. At the default 2:1, every dollar risked targets two dollars of reward. The R:R is displayed in the stats table and updates in real time when you change the setting.
🔸 Entry / SL / TP Lines
Three dashed lines are drawn from each entry bar: white for entry price, red for stop, green for take-profit. All three extend to the right until the trade resolves.
When a trade closes, the lines are capped at the exit bar. The line representing the level not reached is faded — red fades on wins, green fades on losses — giving you an immediate visual read on what happened without needing to inspect every trade manually.
Every element of these lines — color, width, style (solid, dashed, dotted) — is fully customizable from the Line Styles settings group.
🔸 TP ✓ / SL ✗ Labels
At the bar where each trade resolves, a label is placed at the exact exit price. TP ✓ in your chosen green confirms a winning trade. SL ✗ in your chosen red marks a stop-out. Labels are positioned above or below the bar based on direction and outcome so they don't stack on top of each other. Label size is independently configurable.
🔸 VWAP Filter
When enabled, the indicator will only enter long trades on rejection candles that closed above VWAP, and only enter short trades on candles that closed below VWAP. The VWAP line is rendered on the chart in yellow when this filter is active.
The rationale: VWAP is the volume-weighted average price for the session. A bullish FVG rejection occurring while price is below the day's average traded price is swimming against the volume-weighted current. Filtering to your directional VWAP bias is one of the simplest regime filters available on intraday charts.
Note that VWAP resets each session. On daily or higher timeframes this filter has less conceptual meaning and should likely be disabled.
🔸 Time Window Filter
The indicator includes a session time filter defaulting to 8:00 AM – 11:00 AM EST — the first three hours of the US equity session, generally considered the highest-liquidity and most directional window of the trading day. Only rejections occurring inside this window will trigger entries.
Time is calculated from the raw bar timestamp converted to UTC-5, so the filter functions correctly regardless of your chart's timezone setting. Start and end times are entered in 24-hour HHMM format (e.g., 800 for 8:00 AM, 1300 for 1:00 PM).
Toggling this filter off opens the system to all hours, which is useful for evaluating overnight sessions or non-US instruments.
🔸 Stats Table
A real-time performance table is rendered in the corner of your choice, showing:
Wins / Losses / Total — broken out for bullish trades, bearish trades, and combined
Win Rate — percentage of closed trades that hit TP before SL
R:R — the current risk-reward setting, so the context behind the win rate is always visible
Open — count of currently active trades by direction
Win rate without R:R is meaningless data. A 30% win rate at 3:1 R:R is profitable. A 60% win rate at 0.5:1 is not. The table shows both together intentionally.
🔹 Settings Reference
Fair Value Gap
Gap Length — how many bars the FVG box extends to the right
Auto Min Gap Size — uses ATR(14) as the minimum gap threshold; disable to set manually
Only Show Latest Gap — removes older boxes when a new gap forms
Delete Filled Gaps — removes boxes when price closes outside both boundaries
Trade System
Risk:Reward Ratio — TP distance as a multiple of risk
Stop Loss Placement — FVG Zone or Rejection Candle High/Low
Stop Buffer % — percentage of zone/candle range added beyond the SL level
VWAP Filter — restrict entries to VWAP-side direction
Time Window Filter — restrict entries to a configurable EST time range
Line Styles
Fully independent color, width (1–4), and style (Solid/Dashed/Dotted) for Entry, SL, and TP lines
Separate color and size controls for TP ✓ / SL ✗ hit labels
🔹 Closing Remarks
Fair Value Gaps are one of the more conceptually grounded tools in modern price action analysis. They represent real structural events — moments where directional aggression created an asymmetric footprint in the price record. Whether they consistently act as support or resistance depends heavily on the instrument, timeframe, and market regime.
This indicator is a measurement tool, not a prediction engine. The stats table is its most important feature. Load it on your preferred chart, let it run across several weeks of data, and examine whether bullish rejections, bearish rejections, or both are producing positive expectancy at your chosen settings. Change the time filter. Test different R:R ratios. Compare the VWAP-filtered results against unfiltered.
The system gives you the infrastructure to do that work empirically. What you do with the data is the actual edge. Indicator

Outside Bar & 2-Bar Reversal Alerts + SystemOutside Bar & 2-Bar Reversal — Price Action Reversal Detection with Integrated Trade Management
Hello friends and traders!
🔹 Introduction
This indicator — Outside Bar & 2-Bar Reversal — automatically identifies two of the most structurally sound price action reversal patterns and overlays a complete trade management system directly on your chart.
The patterns this indicator detects are rooted in a simple but powerful idea: momentum exhaustion followed by full absorption. When price makes an aggressive directional push and is then completely engulfed by the opposing side, it often signals that the prevailing move has run out of willing participants.
The indicator also includes an optional suite of confluence filters — VWAP, swing sweeps, and time-of-day — so you can isolate the highest-quality setups rather than trading every signal blindly.
I'll cover the pattern logic, the trade management system, and all filters in detail throughout this description.
🔹 The Premise
🔸 Why Reversal Candles Work
Price moves because of imbalance. When more aggressive buyers than sellers are active, price rises. When more aggressive sellers than buyers are active, price falls.
Reversal candle patterns are useful because they attempt to identify the moment that imbalance flips — where one side that was previously dominant is fully overcome by the other.
The key word is fully. A simple bearish candle after a bullish candle tells you very little. What's meaningful is when the opposing candle completely engulfs the prior move — taking out its low, closing above its open, and reaching above its high. That's not just a pause. That's a statement.
This is the foundation of both patterns this indicator detects.
🔸 What Is an Outside Bar?
An outside bar is a candle that completely engulfs the prior candle — its range exceeds the prior candle's range on both sides.
But not all outside bars are created equal. A random outside bar on a quiet consolidation bar means very little. The patterns this indicator targets require context and directionality before the signal fires.
Bullish Outside Bar — Full Conditions:
Candle 1 must be bearish — it closes below its open
Candle 1 must close below the prior candle's close — a genuine continuation of selling
Candle 1's low must be below the prior candle's low — it must make a lower low, showing directional commitment
Candle 2 (signal candle) must have a lower low than Candle 1 — extending the flush
Candle 2 must close above Candle 1's open — full absorption of the bearish candle
Candle 2 must have a higher high than Candle 1 — completing the engulf
The result: a setup where price made a committed bearish push, and then a single candle came in, swept below it, and closed above the entire prior move. Buyers didn't just show up — they overwhelmed every seller from the prior candle.
Bearish Outside Bar — Full Conditions:
The exact mirror. A committed bullish candle that makes a higher high, followed by a signal candle that sweeps above it and closes below its entire range. Sellers overwhelmed every buyer.
🔸 What Is a 2-Bar Reversal?
The 2-Bar Reversal is a related but distinct pattern. Rather than requiring full range engulfment, it focuses on close-to-close extremity.
Bullish 2-Bar Reversal:
Candle 1 closes entirely below the low of the candle before it — an aggressive, committed flush
Candle 2 closes above the open of Candle 1 — a full reclaim of the prior candle's starting point
The logic: if price closes below a prior candle's entire range, sellers were aggressive. If the very next candle reclaims all of that, buyers responded even more aggressively. The speed of the reversal is what makes this significant.
Bearish 2-Bar Reversal:
Candle 1 closes above the prior candle's high. Candle 2 closes below Candle 1's open. Immediate and full rejection of the breakout.
🔹 Integrated Trade Management
Every signal automatically places three levels on your chart so you never have to manually calculate a trade again.
🔸 Entry
The open of the candle immediately following the signal candle. You're not chasing — you're entering at the next structured open after confirmation is complete.
🔸 Stop Loss
The open of the signal candle itself. The reasoning: if price returns to where the signal candle opened, the reversal thesis is structurally compromised.
🔸 Take Profit
Fully user-adjustable R multiple. Default is 2R — meaning for every dollar risked, you're targeting two dollars of reward. Adjustable from 0.1R to any value via the settings panel.
🔸 Line Behavior
All three lines extend to the right in real time and automatically terminate the moment price hits either the TP or SL level. No manual cleanup. No cluttered leftover lines. Every historical trade remains visible on the chart so you can review setups at a glance.
🔹 Live Performance Table
A built-in stats table tracks every closed trade automatically:
Total Trades — all resolved trades
Wins — trades that reached the TP level
Losses — trades that hit the SL level
Win Rate — displayed as a percentage, color coded green above 50% and red below
Load any chart, any timeframe, any market — the table populates in real time and gives you an instant read on how the patterns have performed under your current filter settings.
🔹 Confluence Filters
Each filter is independently toggleable. Use one, all, or none — the indicator works standalone without any filters active.
🔸 VWAP Filter
VWAP (Volume Weighted Average Price) is widely used by institutional participants as an intraday benchmark. Price trading above VWAP is generally considered a bullish market structure for the session; below VWAP is bearish.
When enabled, this filter requires:
Bullish signals: the signal candle must close above VWAP
Bearish signals: the signal candle must close below VWAP
This keeps you aligned with the intraday institutional bias rather than trading reversals against the dominant order flow of the session.
🔸 Swing Sweep Filter
One of the most reliable contexts for a reversal pattern is when it occurs after a liquidity sweep — price briefly trading through a prior swing point before reversing. This is often where stop orders from trapped traders trigger, adding fuel to the reversal.
When enabled:
Bullish signals only show if the signal candle's low swept below a recent pivot low
Bearish signals only show if the signal candle's high swept above a recent pivot high
Both the lookback window and the pivot strength (number of bars required on each side to qualify as a swing) are fully adjustable.
🔸 Time Window Filter
Not all hours of the trading day are equal. The highest-quality price action signals tend to occur during periods of genuine institutional participation — typically the first few hours of the New York session when volume, spread, and volatility are all at their daily peak.
When enabled, signals are restricted to a user-defined time window. Default is 8:00 AM – 11:00 AM EST, covering the New York open. The start and end times are individually adjustable by hour and minute. Uses the America/New_York timezone, so EST/EDT daylight saving transitions are handled automatically.
🔹 Settings Overview
SettingDescriptionShow Bullish / Bearish SignalsToggle each direction independentlyShow Outside BarsToggle OB pattern on/offShow 2-Bar ReversalsToggle 2BR pattern on/offTake Profit R MultipleAdjustable TP target (default 2R)Show Trade LinesToggle entry/SL/TP linesLine ColorsIndependently customizableTime Window FilterOn/off + start/end timeVWAP FilterOn/offSwing Sweep FilterOn/off + lookback + pivot strength
🔹 Works On Any Market & Timeframe
The patterns are purely price-action based — no volume dependency, no indicator inputs. They apply equally to equities, futures, forex, and crypto. Most effective on intraday timeframes (1m–15m) during high-liquidity sessions, but the logic holds on higher timeframes for swing traders as well.
🔹 Closing Remarks
The Outside Bar and 2-Bar Reversal are not new concepts. Traders have been observing these patterns for decades. What this indicator adds is precision in definition — ensuring every signal meets a strict structural checklist rather than firing on any loosely engulfing candle — combined with a fully automated trade management overlay and a real-time performance table.
The filters exist because context matters. The same pattern in the middle of a choppy afternoon session, below VWAP, with no liquidity sweep, is a different proposition to the same pattern at the New York open, above VWAP, after a clean sweep of a prior swing low.
Use the filters to build a ruleset that matches your edge, and use the performance table to validate it.
Drop a comment below with the market and timeframe you're testing this on — always interested to see how different traders apply price action tools. Indicator

Order Blocks Rejection Stats [RT]This indicator identifies Order Blocks based on price action. It draws rectangular zones on the chart for visual identification and highlights bounces (rejections) within these zones. Additionally, it provides optional trade visualization with entry, stop-loss (SL), and take-profit (TP) lines based on user-defined filters, along with a performance summary table for backtesting purposes.
The logic is inspired by smart money concepts (SMC), focusing on pivot zones where price may reverse or continue.
Note that this is a technical tool for analysis only; it does not provide trading signals or guarantees any outcomes.
Key Features
Order Block Detection: Automatically detects and draws bullish (demand) and bearish (supply) order blocks using predefined price action setups.
Bounce Identification: Marks rejections (bounces) at order blocks with triangles for quick visual cues.
Trade Visualization: On bounces meeting filter conditions, plots entry (at close), SL (at block extremity or candle open), and TP (based on adjustable risk-reward ratio) lines. Lines extend until SL or TP is hit, with arrows indicating hits (green for TP, red for SL).
Filters: Includes a customizable moving average (MA) for trend confirmation (e.g., long above MA), time window for session-based trading, and optional SL adjustment to the bounce candle's open.
Performance Table: Displays wins, losses, and win rate in a table (for educational backtesting; not real-time trading results).
Customizable Colors and Sizes: User inputs for line colors and table text size.
Inputs and Settings
Delete Order Blocks After Fill: Removes blocks after price breaks through them.
Order Block Extension Length: Sets how far blocks extend (0 for infinite).
Moving Average Settings: Length, type (SMA/EMA/etc.), and source for trend filter.
Time Filter: Start/end hours/minutes to restrict entries to specific sessions.
Use Bounce Candle Open for SL: Moves SL to the open of the confirming candle.
Risk Reward Ratio: Adjusts TP distance relative to risk (default 1:1).
Line Colors: Separate colors for long/short entry, SL, and TP lines.
Table Text Size: Options from "tiny" to "huge" for the stats table.
How It Works
Block Formation: Scans for pivot setups (e.g., engulfing or break patterns) to create new blocks, queuing them for future retests.
Bounce Detection: When price overlaps a block and forms a reversal pattern, it's marked as a bounce.
Entry Conditions: Entries trigger on bounces above/below the MA and within the time window. Lines are drawn and extended dynamically.
Exit Tracking: Monitors if price hits TP (win) or SL (loss), updates the table, and stops line extension.
Table Update: Shows cumulative stats on the last bar for review.
This indicator can be used on any timeframe or asset for zone-based analysis. Experiment with settings to suit your chart.
Important Disclaimer
This is an educational tool and does not constitute financial advice. Trading involves risk, and past performance is not indicative of future results. Always conduct your own analysis and use proper risk management. The developer makes no representations about profitability or suitability for any trading strategy. Indicator

Higher High / Lower Low Probability IndicatorOverview
The "Higher High / Lower Low Probability Indicator" is an original statistical tool designed to help traders assess the likelihood of trend continuation in price action. By analyzing historical candles, it calculates the probability that the next candle will form a higher high (HH) or lower low (LL) based whether the previous candle expanded higher or lower.
This indicator uniquely incorporates handling for inside candles, where it falls back to the bias of the prior candle to maintain continuity in probability assessments. It's particularly useful for momentum traders, swing traders, or those incorporating probabilistic edges into their strategies, providing data-driven insights into potential bullish or bearish continuations without relying on complex oscillators or moving averages.
Features
Probability Calculations: Tracks occurrences and successes of higher highs and lower lows across the chart's history. For HH: If the previous candle had a higher high than the one before it, it computes the percentage chance the current candle will continue that pattern. The same logic applies to LL for downward trends.
Inside Candle Handling: Detects inside bars (where the high is lower and low is higher than the previous candle) and intelligently uses the bias from the candle before the inside bar, ensuring the indicator doesn't skip potential signals.
Visual Plotting: Displays the relevant probability (HH in green, LL in red) as a line plot only when the condition is met, helping users quickly identify active probabilities without clutter.
Informative Table: A customizable table in the chart shows HH and LL occurrences alongside their respective probabilities, formatted for easy reading.
User Inputs:
Table Position: Choose from options like "Top Right" (default), "Bottom Left", etc., to place the table where it suits your chart layout.
Text Size: Select from "Auto", "Tiny", "Small", "Normal" (default), or "Large" for optimal visibility.
All calculations are performed in real-time using Pine Script's historical data access, ensuring efficiency without repainting.
How to Use
Add the indicator to your chart via PulseWire's indicator search.
Adjust the "Table Position" and "Text Size" inputs to fit your preferences.
Monitor the plotted probability line: Green indicates a potential HH continuation with the displayed percentage; red signals LL probability.
Refer to the table for cumulative stats—higher occurrences provide more reliable probabilities over time.
Combine with other tools like support/resistance levels or volume for confirmation. For example, a high HH probability (>70%) in an uptrend might signal a buy opportunity.
This indicator works on any timeframe and symbol but performs best on charts with sufficient historical data (e.g., daily or higher) to build meaningful statistics. Note that probabilities are historical and not predictive guarantees—always use risk management.
Limitations
Relies on available historical bars; on very short histories (e.g., new symbols), probabilities may start at 0% until patterns accumulate.
Does not account for external factors like news events or volatility spikes.
The table updates only on the last bar for performance reasons.
This script is open-source for community review and customization. Indicator

Correlation Confluence Trend IndicatorCorrelation Confluence Trend Indicator
Overview
The Correlation Confluence Trend Indicator combines exponential moving averages (EMAs) and statistical correlation measures to identify high-confidence trend alignments between an asset and a benchmark. By filtering signals through correlation strength, this indicator highlights opportunities when the asset and benchmark move together. In other words, it defines a trend and then uses correlation strength and the trend of a second asset to identify high-confidence trends.
Key Features
Dual EMA Trend Analysis :
Calculates fast and slow EMAs for both the asset and the selected benchmark (e.g., SPY) to identify bullish and bearish trends.
Correlation Strength Filtering :
Evaluates correlation between the asset and benchmark, identifying stronger-than-average relationships based on the mean and standard deviation.
Background Color Coding :
- Green : Strong correlation, both asset and benchmark bullish.
- Aqua : Weak correlation, both asset and benchmark bullish.
- Red : Strong correlation, both asset and benchmark bearish.
- Fuchsia : Weak correlation, both asset and benchmark bearish.
- Orange : Strong correlation, benchmark bullish, asset bearish.
- Yellow : Weak correlation, benchmark bullish, asset bearish.
- Purple : Strong correlation, benchmark bearish, asset bullish.
- Lime : Weak correlation, benchmark bearish, asset bullish.
Visual Trend Indicators :
Plots fast and slow EMAs for the asset, dynamically colored based on aggregate trend signals. The color of this corresponds to the main trend signal.
Inputs
Benchmark Symbol : Symbol of the benchmark asset to compare against.
Fast EMA Length : Period for the fast EMA calculation.
Slow EMA Length : Period for the slow EMA calculation.
Correlation Length : Number of bars for correlation calculation.
Correlation Mean Length : Number of bars for mean and standard deviation calculation.
Std Dev Multiplier : Multiplier for standard deviation to define correlation strength. When the correlation is Std Dev Multiplier standard deviations above the mean, it counts as a strong correlation.
Set Background Color : Toggle background coloring on or off.
Notes
This indicator is primarily designed for trend-following strategies. By combining trend analysis and correlation filtering, it ensures that signals occur during aligned market conditions, reducing false signals.
Before incorporating this indicator into your trading strategy:
Always backtest on historical data to evaluate its performance before committing capital.
Use proper risk management to control position sizes and mitigate potential losses.
Remember that no indicator guarantees success. I'm quite proud of this one, but it's not the holy grail.
Indicator

Indicator

Price and Indicator CorrelationFIRST, CHANGE SOURCE OF INDICATOR FROM CLOSE TO WHATEVER INDICATOR YOU ARE COMPARING TO PRICE!!!!
Confirming Indicator Validity: By calculating the correlation coefficient between the price and a specific indicator, you can assess the degree to which the indicator and price move together. If there is a high positive correlation, it suggests that the indicator tends to move in the same direction as the price, increasing confidence in the indicator's validity. On the other hand, a low or negative correlation may indicate a weaker relationship between the indicator and price, signaling caution in relying solely on that indicator for trading decisions.
Identifying Divergence: Divergence occurs when the price and the indicator move in opposite directions. By monitoring the correlation coefficient, you can identify periods of divergence between the price and the selected indicator. Divergence may signal a potential reversal or significant price move, providing an opportunity to enter or exit trades.
Enhancing Trading Strategies: The correlation coefficient can be used to enhance trading strategies by incorporating the relationship between the price and the indicator. For example, if the correlation coefficient consistently shows a strong positive correlation, you may use the indicator as a confirmation tool for price-based trading signals. Conversely, if the correlation is consistently negative, it may indicate an inverse relationship that could be used for contrarian trading strategies.
Indicator Optimization : The correlation coefficient can help traders compare the effectiveness of different indicators. By calculating the correlation coefficient for multiple indicators against the price, you can identify which indicators have a stronger or weaker relationship with price movements. This information can guide the selection and optimization of indicators in your trading strategy.
Example:
Indicator

Indicator

Indicator

Daily GAP StatsI did not write the script from scratch but rather started editing code of an existing one. The original code came from a script called GAP DETECTOR by @Asch-
First up: I am a trader, not a programmer and therefore my code most likely is inefficient. If someone with more expertise would like to help and optimize it - feel free to get in touch, I am always happy to learn some new tricks. :)
This script does 2 things:
- It shows daily gaps stats based on user inputs
- It shows color coded labels on gap days with additional information in tooltips ( important: make sure to read 'known issues/limitations' at the end )
User Inputs
==========
Although the input dialog is pretty straight forward, I do a quick rundown:
- Length: max lookback time
- Gap Direction: self explanatory
- Show All Gaps | Cont Only | Reversal Only | Off:
This refers to the way labels are displayed on gap days (again: make sure to read known issues/limitations!)
- Show All Gaps: does what it says
- Cont Only: only shows gaps where price continued in the gap direction. If you filter for gap ups and chose 'Cont only' you will only see labels on gap days where price closed above the open (and vice versa if you scan for gap downs).
- Reversal Only: you will only see labels for closes below the open on gap up days (and the opposite on gap down days)
- Off: self explanatory
- Gap Measure in ATR/PCT: self explanatory, ATR is calculated over a 10d period
- Gap Size (Abs Values): no negative values allowed here. If you filter for gap downs and enter 3 it means it will show gaps where the stock fell more than 3 ATR/PCT on the open.
- RVOL Factor: along with significant gaps should come significant volume. RVOL = volume of the gap day / 20d average volume
- Viewing Options: Placing the stats label in the window is a bit tricky (see knonw issues/limitations) and I was not sure which way I liked better. See for yourself what works best for you.
Known Isusses/Limitations:
=======================
- Positioning of the stats table:
As to my knowledge, Tradingview only allows label positioning relative to price and not relative to the chart window. I tried to always display the gap stats table in the upper right corner, using 52wk high as y-coordinate. This works ok most of the time, but is not pretty. If anybody has some fancy way to tag the label in a fixed position, please get in touch.
- Max number of labels per script:
PulseWire has a limitation that allows a maxium of ~50 labels per script. If there are more labels, PulseWire will automatically cut the oldest ones, without any notification. I have found this behaviour to be rather inconsistent - sometimes it'll dump labels even if there are a lot fewer than 50. Hopefully PulseWire will drop this limitation at one point in the future.
Important: The inconsistent display of the gap day labels has NO INFLUENCE on the calculations in the gap stats table - the count and the calculations are complete and correct! Indicator

Alpha Performance of PeriodAlpha Performance of Period (PoP) produces a visualization of returns (gains and losses) over a quarterly, monthly, or annual period. It also displays the total % gain and loss over any length of days, months, and years as defined by the user.
Performance of Period (PoP) can be used to understand the performance of an asset over multiple periods using a single chart layout, and to compare the performance of different assets by using a multi-chart layout.
This can, for example, be used to compare the NASDAQ, S&P, and DJI over the past 20 years to create a dow vs. nasdaq vs. s&p performance chart. This can help you understand a comparison of historical returns by showing which performs the best month-over-month, quarter-to-quarter, year-to-year, throughout any custom period of days/months/years.
The ability to get a visualization of the % gain/loss can help to better understand how markets have performed over time and which markets have historically performed the best.
Check out the up and coming Educational Idea we will be releasing soon after this is live to see an example of how we use this tool.
Current Period Label
-----
Current Period : This label shows the current period's performance only when you hover over it.
(This label is located to the left of the current period's open candle and at the current candles close price)
TICKER "Time Period" Performance Label
-----
Total Period Gain : The total of all % gain periods from the start to end date.
Largest Period Gain : The biggest % gain period from the start to end date.
Total Period Loss : The total of all % loss periods from the start to end date.
Largest Period Loss : The biggest % loss period from the start to end date.
Total period Performance : The total % performance, the difference between the total gain and total loss.
NOTE : The "Current Period" performance is excluded from ALL five of the above-mentioned figures. This was done to avoid giving inaccurate comparison figures due to the period not being finished yet.
Inputs
-----
Current Script Version + Info : A drop-down list of instructions for the user to refer to.
Dark Mode Labels : Toggle on for Dark Mode. This is done since Labels text and background color can not be adjusted separately within the visual inputs so this is the best fit solution.
Time Period of Returns : Pick the period of performance you would like to emulate monthly/quarterly/annual.
Start Date : The day to start tracking performance.
Start Month : The month to start tracking performance.
Start Year : The year to start tracking performance.
End Date : The day to stop tracking performance.
End Month : The month to stop tracking performance.
End Year : The year to stop tracking performance.
As always if you have any feedback let us know in the comments and leave a like if you enjoy this tool :)
Indicator

Strategy

Indicator

Indicator
