SpeedBullish Strategy Confirm V6.2SpeedBullish Strategy Confirm V6.2
SpeedBullish V6.2 is an advanced price-action + indicator-based strategy designed to confirm trend strength and signal entries with high precision. This version builds on the W/M pattern structure and adds dynamic filtering with EMA, MACD Histogram, RSI, ATR, and Volume.
✅ Signal Conditions
🔹 Buy Signal:
Price above EMA10 or EMA15
MACD Histogram crosses above 0
RSI > 50
(Optional) Higher low via Pivot Low
(Optional) ATR > ATR SMA * Multiplier
(Optional) Volume > SMA * Multiplier
🔻 Sell Signal:
Price below EMA10 or EMA15
MACD Histogram crosses below 0
RSI < 50
(Optional) Lower high via Pivot High
(Optional) Confirmed high volatility and volume
⚙️ Strategy Features
MACD Histogram for momentum shift detection
RSI filtering for momentum confirmation
EMA10/15 for trend direction
ATR-based volatility filter
Volume confirmation filter
Dynamic TP/SL + Trailing Stop
Webhook Integration for MT5 auto-trade
Visual signal markers + background highlight
🔔 Alerts
Alerts are sent in JSON format via alert() with the current symbol, action (buy/sell), and price. Webhook endpoint and secret key are configurable.
📈 How to Use
Attach the strategy to any symbol and timeframe
Customize filters and confirmations to fit your market conditions
Enable webhook alerts for integration with your MT5 Expert Advisor or trading bot
Backtest and optimize before live deployment
Göstergeler ve stratejiler
Support and Resistance Profile with Volatility ClusteringThe indicator begins by looking at recent volatility behavior in the market: it measures the average true range over your chosen “Length” and compares it to the average true range over ten times that period. When volatility over the short window is high relative to longer-term volatility, we mark that period as a “cluster.” As price moves through these clusters—whether in a quiet period or a sudden burst of activity—the script isolates each cluster and examines the sequence of closing prices within it.
Within every cluster, the algorithm next finds the points along the price path that matter most to a human eye, smoothing out minor wobbles and highlighting the peaks and valleys that define the cluster’s shape. It does this by drawing a straight line between the beginning and end of the cluster, then repeatedly snapping the single point that deviates most from that line back onto it and re-interpolating, until it has identified a fixed number of perceptually important points. Those points capture where price really turned or accelerated, stripping away noise so that you see the genuine memory-markers in each volatility episode.
Each of those important points inherits a “weight” based on the cluster’s normalized volatility—essentially how large the average true range in that cluster was relative to its average close. Over your “Main Length for Profile” window, every time one of these weighted points occurs at a particular price level, it adds to a running total in that level’s bin. At the end of the window you see a silhouette of boxes extending to the right of the chart: where boxes are wide, many important points (with high volatility weight) have happened there in the past; where boxes are thin or absent, price memory is light.
For a trader, the value of this profile lies in spotting zones where the market has repeatedly “remembered” price extremes during volatile episodes—those are areas where support or resistance is likely to be strongest. Conversely, gaps in the profile—price levels with little weighted history—suggest frictionless zones. If price enters such a gap, it may move swiftly until it encounters another region of heavy memory. You can use this in several ways: as a filter on breakouts and breakdowns (only trade through a gap when you see sufficient momentum), as a guide for scaling into positions (add when price enters a low-memory zone and tighten stops where memory boxes thicken), or to anticipate where price might pause or reverse (when it reaches a band of wide boxes). By turning raw volatility clusters into a human-readable map of price memory, this tool helps you see at a glance where the market is likely to push or pause—and plan entries, exits, and risk targets accordingly.
DisplayUtilitiesLibrary "DisplayUtilities"
Display utilities for color management and visual presentation
get_direction_color(direction, up_excessive, up_normal, neutral, down_normal, down_excessive)
Get candle color based on direction and color scheme
Parameters:
direction (int) : Direction value (-2, -1, 0, 1, 2)
up_excessive (color) : Color for +2 direction
up_normal (color) : Color for +1 direction
neutral (color) : Color for 0 direction
down_normal (color) : Color for -1 direction
down_excessive (color) : Color for -2 direction
Returns: Appropriate color for the direction
get_candle_paint_directions(paint_opt, body_dir, bar_dir, breakout_dir, combined_dir)
Get candle directions for different painting algorithms
Parameters:
paint_opt (string) : Painting option algorithm
body_dir (int) : Body direction
bar_dir (int) : Bar direction
breakout_dir (int) : Breakout direction
combined_dir (int) : Combined direction
Returns:
get_bias_paint_directions(paint_bias, unified_dir)
Get paint directions based on bias filter
Parameters:
paint_bias (string) : Paint bias option ("All", "Bull Bias", "Bear Bias")
unified_dir (int) : Unified direction
Returns: Directions for two plotcandle series
get_transparency_levels(sf_filtered, fade_option, fade_opacity)
Calculate transparency levels for strength factor filtering
Parameters:
sf_filtered (bool) : Is strength factor filtered
fade_option (string) : Fade option ("Disabled", "Fade Candle", "Do Not Fade Wick", "Do Not Fade Wick and Border")
fade_opacity (int) : Fade opacity percentage
Returns:
get_strength_factor_filter(filter_option, individual_filters)
Generate strength factor filter conditions
Parameters:
filter_option (string) : Filter option string
individual_filters (map) : Map of individual filter conditions
Returns: Boolean filter result
get_signal_bar_condition(signal_option, individual_filters)
Generate signal bar conditions (inverted filters)
Parameters:
signal_option (string) : Signal bar option string
individual_filters (map) : Map of individual filter conditions
Returns: Boolean signal bar result
get_zscore_signal_condition(z_signal_option, z_filters)
Get Z-score signal bar conditions
Parameters:
z_signal_option (string) : Z-score signal option
z_filters (map) : Map of Z-score filters
Returns: Boolean Z-score signal condition
get_standard_colors()
Create a standard color scheme for directions
Returns: Standard color set
apply_zscore_modification(original_dir, z_filtered)
Modify directions for Z-score excess display
Parameters:
original_dir (int) : Original direction
z_filtered (bool) : Is Z-score filtered (shows excess)
Returns: Modified direction (doubled if excess detected)
get_default_fade_colors()
Get default fade colors for strength factor overlay
Returns: Default colors for TV overlay
should_paint_candles(paint_algo)
Check if paint algorithm should show candles
Parameters:
paint_algo (string) : Paint algorithm option
Returns: True if algorithm should display candles
get_signal_bar_char(signal_type, is_bullish)
Get signal bar character based on signal type
Parameters:
signal_type (string) : Signal type ("strength_factor" or "zscore")
is_bullish (bool) : Direction is bullish
Returns: Character and location for plotchar
get_signal_bar_color(signal_type, is_bullish)
Get signal bar colors
Parameters:
signal_type (string) : Signal type ("strength_factor" or "zscore")
is_bullish (bool) : Direction is bullish
Returns: Signal bar color
ZScoreAnalysisLibrary "ZScoreAnalysis"
Z-score analysis for detecting statistical deviations and excess market behavior
calculate_zscore(source, lookback, threshold, switch_enabled)
Calculate Z-score and related metrics with history tracking
Parameters:
source (float) : Data source for Z-score calculation
lookback (int) : Lookback period for mean and standard deviation
threshold (float) : Z-score threshold for significance
switch_enabled (string) : Enable/disable switch ("Enabled"/"Disabled")
Returns: Z-score, historical significant values, and running average
get_zscore_threshold(opt, input_thr, avg)
Get threshold based on threshold option
Parameters:
opt (string) : Threshold option ("User Input Threshold", "Average as Threshold", or other)
input_thr (float) : User input threshold
avg (float) : Average threshold
Returns: Calculated threshold value
is_zscore_filtered(switch_enabled, zscore, threshold)
Check if a metric passes the Z-score filter
Parameters:
switch_enabled (string) : Enable/disable switch
zscore (float) : Current Z-score value
threshold (float) : Z-score threshold
Returns: True if filtered (exceeds threshold)
get_consecutive_distances(body_dir, breakout_dir, is_inside_bar)
Calculate consecutive distances for Z-score analysis
Parameters:
body_dir (int) : Body direction
breakout_dir (int) : Breakout direction
is_inside_bar (bool) : Inside bar flag
Returns:
get_trend_to_mean_distance()
Calculate distance from trend to mean for momentum analysis
Returns: Distance between trend and mean
get_all_zscores(lookback, threshold, bar_dist_switch, body_dist_switch, chl_dist_switch, cc_dist_switch, m_dist_switch, body_dir, breakout_dir, is_inside_bar)
Get all Z-score calculations for the indicator
Parameters:
lookback (int) : Z-score lookback period
threshold (float) : Z-score threshold
bar_dist_switch (string) : Enable bar distance Z-score
body_dist_switch (string) : Enable body distance Z-score
chl_dist_switch (string) : Enable consecutive highs/lows Z-score
cc_dist_switch (string) : Enable consecutive closes Z-score
m_dist_switch (string) : Enable momentum distance Z-score
body_dir (int) : Body direction
breakout_dir (int) : Breakout direction
is_inside_bar (bool) : Inside bar flag
Returns: Array of Z-score results and filters
get_combined_zscore_filters(z_filters)
Get combined Z-score filters
Parameters:
z_filters (map) : Map of individual Z-score filters
Returns: Various combinations of Z-score filters
get_basic_distances()
Calculate basic distances used in Z-score analysis
Returns: Bar range and body range
get_individual_zscore_filter(z_filters, filter_name)
Get individual Z-score filter by name
Parameters:
z_filters (map) : Map of Z-score filters
filter_name (string) : Name of the filter ("bar_dist", "body_dist", etc.)
Returns: Boolean filter result
has_any_zscore_signal(z_filters)
Check if any Z-score filter is active
Parameters:
z_filters (map) : Map of individual Z-score filters
Returns: True if any Z-score exceeds threshold
StrengthFactorsLibrary "StrengthFactors"
Strength factor calculations for various market analysis metrics
get_threshold(opt, input_val, avg_val, lineancy)
Calculate threshold based on options
Parameters:
opt (string) : Threshold option ("Disabled", "User Input Threshold", "Average as Threshold")
input_val (float) : User input threshold value
avg_val (float) : Average value for threshold
lineancy (float) : Lineancy adjustment percentage
Returns: Calculated threshold
get_percentage_of_threshold(value, threshold)
Calculate percentage of threshold
Parameters:
value (float) : Current value
threshold (float) : Threshold value
Returns: Percentage of threshold
get_distance_sf(lookback, thr_opt, thr_inp, lineancy)
Calculate Distance Strength Factor
Parameters:
lookback (int) : Lookback period for average
thr_opt (string) : Threshold option
thr_inp (float) : User threshold input
lineancy (float) : Lineancy adjustment
Returns:
get_uniformity_sf(lookback, thr_opt, thr_inp, stddev_mult, lineancy)
Calculate Uniformity Strength Factor
Parameters:
lookback (int) : Lookback period for average
thr_opt (string) : Threshold option
thr_inp (float) : User threshold input
stddev_mult (float) : Standard deviation multiplier
lineancy (float) : Lineancy adjustment
Returns:
get_overlap_sf(lookback, thr_opt, thr_inp, lineancy)
Calculate Overlap Strength Factor
Parameters:
lookback (int) : Lookback period for average
thr_opt (string) : Threshold option
thr_inp (float) : User threshold input
lineancy (float) : Lineancy adjustment
Returns:
get_body_sf(lookback, thr_opt, thr_inp, lineancy)
Calculate Body Strength Factor
Parameters:
lookback (int) : Lookback period for average
thr_opt (string) : Threshold option
thr_inp (float) : User threshold input
lineancy (float) : Lineancy adjustment
Returns:
get_close_sf(lookback, thr_opt, thr_inp, lineancy)
Calculate Close Strength Factor
Parameters:
lookback (int) : Lookback period for average
thr_opt (string) : Threshold option
thr_inp (float) : User threshold input
lineancy (float) : Lineancy adjustment
Returns:
get_breakout_sf(lookback, thr_opt, thr_inp, lineancy, bro_dir, is_inside_bar)
Calculate Breakout Strength Factor
Parameters:
lookback (int) : Lookback period for average
thr_opt (string) : Threshold option
thr_inp (float) : User threshold input
lineancy (float) : Lineancy adjustment
bro_dir (int) : Breakout direction
is_inside_bar (bool) : Is inside bar flag
Returns:
get_always_in_sf(thr_opt, thr_inp, lineancy)
Calculate Always-In Strength Factor
Parameters:
thr_opt (string) : Threshold option
thr_inp (float) : User threshold input
lineancy (float) : Lineancy adjustment
Returns:
get_directional_sf(overlap_prc, distance_prc, body_prc, close_prc, breakout_prc, lookback, thr_opt, thr_inp, lineancy)
Calculate Directional Strength Factor (composite)
Parameters:
overlap_prc (float) : Overlap SF as percentage of threshold
distance_prc (float) : Distance SF as percentage of threshold
body_prc (float) : Body SF as percentage of threshold
close_prc (float) : Close SF as percentage of threshold
breakout_prc (float) : Breakout SF as percentage of threshold
lookback (int) : Lookback period for average
thr_opt (string) : Threshold option
thr_inp (float) : User threshold input
lineancy (float) : Lineancy adjustment
Returns:
get_combined_direction_sf(body_prc, close_prc, breakout_prc, lookback, thr_opt, thr_inp, lineancy)
Calculate Combined Direction Strength Factor
Parameters:
body_prc (float) : Body SF as percentage of threshold
close_prc (float) : Close SF as percentage of threshold
breakout_prc (float) : Breakout SF as percentage of threshold
lookback (int) : Lookback period for average
thr_opt (string) : Threshold option
thr_inp (float) : User threshold input
lineancy (float) : Lineancy adjustment
Returns:
get_all_strength_factors(lookback, lineancy, dist_thr_opt, dist_thr_inp, body_thr_opt, body_thr_inp, close_thr_opt, close_thr_inp, breakout_thr_opt, breakout_thr_inp, bro_dir, is_inside_bar)
Get all strength factors at once (convenience function)
Parameters:
lookback (int) : Lookback period for averages
lineancy (float) : Lineancy adjustment percentage
dist_thr_opt (string) : Distance threshold option
dist_thr_inp (float) : Distance threshold input
body_thr_opt (string) : Body threshold option
body_thr_inp (float) : Body threshold input
close_thr_opt (string) : Close threshold option
close_thr_inp (float) : Close threshold input
breakout_thr_opt (string) : Breakout threshold option
breakout_thr_inp (float) : Breakout threshold input
bro_dir (int) : Breakout direction
is_inside_bar (bool) : Is inside bar flag
Returns: Map containing all strength factor results
Systemic Credit Market Pressure IndexSystemic Credit Market Pressure Index (SCMPI): A Composite Indicator for Credit Cycle Analysis
The Systemic Credit Market Pressure Index (SCMPI) represents a novel composite indicator designed to quantify systemic stress within credit markets through the integration of multiple macroeconomic variables. This indicator employs advanced statistical normalization techniques, adaptive threshold mechanisms, and intelligent visualization systems to provide real-time assessment of credit market conditions across expansion, neutral, and stress regimes. The methodology combines credit spread analysis, labor market indicators, consumer credit conditions, and household debt metrics into a unified framework for systemic risk assessment, featuring dynamic Bollinger Band-style thresholds and theme-adaptive visualization capabilities.
## 1. Introduction
Credit cycles represent fundamental drivers of economic fluctuations, with their dynamics significantly influencing financial stability and macroeconomic outcomes (Bernanke, Gertler & Gilchrist, 1999). The identification and measurement of credit market stress has become increasingly critical following the 2008 financial crisis, which highlighted the need for comprehensive early warning systems (Adrian & Brunnermeier, 2016). Traditional single-variable approaches often fail to capture the multidimensional nature of credit market dynamics, necessitating the development of composite indicators that integrate multiple information sources.
The SCMPI addresses this gap by constructing a weighted composite index that synthesizes four key dimensions of credit market conditions: corporate credit spreads, labor market stress, consumer credit accessibility, and household leverage ratios. This approach aligns with the theoretical framework established by Minsky (1986) regarding financial instability hypothesis and builds upon empirical work by Gilchrist & Zakrajšek (2012) on credit market sentiment.
## 2. Theoretical Framework
### 2.1 Credit Cycle Theory
The theoretical foundation of the SCMPI rests on the credit cycle literature, which posits that credit availability fluctuates in predictable patterns that amplify business cycle dynamics (Kiyotaki & Moore, 1997). During expansion phases, credit becomes increasingly available as risk perceptions decline and collateral values rise. Conversely, stress phases are characterized by credit contraction, elevated risk premiums, and deteriorating borrower conditions.
The indicator incorporates Kindleberger's (1978) framework of financial crises, which identifies key stages in credit cycles: displacement, boom, euphoria, profit-taking, and panic. By monitoring multiple variables simultaneously, the SCMPI aims to capture transitions between these phases before they become apparent in individual metrics.
### 2.2 Systemic Risk Measurement
Systemic risk, defined as the risk of collapse of an entire financial system or entire market (Kaufman & Scott, 2003), requires measurement approaches that capture interconnectedness and spillover effects. The SCMPI follows the methodology established by Bisias et al. (2012) in constructing composite measures that aggregate individual risk indicators into system-wide assessments.
The index employs the concept of "financial stress" as defined by Illing & Liu (2006), encompassing increased uncertainty about fundamental asset values, increased uncertainty about other investors' behavior, increased flight to quality, and increased flight to liquidity.
## 3. Methodology
### 3.1 Component Variables
The SCMPI integrates four primary components, each representing distinct aspects of credit market conditions:
#### 3.1.1 Credit Spreads (BAA-10Y Treasury)
Corporate credit spreads serve as the primary indicator of credit market stress, reflecting risk premiums demanded by investors for corporate debt relative to risk-free government securities (Gilchrist & Zakrajšek, 2012). The BAA-10Y spread specifically captures investment-grade corporate credit conditions, providing insight into broad credit market sentiment.
#### 3.1.2 Unemployment Rate
Labor market conditions directly influence credit quality through their impact on borrower repayment capacity (Bernanke & Gertler, 1995). Rising unemployment typically precedes credit deterioration, making it a valuable leading indicator for credit stress.
#### 3.1.3 Consumer Credit Rates
Consumer credit accessibility reflects the transmission of monetary policy and credit market conditions to household borrowing (Mishkin, 1995). Elevated consumer credit rates indicate tightening credit conditions and reduced credit availability for households.
#### 3.1.4 Household Debt Service Ratio
Household leverage ratios capture the debt burden relative to income, providing insight into household financial stress and potential credit losses (Mian & Sufi, 2014). High debt service ratios indicate vulnerable household sectors that may contribute to credit market instability.
### 3.2 Statistical Methodology
#### 3.2.1 Z-Score Normalization
Each component variable undergoes robust z-score normalization to ensure comparability across different scales and units:
Z_i,t = (X_i,t - μ_i) / σ_i
Where X_i,t represents the value of variable i at time t, μ_i is the historical mean, and σ_i is the historical standard deviation. The normalization period employs a rolling 252-day window to capture annual cyclical patterns while maintaining sensitivity to regime changes.
#### 3.2.2 Adaptive Smoothing
To reduce noise while preserving signal quality, the indicator employs exponential moving average (EMA) smoothing with adaptive parameters:
EMA_t = α × Z_t + (1-α) × EMA_{t-1}
Where α = 2/(n+1) and n represents the smoothing period (default: 63 days).
#### 3.2.3 Weighted Aggregation
The composite index combines normalized components using theoretically motivated weights:
SCMPI_t = w_1×Z_spread,t + w_2×Z_unemployment,t + w_3×Z_consumer,t + w_4×Z_debt,t
Default weights reflect the relative importance of each component based on empirical literature: credit spreads (35%), unemployment (25%), consumer credit (25%), and household debt (15%).
### 3.3 Dynamic Threshold Mechanism
Unlike static threshold approaches, the SCMPI employs adaptive Bollinger Band-style thresholds that automatically adjust to changing market volatility and conditions (Bollinger, 2001):
Expansion Threshold = μ_SCMPI - k × σ_SCMPI
Stress Threshold = μ_SCMPI + k × σ_SCMPI
Neutral Line = μ_SCMPI
Where μ_SCMPI and σ_SCMPI represent the rolling mean and standard deviation of the composite index calculated over a configurable period (default: 126 days), and k is the threshold multiplier (default: 1.0). This approach ensures that thresholds remain relevant across different market regimes and volatility environments, providing more robust regime classification than fixed thresholds.
### 3.4 Visualization and User Interface
The SCMPI incorporates advanced visualization capabilities designed for professional trading environments:
#### 3.4.1 Adaptive Theme System
The indicator features an intelligent dual-theme system that automatically optimizes colors and transparency levels for both dark and bright chart backgrounds. This ensures optimal readability across different trading platforms and user preferences.
#### 3.4.2 Customizable Visual Elements
Users can customize all visual aspects including:
- Color Schemes: Automatic theme adaptation with optional custom color overrides
- Line Styles: Configurable widths for main index, trend lines, and threshold boundaries
- Transparency Optimization: Automatic adjustment based on selected theme for optimal contrast
- Dynamic Zones: Color-coded regime areas with adaptive transparency
#### 3.4.3 Professional Data Table
A comprehensive 13-row data table provides real-time component analysis including:
- Composite index value and regime classification
- Individual component z-scores with color-coded stress indicators
- Trend direction and signal strength assessment
- Dynamic threshold status and volatility metrics
- Component weight distribution for transparency
## 4. Regime Classification
The SCMPI classifies credit market conditions into three distinct regimes:
### 4.1 Expansion Regime (SCMPI < Expansion Threshold)
Characterized by favorable credit conditions, low risk premiums, and accommodative lending standards. This regime typically corresponds to economic expansion phases with low default rates and increasing credit availability.
### 4.2 Neutral Regime (Expansion Threshold ≤ SCMPI ≤ Stress Threshold)
Represents balanced credit market conditions with moderate risk premiums and stable lending standards. This regime indicates neither significant stress nor excessive exuberance in credit markets.
### 4.3 Stress Regime (SCMPI > Stress Threshold)
Indicates elevated credit market stress with high risk premiums, tightening lending standards, and deteriorating borrower conditions. This regime often precedes or coincides with economic contractions and financial market volatility.
## 5. Technical Implementation and Features
### 5.1 Alert System
The SCMPI includes a comprehensive alert framework with seven distinct conditions:
- Regime Transitions: Expansion, Neutral, and Stress phase entries
- Extreme Conditions: Values exceeding ±2.0 standard deviations
- Trend Reversals: Directional changes in the underlying trend component
### 5.2 Performance Optimization
The indicator employs several optimization techniques:
- Efficient Calculations: Pre-computed statistical measures to minimize computational overhead
- Memory Management: Optimized variable declarations for real-time performance
- Error Handling: Robust data validation and fallback mechanisms for missing data
## 6. Empirical Validation
### 6.1 Historical Performance
Backtesting analysis demonstrates the SCMPI's ability to identify major credit stress episodes, including:
- The 2008 Financial Crisis
- The 2020 COVID-19 pandemic market disruption
- Various regional banking crises
- European sovereign debt crisis (2010-2012)
### 6.2 Leading Indicator Properties
The composite nature and dynamic threshold system of the SCMPI provides enhanced leading indicator properties, typically signaling regime changes 1-3 months before they become apparent in individual components or market indices. The adaptive threshold mechanism reduces false signals during high-volatility periods while maintaining sensitivity during regime transitions.
## 7. Applications and Limitations
### 7.1 Applications
- Risk Management: Portfolio managers can use SCMPI signals to adjust credit exposure and risk positioning
- Academic Research: Researchers can employ the index for credit cycle analysis and systemic risk studies
- Trading Systems: The comprehensive alert system enables automated trading strategy implementation
- Financial Education: The transparent methodology and visual design facilitate understanding of credit market dynamics
### 7.2 Limitations
- Data Dependency: The indicator relies on timely and accurate macroeconomic data from FRED sources
- Regime Persistence: Dynamic thresholds may exhibit brief lag during extremely rapid regime transitions
- Model Risk: Component weights and parameters require periodic recalibration based on evolving market structures
- Computational Requirements: Real-time calculations may require adequate processing power for optimal performance
## References
Adrian, T. & Brunnermeier, M.K. (2016). CoVaR. *American Economic Review*, 106(7), 1705-1741.
Bernanke, B. & Gertler, M. (1995). Inside the black box: the credit channel of monetary policy transmission. *Journal of Economic Perspectives*, 9(4), 27-48.
Bernanke, B., Gertler, M. & Gilchrist, S. (1999). The financial accelerator in a quantitative business cycle framework. *Handbook of Macroeconomics*, 1, 1341-1393.
Bisias, D., Flood, M., Lo, A.W. & Valavanis, S. (2012). A survey of systemic risk analytics. *Annual Review of Financial Economics*, 4(1), 255-296.
Bollinger, J. (2001). *Bollinger on Bollinger Bands*. McGraw-Hill Education.
Gilchrist, S. & Zakrajšek, E. (2012). Credit spreads and business cycle fluctuations. *American Economic Review*, 102(4), 1692-1720.
Illing, M. & Liu, Y. (2006). Measuring financial stress in a developed country: An application to Canada. *Journal of Financial Stability*, 2(3), 243-265.
Kaufman, G.G. & Scott, K.E. (2003). What is systemic risk, and do bank regulators retard or contribute to it? *The Independent Review*, 7(3), 371-391.
Kindleberger, C.P. (1978). *Manias, Panics and Crashes: A History of Financial Crises*. Basic Books.
Kiyotaki, N. & Moore, J. (1997). Credit cycles. *Journal of Political Economy*, 105(2), 211-248.
Mian, A. & Sufi, A. (2014). What explains the 2007–2009 drop in employment? *Econometrica*, 82(6), 2197-2223.
Minsky, H.P. (1986). *Stabilizing an Unstable Economy*. Yale University Press.
Mishkin, F.S. (1995). Symposium on the monetary transmission mechanism. *Journal of Economic Perspectives*, 9(4), 3-10.
DirectionCalculationsLibrary "DirectionCalculations"
Direction calculation algorithms for body, bar, and breakout directions
get_body_direction()
Calculate body direction based on open vs close
Returns: Body direction: 1 (bullish), -1 (bearish), 0 (doji)
get_bar_direction()
Calculate bar direction based on close position relative to hl2
Returns: Bar direction: 1 (upper half), -1 (lower half), 0 (middle)
get_breakout_direction()
Calculate breakout direction with outside/inside bar logic
Returns:
get_combined_direction(bod_dir, bar_dir, bro_dir, bro_ob_dir)
Calculate combined direction from body and bar directions
Parameters:
bod_dir (int) : Body direction
bar_dir (int) : Bar direction
bro_dir (int) : Breakout direction
bro_ob_dir (int) : Outside bar direction
Returns: Combined direction
is_consecutive_direction(current_dir, previous_dir)
Check if directions are consecutive (no reversal)
Parameters:
current_dir (int) : Current direction
previous_dir (int) : Previous direction
Returns: True if consecutive (no reversal from +1 to -1 or -1 to +1)
get_all_directions()
Get all direction calculations at once
Returns:
get_breakout_distances()
Get distance calculations for breakout analysis
Returns: High-to-high and low-to-low distances
get_bar_patterns()
Check for specific bar patterns
Returns:
Bias Ratio-ETH-3H @CTTC5108Most of the code of this strategy should be my own original.
This Ethereum 3-hour time cycle strategy can be traced back to February 24, 2023. Although the profit and winning rate are not high, it is still relatively stable.
This strategy uses the deviation rate to enter the market. Invest 10% of the principal each time.
The limit start time adopts a rolling design (should be original).
Real-time retracement and maximum retracement are accurately calculated (should be original).
Adopt segmented stop profit (optional) design.
Open source for learning and other use.
ES OHLC BASED ON 9:301. RTH Price Levels
YC (Yesterday's Close): Previous day's RTH closing price at 4:00 PM ET
0DTE-O (Today's Open): Current day's RTH opening price at 9:30 AM ET
T-E-M (Today's Europe-Asia Midpoint): Midpoint of overnight session high/low
T-E-R (Today's Europe-Asia Resistance): Overnight session high
T-E-S (Today's Europe-Asia Support): Overnight session low
Y-T-M (Yesterday-Today Midpoint): Midpoint between YC and 0DTE-O
2. Previous Bar Percentage Levels
Displays 50% retracement level for all bars
Shows 70% level for bullish bars (close > open)
Shows 30% level for bearish bars (close < open)
Lines automatically update with each new bar
3. Custom Support/Resistance Lines
Up to 4 customizable horizontal levels (2 resistance, 2 support)
Useful for marking key psychological levels or pivot points
4. VIX-Based Options Strategy Suggestions
Real-time VIX value display
Time Zone Handling
The indicator is configured for Central Time (CT) as Pine Script's default:
RTH Open: 8:30 AM CT (9:30 AM ET)
RTH Close: 3:00 PM CT (4:00 PM ET)
Overnight session: 7:00 PM CT to 8:30 AM CT next day
Usage Notes
Chart Requirement: This indicator only works on 5-minute timeframe charts
Auto-refresh: All lines and labels automatically refresh at each new trading day's RTH open
24-hour Market: Designed for ES futures which trade nearly 24 hours
Visual Clarity: Different line styles and colors for easy identification
Ideal For
Day traders focusing on ES futures
0DTE options traders needing key reference levels
Traders using overnight gaps and previous day's levels
Those incorporating VIX-based strategies in their trading
WeightedVolumeUtilsLibrary "WeightedVolumeUtils"
fun(x)
Returns the input value (placeholder function).
Parameters:
x (float) : A float value.
Returns: The same float value passed as input.
weightedBSEVolume()
Calculates the weighted volume for BSE index based on top constituent stocks.
Returns: Weighted volume value based on fixed weights for BSE SENSEX stocks.
getAdjustedVolume()
Returns the adjusted volume for SENSEX or regular volume otherwise.
Returns: Weighted BSE volume if current symbol is SENSEX, else raw volume.
Directionality OscillatorDirectionality Oscillator is a simple momentum tool that measures net price displacement against total price activity over a chosen look-back period. It takes today’s closing price minus the close from “len” bars ago and divides that by the sum of all absolute bar-to-bar moves across the same span. The result is a value between –1 and +1, where positive values show that upward moves dominated and negative values show that downward moves prevailed.
To smooth out short-term noise, the indicator applies a five-bar simple moving average to the normalized value. A color gradient—from red at –1, through gray at 0, to green at +1—paints the line, making it easy to see whether bearish or bullish pressure is strongest. Two horizontal lines at the user-defined threshold and its negative mark zones of extreme directional strength. Readings above the positive threshold signal strong bullish momentum, and readings below the negative threshold signal strong bearish momentum.
Traders can watch for crossings above or below these threshold lines as trend confirmations or potential reversal warnings. A cross of the zero line indicates a shift in net directional control and can serve as an early trend-change alert when supported by price action or volume. Because it filters out sideways noise by normalizing against total activity, it highlights sustained directional thrust more clearly than a raw price-change measure.
Eigenvector Centrality Drift (ECD) - Market State Network What is Eigenvector Centrality Drift (ECD)?
Eigenvector Centrality Drift (ECD) is a groundbreaking indicator that applies concepts from network science to financial markets. Instead of viewing price as a simple series, ECD models the market as a dynamic network of “micro-states”—distinct combinations of price, volatility, and volume. By tracking how the influence of these states changes over time, ECD helps you spot regime shifts and transitions in market character before they become obvious in price.
This is not another moving average or momentum oscillator. ECD is inspired by eigenvector centrality—a measure of influence in network theory—and adapts it to the world of price action, volatility, and volume. It’s about understanding which market states are “in control” and when that control is about to change.
Theoretical Foundation
Network Science: In complex systems, nodes (states) and edges (transitions) form a network. Eigenvector centrality measures how influential a node is, not just by its direct connections, but by the influence of the nodes it connects to.
Market Micro-States: Each bar is classified into a “state” based on price change, volatility, and volume. The market transitions between these states, forming a network of possible regimes.
Centrality Drift: By tracking the centrality (influence) of the current state, and how it changes (drifts) over time, ECD highlights when the market’s “center of gravity” is shifting—often a precursor to major moves or regime changes.
How ECD Works
State Classification: Each bar is assigned to one of N market micro-states, based on a weighted combination of normalized price change, volatility, and volume.
Transition Matrix: Over a rolling window, ECD tracks how often the market transitions from each state to every other state, forming a transition probability matrix.
Centrality Calculation: Using a simplified eigenvector approach, ECD calculates the “influence” score for each state, reflecting how central it is to the network of recent market behavior.
Centrality Drift: The indicator tracks the Z-score of the change in centrality for the current state. Rapid increases or decreases, or a shift in the dominant state, signal a potential regime shift.
Dominant State: ECD also highlights which state currently has the highest influence, providing insight into the prevailing market character.
Inputs:
🌐 Market State Configuration
Number of Market States (n_states, default 6): Number of distinct micro-states to track.
3–4: Simple (Up/Down/Sideways)
5–6: Balanced (recommended)
7–9: Complex, more nuanced
Price Change Weight (price_weight, default 0.4):
How much price movement defines a state. Higher = more directional.
Volatility Weight (vol_weight, default 0.3):
How much volatility defines a state. Higher = more regime focus.
Volume Weight (volume_weight, default 0.3):
How much volume defines a state. Higher = more participation focus.
🔗 Network Analysis
Transition Matrix Window (transition_window, default 50): Lookback for building the state transition matrix.
Shorter: Adapts quickly
Longer: More stable
Influence Decay Factor (influence_decay, default 0.85): How much influence propagates through the network.
Higher: Distant transitions matter more
Lower: Only immediate transitions matter
Drift Detection Sensitivity (drift_sensitivity, default 1.5): Z-score threshold for significant centrality drift.
Lower: More signals
Higher: Only major shifts
🎨 Visualization
Show Network Visualization (show_network, default true): Background color and effects based on network structure.
Show Centrality Score (show_centrality, default true): Plots the current state’s centrality measure.
Show Drift Indicator (show_drift, default true): Plots the centrality drift Z-score.
Show State Map (show_state_map, default true): Dashboard showing all state centralities and which is dominant.
Color Scheme (color_scheme, default "Quantum"):
“Quantum”: Cyan/Magenta
“Neural”: Green/Blue
“Plasma”: Yellow/Pink
“Matrix”: Green/Black
Color Schemes
Dynamic gradients reflect the current state’s centrality and drift, using your chosen color palette.
Background network effect: The more central the current state, the more intense the background.
Centrality and drift lines: Color-coded for clarity and regime shift detection.
Visual Logic
Centrality Score Line: Plots the influence of the current state, with glow for emphasis.
Drift Indicator: Histogram of centrality drift Z-score, green for positive, red for negative.
Threshold Lines: Dotted lines mark the drift sensitivity threshold for regime shift alerts.
State Map Dashboard: Top-right panel shows all state centralities, highlights the current and dominant state, and visualizes influence with bars.
Information Panel: Bottom-left panel summarizes current state, centrality, dominant state, drift Z-score, and regime shift status.
How to Use ECD
Centrality Score: High = current state is highly influential; low = state is peripheral.
Drift Z-Score:
Large positive/negative = rapid change in influence, regime shift likely.
Near zero = stable network, no major shift.
Dominant State: The state with the highest centrality is “in control” of the market’s transitions.
State Map: Use to see which states are rising or falling in influence.
Tips:
Use fewer states for simple markets, more for nuanced analysis.
Watch for drift Z-score crossing the threshold—these are your regime shift signals.
Combine with your own system for confirmation.
Alerts:
ECD Regime Shift: Significant centrality drift detected—potential regime change.
ECD State Change: Market state transition occurred.
ECD Dominance Shift: Dominant market state has changed.
Originality & Usefulness
ECD is not a mashup or rehash of standard indicators. It is a novel application of network science and eigenvector centrality to market microstructure, providing a new lens for understanding regime shifts and market transitions. The state network, centrality drift, and dashboard are unique to this script. ECD is designed for anticipation, not confirmation—helping you see the market’s “center of gravity” shift before price action makes it obvious.
Chart Info
Script Name: Eigenvector Centrality Drift (ECD) – Market State Network
Recommended Use: Any asset, any timeframe. Tune parameters to your style.
Disclaimer
This script is for research and educational purposes only. It does not provide financial advice or direct buy/sell signals. Always use proper risk management and combine with your own strategy. Past performance is not indicative of future results.
See the market as a network. Anticipate the shift in influence.
— Dskyz , for DAFE Trading Systems
H4 Swing Grade Checklist English V.1✅ H4 Swing Grade Checklist – Auto Grading for Smart Money Setups
This script helps manual traders assess the quality of a Smart Money swing trade setup by checking 7 key criteria. The system assigns a grade (A+, A, A−, or B) based on how many and which checklist items are met.
📋 Checklist Items (7 total):
✅ Sweep occurs within 4 candles
✅ MSS (strong break candle)
✅ Entry is placed outside the wick of the sweep
✅ FVG is fresh (not previously used)
✅ FVG overlaps Fibonacci 0.705 level
✅ FVG lies within Premium or Discount zone
✅ Entry is placed at 0.705 Fibonacci retracement
🏅 Grading Criteria:
A+ → All 7 checklist items are satisfied
A → Only missing #5 (FVG Overlap with 0.705)
A− → Only missing #4 (FVG Fresh)
B → Only missing #2 (MSS – clear break of structure)
– → Any other combinations / fewer than 6 conditions met
⚙️ Features:
Toggle visibility with one click
Fixed display in top-right or bottom-right of the chart
Color-coded grading logic (Green, Yellow, Orange, Blue)
Clear checklist feedback for trade journaling or evaluation
🚀 Ideal For:
ICT / Smart Money traders
Prop firm evaluations
Swing trade quality control
Information Asymmetry Gradient (IAG) What is the Information Asymmetry Gradient (IAG)?
The Information Asymmetry Gradient (IAG) is a unique market regime and imbalance detector that quantifies the subtle, directional “information flow” in price and volume. Inspired by information theory and market microstructure, IAG is designed to help traders spot the early buildup of conviction or surprise—the kind of hidden imbalance that often precedes major price moves.
Unlike traditional volume or momentum indicators, IAG focuses on the efficiency and directionality of information transfer: how much “informational energy” is being revealed by up-moves versus down-moves, normalized by price movement. It’s not just about net flow, but about the quality and asymmetry of that flow.
Theoretical Foundation
Information Asymmetry: Markets move when new information is revealed. If one side (buyers or sellers) is consistently more “informationally efficient” per unit of price change, an imbalance is building—even if price hasn’t moved much yet.
Gradient: By tracking the rate of change (gradient) between fast and slow information flows, IAG highlights when a subtle imbalance is accelerating.
Volatility of Asymmetry: Sudden spikes in the volatility of information asymmetry often signal regime uncertainty or the approach of a “surprise” move.
How IAG Works
Directional Information Content: For each bar, IAG estimates the “information per unit of price change” for both up-moves and down-moves, using volume and price action.
Asymmetry Calculation: Computes the difference (or ratio) between up and down information content, revealing directional bias.
Gradient Detection: Calculates both a fast and slow EMA of the asymmetry, then measures their difference (the “gradient”), normalized as a Z-score.
Volatility of Asymmetry: Tracks the standard deviation of asymmetry over a rolling window, with Z-score normalization to spot “information shocks.”
Flow Strength: Quantifies the conviction of the current information flow on a 0–100 scale.
Regime Detection: Flags “extreme” asymmetry, “building” flow, and “high volatility” states.
Inputs:
🌌 Core Asymmetry Parameters
Fast Information Period (short_len, default 8): EMA period for detecting immediate information flow changes.
5–8: Scalping (1–5min)
8–12: Day trading (15min–1hr)
12–20: Swing trading (4hr+)
Slow Information Period (long_len, default 34): EMA period for baseline information context. Should be 3–5x fast period.
Default (34): Fibonacci number, stable for most assets.
Gradient Smoothing (gradient_smooth, default 3): Smooths the gradient calculation.
1–2: Raw, responsive
3–5: Balanced
6–10: Very smooth
📊 Asymmetry Method
Calculation Mode (calc_mode, default "Weighted"):
“Simple”: Basic volume split by direction
“Weighted”: Volume × price movement (default, most robust)
“Logarithmic”: Log-scaled for large moves
Use Ratio (show_ratio, default false):
“Difference”: UpInfo – DownInfo (additive)
“Ratio”: UpInfo / DownInfo (multiplicative, better for comparing volatility regimes)
🌊 Volatility Analysis
Volatility Window (stdev_len, default 21): Lookback for measuring asymmetry volatility.
Volatility Alert Level (vol_threshold, default 1.5): Z-score threshold for volatility alerts.
🎨 Visual Settings
Color Theme (color_theme, default "Starry Night"):
Van Gogh-inspired palettes:
“Starry Night”: Deep blues and yellows
“Sunflowers”: Warm yellows and browns
“Café Terrace”: Night blues and warm lights
“Wheat Field”: Golden and sky blue
Show Swirl Effects (show_swirls, default true): Adds swirling background to visualize information turbulence.
Show Signal Stars (show_stars, default true): Star markers at significant asymmetry points.
Show Info Dashboard (show_dashboard, default true): Top-right panel with current metrics and market state.
Show Flow Visualization (show_flow, default true): Main gradient line with artistic effects.
Color Schemes
Dynamic color gradients adapt to both the direction and intensity of the information gradient, using Van Gogh-inspired palettes for visual clarity and artistic flair.
Glow and aura effects: The main line is layered with glows for depth and to highlight strong signals.
Swirl background: Visualizes the “turbulence” of information flow, darker and more intense as flow strength and volatility rise.
Visual Logic
Main Gradient Line: Plots the normalized information gradient (Z-score), color-coded by direction and intensity.
Glow/Aura: Multiple layers for visual depth and to highlight strong signals.
Threshold Zones: Dotted lines and filled areas mark “Building” and “Extreme” asymmetry zones.
Volatility Ribbon: Area plot of volatility Z-score, highlighting information shocks.
Signal Stars: Circular markers at each “Extreme” event, color-coded for bullish/bearish; cross markers for volatility spikes.
Dashboard: Top-right panel shows current status (Extreme, Building, High Volatility, Balanced), gradient value, flow strength, information balance, and volatility status.
Trading Guide: Bottom-left panel explains all states and how to interpret them.
How to Use IAG
🌟 EXTREME: Major information imbalance—potential for explosive move or reversal.
🌙 BUILDING: Asymmetry is forming—watch for a breakout or trend acceleration.
🌪️ HIGH VOLATILITY: Information flow is unstable—expect regime uncertainty or “surprise” moves.
☁️ BALANCED: No clear bias—market is in equilibrium.
Positive Gradient: Bullish information flow (buyers have the edge).
Negative Gradient: Bearish information flow (sellers have the edge).
Flow >66%: Strong conviction—crowd is acting in unison.
Volatility Spike: Regime uncertainty—be alert for sudden moves.
Tips:
- Use lower periods for scalping, higher for swing trading.
- “Weighted” mode is most robust for most assets.
- Combine with price action or your own system for confirmation.
- Works on all assets and timeframes—tune to your style.
Alerts
IAG Extreme Asymmetry: Extreme information asymmetry detected.
IAG Building Flow: Information flow building.
IAG High Volatility: Information volatility spike.
IAG Bullish/Bearish Extreme: Directional extreme detected.
Originality & Usefulness
IAG is not a mashup of existing indicators. It is a novel approach to quantifying the “surprise” or “conviction” element in market moves, focusing on the efficiency and directionality of information transfer per unit of price change. The multi-layered color logic, artistic visual effects, and regime dashboard are unique to this script. IAG is designed for anticipation, not confirmation—helping you see subtle imbalances before they become obvious in price.
Chart Info
Script Name: Information Asymmetry Gradient (IAG) – Starry Night
Recommended Use: Any asset, any timeframe. Tune parameters to your style.
Disclaimer
This script is for research and educational purposes only. It does not provide financial advice or direct buy/sell signals. Always use proper risk management and combine with your own strategy. Past performance is not indicative of future results.
Trade with insight. Trade with anticipation.
— Dskyz , for DAFE Trading Systems
Reflexivity Resonance Factor (RRF) - Quantum Flow Reflexivity Resonance Factor (RRF) – Quantum Flow
See the Feedback Loops. Anticipate the Regime Shift.
What is the RRF – Quantum Flow?
The Reflexivity Resonance Factor (RRF) – Quantum Flow is a next-generation market regime detector and energy oscillator, inspired by George Soros’ theory of reflexivity and modern complexity science. It is designed for traders who want to visualize the hidden feedback loops between market perception and participation, and to anticipate explosive regime shifts before they unfold.
Unlike traditional oscillators, RRF does not just measure price momentum or volatility. Instead, it models the dynamic feedback between how the market perceives itself (perception) and how it acts on that perception (participation). When these feedback loops synchronize, they create “resonance” – a state of amplified reflexivity that often precedes major market moves.
Theoretical Foundation
Reflexivity: Markets are not just driven by external information, but by participants’ perceptions and their actions, which in turn influence future perceptions. This feedback loop can create self-reinforcing trends or sudden reversals.
Resonance: When perception and participation align and reinforce each other, the market enters a high-energy, reflexive state. These “resonance” events often mark the start of new trends or the climax of existing ones.
Energy Field: The indicator quantifies the “energy” of the market’s reflexivity, allowing you to see when the crowd is about to act in unison.
How RRF – Quantum Flow Works
Perception Proxy: Measures the rate of change in price (ROC) over a configurable period, then smooths it with an EMA. This models how quickly the market’s collective perception is shifting.
Participation Proxy: Uses a fast/slow ATR ratio to gauge the intensity of market participation (volatility expansion/contraction).
Reflexivity Core: Multiplies perception and participation to model the feedback loop.
Resonance Detection: Applies Z-score normalization to the absolute value of reflexivity, highlighting when current feedback is unusually strong compared to recent history.
Energy Calculation: Scales resonance to a 0–100 “energy” value, visualized as a dynamic background.
Regime Strength: Tracks the percentage of bars in a lookback window where resonance exceeded the threshold, quantifying the persistence of reflexive regimes.
Inputs:
🧬 Core Parameters
Perception Period (pp_roc_len, default 14): Lookback for price ROC.
Lower (5–10): More sensitive, for scalping (1–5min).
Default (14): Balanced, for 15min–1hr.
Higher (20–30): Smoother, for 4hr–daily.
Perception Smooth (pp_smooth_len, default 7): EMA smoothing for perception.
Lower (3–5): Faster, more detail.
Default (7): Balanced.
Higher (10–15): Smoother, less noise.
Participation Fast (prp_fast_len, default 7): Fast ATR for immediate volatility.
5–7: Scalping.
7–10: Day trading.
10–14: Swing trading.
Participation Slow (prp_slow_len, default 21): Slow ATR for baseline volatility.
Should be 2–4x fast ATR.
Default (21): Works with fast=7.
⚡ Signal Configuration
Resonance Window (res_z_window, default 50): Z-score lookback for resonance normalization.
20–30: More reactive.
50: Medium-term.
100+: Very stable.
Primary Threshold (rrf_threshold, default 1.5): Z-score level for “Active” resonance.
1.0–1.5: More signals.
1.5: Balanced.
2.0+: Only strong signals.
Extreme Threshold (rrf_extreme, default 2.5): Z-score for “Extreme” resonance.
2.5: Major regime shifts.
3.0+: Only the most extreme.
Regime Window (regime_window, default 100): Lookback for regime strength (% of bars with resonance spikes).
Higher: More context, slower.
Lower: Adapts quickly.
🎨 Visual Settings
Show Resonance Flow (show_flow, default true): Plots the main resonance line with glow effects.
Show Signal Particles (show_particles, default true): Circular markers at active/extreme resonance points.
Show Energy Field (show_energy, default true): Background color based on resonance energy.
Show Info Dashboard (show_dashboard, default true): Status panel with resonance metrics.
Show Trading Guide (show_guide, default true): On-chart quick reference for interpreting signals.
Color Mode (color_mode, default "Spectrum"): Visual theme for all elements.
“Spectrum”: Cyan→Magenta (high contrast)
“Heat”: Yellow→Red (heat map)
“Ocean”: Blue gradients (easy on eyes)
“Plasma”: Orange→Purple (vibrant)
Color Schemes
Dynamic color gradients are used for all plots and backgrounds, adapting to both resonance intensity and direction:
Spectrum: Cyan/Magenta for bullish/bearish resonance.
Heat: Yellow/Red for bullish, Blue/Purple for bearish.
Ocean: Blue gradients for both directions.
Plasma: Orange/Purple for high-energy states.
Glow and aura effects: The resonance line is layered with multiple glows for depth and signal strength.
Background energy field: Darker = higher energy = stronger reflexivity.
Visual Logic
Main Resonance Line: Shows the smoothed resonance value, color-coded by direction and intensity.
Glow/Aura: Multiple layers for visual depth and to highlight strong signals.
Threshold Zones: Dotted lines and filled areas mark “Active” and “Extreme” resonance zones.
Signal Particles: Circular markers at each “Active” (primary threshold) and “Extreme” (extreme threshold) event.
Dashboard: Top-right panel shows current status (Dormant, Building, Active, Extreme), resonance value, energy %, and regime strength.
Trading Guide: Bottom-right panel explains all states and how to interpret them.
How to Use RRF – Quantum Flow
Dormant (💤): Market is in equilibrium. Wait for resonance to build.
Building (🌊): Resonance is rising but below threshold. Prepare for a move.
Active (🔥): Resonance exceeds primary threshold. Reflexivity is significant—consider entries or exits.
Extreme (⚡): Resonance exceeds extreme threshold. Major regime shift likely—watch for trend acceleration or reversal.
Energy >70%: High conviction, crowd is acting in unison.
Above 0: Bullish reflexivity (positive feedback).
Below 0: Bearish reflexivity (negative feedback).
Regime Strength: % of bars in “Active” state—higher = more persistent regime.
Tips:
- Use lower lookbacks for scalping, higher for swing trading.
- Combine with price action or your own system for confirmation.
- Works on all assets and timeframes—tune to your style.
Alerts
RRF Activation: Resonance crosses above primary threshold.
RRF Extreme: Resonance crosses above extreme threshold.
RRF Deactivation: Resonance falls below primary threshold.
Originality & Usefulness
RRF – Quantum Flow is not a mashup of existing indicators. It is a novel oscillator that models the feedback loop between perception and participation, then quantifies and visualizes the resulting resonance. The multi-layered color logic, energy field, and regime strength dashboard are unique to this script. It is designed for anticipation, not confirmation—helping you see regime shifts before they are obvious in price.
Chart Info
Script Name: Reflexivity Resonance Factor (RRF) – Quantum Flow
Recommended Use: Any asset, any timeframe. Tune parameters to your style.
Disclaimer
This script is for research and educational purposes only. It does not provide financial advice or direct buy/sell signals. Always use proper risk management and combine with your own strategy. Past performance is not indicative of future results.
Trade with insight. Trade with anticipation.
— Dskyz , for DAFE Trading Systems
Tangent Extrapolation ForecastTangent Extrapolation Forecast
This indicator visually projects price direction by drawing a smoothed sequence of tangent lines based on recent price movements. For each bar in a user-defined lookback window, it calculates the slope over a smoothing period and extends the projected price forward. The resulting polyline forecast connect the endpoints of the extrapolations, and is color-coded to reflect directional changes: green for upward moves, red for downward, and gray for flat segments. This tool can assist traders in visualizing short-term momentum and potential trend continuity without introducing artificial future gaps.
Inputs:
Bars to Use: Number of historical bars used in the forecast.
Slope Smoothing Window: The number of bars used to calculate slope for projection.
Source: Price input for calculations (default is close).
This indicator does not generate buy/sell signals. It is intended as a visual aid to support discretionary analysis.
Inside 4+ Candles Box (Entry + Target + SMA Stop Logic)🔍 What This Script Does
This indicator detects price compression areas using 4 or more consecutive inside candles, then draws a breakout box to visually highlight the range.
Once price closes above the box, a long entry marker is plotted, along with:
🎯 Target line at 1x box size above the breakout.
❌ Stop-loss at the box low or at a dynamic SMA-based level if the box is too large.
🧠 Why It’s Unique
This script combines inside bar compression, breakout logic, risk control, and visual clarity — all in one tool.
It also cancels the setup entirely if price closes below the box low before breakout, avoiding late or false entries.
⚙️ Customizable Settings
Minimum inside candles (default = 4)
SMA length (used as stop if box is large)
Box size % threshold to activate smart stop
Entry, Target, and Stop marker colors
📌 Notes
For long setups only (no short signals).
Use on any asset or timeframe (ideal on 4H/1D).
This is not financial advice. Use with proper risk management.
Backtest thoroughly before live use.
Built with ❤️ by using Pine Script v6.
🇸🇦 وصف مختصر باللغة العربية:
هذا المؤشر يكتشف مناطق تماسك السعر من خلال 4 شموع داخلية أو أكثر، ثم يرسم مربعًا يحدد منطقة الاختراق المحتملة.
عند الإغلاق أعلى المربع، يتم عرض إشارة دخول وسطر هدف بنسبة 100% من حجم المربع.
كما يتم احتساب وقف الخسارة تلقائيًا إما عند قاع المربع أو عند متوسط متحرك ذكي (SMA) إذا كان حجم المربع كبيرًا.
الميزة الإضافية: إذا تم كسر قاع المربع قبل الاختراق، يتم إلغاء الصفقة تلقائيًا لتجنب الدخول المتأخر.
🧪 للاستفادة التعليمية والتحليل فقط. لا يُعتبر توصية مالية.
Range Filter Strategy with ATR TP/SLHow This Strategy Works:
Range Filter:
Calculates a smoothed average (SMA) of price
Creates upper and lower bands based on standard deviation
When price crosses above upper band, it signals a potential uptrend
When price crosses below lower band, it signals a potential downtrend
ATR-Based Risk Management:
Uses Average True Range (ATR) to set dynamic take profit and stop loss levels
Take profit is set at entry price + (ATR × multiplier) for long positions
Stop loss is set at entry price - (ATR × multiplier) for long positions
The opposite applies for short positions
Input Parameters:
Adjustable range filter length and multiplier
Customizable ATR length and TP/SL multipliers
All parameters can be optimized in TradingView's strategy tester
You can adjust the input parameters to fit your trading style and the specific market you're trading. The ATR-based exits help adapt to current market volatility.
Range Filter + ATR Strategy (Low Drawdown)Key Features for Low Drawdown:
Range Filter: Identifies trends while filtering out market noise
ATR-based Position Sizing: Adjusts position size based on volatility to risk a fixed percentage of capital
Trailing Stops: Uses ATR-based trailing stops to lock in profits and limit losses
Conservative Risk Parameters: Defaults to 1% risk per trade (adjustable)
Trend Confirmation: Requires two consecutive closes above/below the range filter
How to Use:
The strategy enters long when price is above the upper range filter for two consecutive bars
Enters short when price is below the lower range filter for two consecutive bars
Uses ATR to size positions appropriately for current volatility
Implements trailing stops based on ATR to protect profits
Optimization Tips:
Adjust the Range Filter period based on your timeframe
Modify the risk percentage (1% is conservative)
Tweak the ATR multiple for trailing stops (1.5 is moderate)
Consider adding a time-based exit if drawdown is still too high
Failure Swing IndicatorIdentify Failure Swing nice and easy
J. Welles Wilder Jr. describes Failure Swings as specific chart patterns used in conjunction with the Relative Strength Index (RSI) to identify potential reversals in price trends.
These patterns signal weakening momentum and can indicate a shift in market direction
Wilder emphasized that these patterns are more reliable when confirmed by price action or other technical indicators.
EMA Pullback Indicator with Volume Confirmationvolume analysis that follows momentum and only enters on pullbacks. Exit at end of next candle
Engulfing DetectorThis script detects classic candlestick reversal patterns known as Engulfing formations:
Bullish Engulfing: A green candle fully engulfs the previous red candle.
Bearish Engulfing: A red candle fully engulfs the previous green candle.
🔎 Features:
Works on any time frame or instrument.
Optional filter to ignore overly large or irregular candles.
Visual signals on the chart (BE/SE labels).
Built-in alerts for automation or notification.
✅ Recommended usage:
For intraday trading, this indicator performs best on the 5-minute chart of the Nasdaq (NQ) between 9:45 AM and 1:00 PM ET (15:45–19:00 CET).
💡 Suggested trading approach:
Optimized for scalping with short-term trades and small take-profits around +0.10%.
Math by Thomas Swing RangeMath by Thomas Swing Range is a simple yet powerful tool designed to visually highlight key swing levels in the market based on a user-defined lookback period. It identifies the highest high, lowest low, and calculates the midpoint between them — creating a clear range for swing trading strategies.
These levels can help traders:
Spot potential support and resistance zones
Analyze price rejection near range boundaries
Frame mean-reversion or breakout setups
The indicator continuously updates and extends these lines into the future, making it easier to plan and manage trades with visual clarity.
🛠️ How to Use
Add to Chart:
Apply the indicator on any timeframe and asset (works best on higher timeframes like 1H, 4H, or Daily).
Configure Parameters:
Lookback Period: Number of candles used to detect the highest high and lowest low. Default is 20.
Extend Lines by N Bars: Number of future bars the levels should be projected to the right.
Interpret Lines:
🔴 Red Line: Swing High (Resistance)
🟢 Green Line: Swing Low (Support)
🔵 Blue Line: Midpoint (Mean level — useful for equilibrium-based strategies)
Trade Ideas:
Bounce trades from swing high/low zones.
Breakout confirmation if price closes strongly outside the range.
Reversion trades if price moves toward the midpoint after extreme moves.