[COG]Adaptive Volatility Bands# Adaptive Volatility Bands (AVB) Indicator Guide for Traders
## Special Acknowledgment 🙌
This script is inspired by and builds upon the foundational work of **DonovanWall**, a respected contributor to the trading community. His innovative approach to adaptive indicators has been instrumental in developing this advanced trading tool.
## What is the Adaptive Volatility Bands Indicator?
The Adaptive Volatility Bands (AVB) is a sophisticated technical analysis tool designed to help traders understand market dynamics by creating dynamic, responsive price channels that adapt to changing market conditions. Unlike traditional static indicators, this script uses advanced mathematical techniques to create flexible bands that adjust to market volatility in real-time.
## Key Features and Inputs
### 1. Price and Filtering Options
- **Price Source**: Determines the base price used for calculations (default is HLC3 - Average of High, Low, and Close)
- **Filter Poles**: Controls the smoothness of the indicator (1-9 poles)
- Lower values: More responsive, more noise
- Higher values: Smoother, but slower to react
### 2. Volatility and Band Settings
- **Sample Length**: Determines how many bars are used to calculate volatility (default 144)
- **Volatility Multiplier**: Adjusts the width of the main bands (default 1.414)
- **Outer Band Multiplier**: Controls the width of the outer bands (default 2.5)
- **Inner Band Ratio**: Positions the inner bands between the center and outer bands (default 0.25)
### 3. Advanced Processing Options
- **Lag Reduction Mode**: Helps reduce indicator delay
- **Fast Response Mode**: Makes the indicator more responsive to recent price changes
### 4. Signal and Visualization Options
- **Show Entry Signals**: Displays buy and sell signals
- **Signal Display Style**: Choose between labels or shapes
- **Range Filter**: Adds an additional filter for signal validation
## How the Indicator Works
The Adaptive Volatility Bands create a dynamic price channel with three key components:
1. **Center Line**: Represents the core trend direction
2. **Inner Bands**: Closer to the center line
3. **Outer Bands**: Wider bands that show broader price potential
### Color Dynamics
- The indicator uses a smart color gradient system
- Colors change based on price position within the bands
- Helps visualize bullish (green/blue) and bearish (red) market conditions
## Trading Strategies for Beginners
### Basic Entry Signals
- **Buy Signal**:
- Price touches the center line from below
- Candle is bullish (closes higher than it opens)
- Price is above the center line
- Trend is upward
- **Sell Signal**:
- Price touches the center line from above
- Candle is bearish (closes lower than it opens)
- Price is below the center line
- Trend is downward
### Risk Management Tips
1. Use the bands to identify:
- Potential trend changes
- Volatility levels
- Support and resistance areas
2. Combine with other indicators for confirmation
3. Always use stop-loss orders
4. Adjust parameters to match your trading style and asset
## When to Use This Indicator
Best suited for:
- Trending markets
- Swing trading
- Identifying potential entry and exit points
- Understanding market volatility
### Recommended Markets
- Stocks
- Forex
- Cryptocurrencies
- Futures
## Customization
The script offers extensive customization:
- Adjust smoothness
- Change band multipliers
- Modify color schemes
- Enable/disable features like lag reduction
## Important Considerations for Beginners
🚨 **Disclaimer**:
- No indicator guarantees profits
- Always practice with a demo account first
- Learn and understand the indicator before live trading
- Market conditions change, so continually adapt your strategy
## Getting Started
1. Add the script to your TradingView chart
2. Experiment with different settings
3. Backtest on historical data
4. Start with small positions
5. Continuously learn and improve
Happy Trading! 📈🔍
Trendtrading
Cumulative Histogram TickThis script is designed to create a cumulative histogram based on tick data from a specific financial instrument. The histogram resets at the start of each trading session, which is defined by a fixed time.
Key Components:
Tick Data Retrieval:
The script fetches the closing tick values from the specified instrument using request.security("TICK.NY", timeframe.period, close). This line ensures that the script works with the tick data for each bar on the chart.
Session Start and End Detection:
Start Hour: The script checks if the current bar's time is 9:30 AM (hour == 9 and minute == 30). This is used to reset the cumulative value at the beginning of each trading session.
End Hour: It also checks if the current bar's time is 4:00 PM (hour == 16). However, this condition is used to prevent further accumulation after the session ends.
Cumulative Value Management:
Reset: When the start hour condition is met (startHour), the cumulative value (cumulative) is reset to zero. This ensures that each trading session starts with a clean slate.
Accumulation: For all bars that are not at the end hour (not endHour), the tick value is added to the cumulative total. This process continues until the end of the trading session.
Histogram Visualization:
The cumulative value is plotted as a histogram using plot.style_histogram. The color of the histogram changes based on whether the cumulative value is positive (green) or negative (red).
Usage
This script is useful for analyzing intraday market activity by visualizing the accumulation of tick data over a trading session. It helps traders identify trends or patterns within each session, which can be valuable for making informed trading decisions.
Enhanced Fuzzy SMA Analyzer (Multi-Output Proxy) [FibonacciFlux]EFzSMA: Decode Trend Quality, Conviction & Risk Beyond Simple Averages
Stop Relying on Lagging Averages Alone. Gain a Multi-Dimensional Edge.
The Challenge: Simple Moving Averages (SMAs) tell you where the price was , but they fail to capture the true quality, conviction, and sustainability of a trend. Relying solely on price crossing an average often leads to chasing weak moves, getting caught in choppy markets, or missing critical signs of trend exhaustion. Advanced traders need a more sophisticated lens to navigate complex market dynamics.
The Solution: Enhanced Fuzzy SMA Analyzer (EFzSMA)
EFzSMA is engineered to address these limitations head-on. It moves beyond simple price-average comparisons by employing a sophisticated Fuzzy Inference System (FIS) that intelligently integrates multiple critical market factors:
Price deviation from the SMA ( adaptively normalized for market volatility)
Momentum (Rate of Change - ROC)
Market Sentiment/Overheat (Relative Strength Index - RSI)
Market Volatility Context (Average True Range - ATR, optional)
Volume Dynamics (Volume relative to its MA, optional)
Instead of just a line on a chart, EFzSMA delivers a multi-dimensional assessment designed to give you deeper insights and a quantifiable edge.
Why EFzSMA? Gain Deeper Market Insights
EFzSMA empowers you to make more informed decisions by providing insights that simple averages cannot:
Assess True Trend Quality, Not Just Location: Is the price above the SMA simply because of a temporary spike, or is it supported by strong momentum, confirming volume, and stable volatility? EFzSMA's core fuzzyTrendScore (-1 to +1) evaluates the health of the trend, helping you distinguish robust moves from noise.
Quantify Signal Conviction: How reliable is the current trend signal? The Conviction Proxy (0 to 1) measures the internal consistency among the different market factors analyzed by the FIS. High conviction suggests factors are aligned, boosting confidence in the trend signal. Low conviction warns of conflicting signals, uncertainty, or potential consolidation – acting as a powerful filter against chasing weak moves.
// Simplified Concept: Conviction reflects agreement vs. conflict among fuzzy inputs
bullStrength = strength_SB + strength_WB
bearStrength = strength_SBe + strength_WBe
dominantStrength = max(bullStrength, bearStrength)
conflictingStrength = min(bullStrength, bearStrength) + strength_N
convictionProxy := (dominantStrength - conflictingStrength) / (dominantStrength + conflictingStrength + 1e-10)
// Modifiers (Volatility/Volume) applied...
Anticipate Potential Reversals: Trends don't last forever. The Reversal Risk Proxy (0 to 1) synthesizes multiple warning signs – like extreme RSI readings, surging volatility, or diverging volume – into a single, actionable metric. High reversal risk flags conditions often associated with trend exhaustion, providing early warnings to protect profits or consider counter-trend opportunities.
Adapt to Changing Market Regimes: Markets shift between high and low volatility. EFzSMA's unique Adaptive Deviation Normalization adjusts how it perceives price deviations based on recent market behavior (percentile rank). This ensures more consistent analysis whether the market is quiet or chaotic.
// Core Idea: Normalize deviation by recent volatility (percentile)
diff_abs_percentile = ta.percentile_linear_interpolation(abs(raw_diff), normLookback, percRank) + 1e-10
normalized_diff := raw_diff / diff_abs_percentile
// Fuzzy sets for 'normalized_diff' are thus adaptive to volatility
Integrate Complexity, Output Clarity: EFzSMA distills complex, multi-factor analysis into clear, interpretable outputs, helping you cut through market noise and focus on what truly matters for your decision-making process.
Interpreting the Multi-Dimensional Output
The true power of EFzSMA lies in analyzing its outputs together:
A high Trend Score (+0.8) is significant, but its reliability is amplified by high Conviction (0.9) and low Reversal Risk (0.2) . This indicates a strong, well-supported trend.
Conversely, the same high Trend Score (+0.8) coupled with low Conviction (0.3) and high Reversal Risk (0.7) signals caution – the trend might look strong superficially, but internal factors suggest weakness or impending exhaustion.
Use these combined insights to:
Filter Entry Signals: Require minimum Trend Score and Conviction levels.
Manage Risk: Consider reducing exposure or tightening stops when Reversal Risk climbs significantly, especially if Conviction drops.
Time Exits: Use rising Reversal Risk and falling Conviction as potential signals to take profits.
Identify Regime Shifts: Monitor how the relationship between the outputs changes over time.
Core Technology (Briefly)
EFzSMA leverages a Mamdani-style Fuzzy Inference System. Crisp inputs (normalized deviation, ROC, RSI, ATR%, Vol Ratio) are mapped to linguistic fuzzy sets ("Low", "High", "Positive", etc.). A rules engine evaluates combinations (e.g., "IF Deviation is LargePositive AND Momentum is StrongPositive THEN Trend is StrongBullish"). Modifiers based on Volatility and Volume context adjust rule strengths. Finally, the system aggregates these and defuzzifies them into the Trend Score, Conviction Proxy, and Reversal Risk Proxy. The key is the system's ability to handle ambiguity and combine multiple, potentially conflicting factors in a nuanced way, much like human expert reasoning.
Customization
While designed with robust defaults, EFzSMA offers granular control:
Adjust SMA, ROC, RSI, ATR, Volume MA lengths.
Fine-tune Normalization parameters (lookback, percentile). Note: Fuzzy set definitions for deviation are tuned for the normalized range.
Configure Volatility and Volume thresholds for fuzzy sets. Tuning these is crucial for specific assets/timeframes.
Toggle visual elements (Proxies, BG Color, Risk Shapes, Volatility-based Transparency).
Recommended Use & Caveats
EFzSMA is a sophisticated analytical tool, not a standalone "buy/sell" signal generator.
Use it to complement your existing strategy and analysis.
Always validate signals with price action, market structure, and other confirming factors.
Thorough backtesting and forward testing are essential to understand its behavior and tune parameters for your specific instruments and timeframes.
Fuzzy logic parameters (membership functions, rules) are based on general heuristics and may require optimization for specific market niches.
Disclaimer
Trading involves substantial risk. EFzSMA is provided for informational and analytical purposes only and does not constitute financial advice. No guarantee of profit is made or implied. Past performance is not indicative of future results. Use rigorous risk management practices.
Multi-Fibonacci Trend Average[FibonacciFlux]Multi-Fibonacci Trend Average (MFTA): An Institutional-Grade Trend Confluence Indicator for Discerning Market Participants
My original indicator/Strategy:
Engineered for the sophisticated demands of institutional and advanced traders, the Multi-Fibonacci Trend Average (MFTA) indicator represents a paradigm shift in technical analysis. This meticulously crafted tool is designed to furnish high-definition trend signals within the complexities of modern financial markets. Anchored in the rigorous principles of Fibonacci ratios and augmented by advanced averaging methodologies, MFTA delivers a granular perspective on trend dynamics. Its integration of Multi-Timeframe (MTF) filters provides unparalleled signal robustness, empowering strategic decision-making with a heightened degree of confidence.
MFTA indicator on BTCUSDT 15min chart with 1min RSI and MACD filters enabled. Note the refined signal generation with reduced noise.
MFTA indicator on BTCUSDT 15min chart without MTF filters. While capturing more potential trading opportunities, it also generates a higher frequency of signals, including potential false positives.
Core Innovation: Proprietary Fibonacci-Enhanced Supertrend Averaging Engine
The MFTA indicator’s core innovation lies in its proprietary implementation of Supertrend analysis, strategically fortified by Fibonacci ratios to construct a truly dynamic volatility envelope. Departing from conventional Supertrend methodologies, MFTA autonomously computes not one, but three distinct Supertrend lines. Each of these lines is uniquely parameterized by a specific Fibonacci factor: 0.618 (Weak), 1.618 (Medium/Golden Ratio), and 2.618 (Strong/Extended Fibonacci).
// Fibonacci-based factors for multiple Supertrend calculations
factor1 = input.float(0.618, 'Factor 1 (Weak/Fibonacci)', minval=0.01, step=0.01, tooltip='Factor 1 (Weak/Fibonacci)', group="Fibonacci Supertrend")
factor2 = input.float(1.618, 'Factor 2 (Medium/Golden Ratio)', minval=0.01, step=0.01, tooltip='Factor 2 (Medium/Golden Ratio)', group="Fibonacci Supertrend")
factor3 = input.float(2.618, 'Factor 3 (Strong/Extended Fib)', minval=0.01, step=0.01, tooltip='Factor 3 (Strong/Extended Fib)', group="Fibonacci Supertrend")
This multi-faceted architecture adeptly captures a spectrum of market volatility sensitivities, ensuring a comprehensive assessment of prevailing conditions. Subsequently, the indicator algorithmically synthesizes these disparate Supertrend lines through arithmetic averaging. To achieve optimal signal fidelity and mitigate inherent market noise, this composite average is further refined utilizing an Exponential Moving Average (EMA).
// Calculate average of the three supertends and a smoothed version
superlength = input.int(21, 'Smoothing Length', tooltip='Smoothing Length for Average Supertrend', group="Fibonacci Supertrend")
average_trend = (supertrend1 + supertrend2 + supertrend3) / 3
smoothed_trend = ta.ema(average_trend, superlength)
The resultant ‘Smoothed Trend’ line emerges as a remarkably responsive yet stable trend demarcation, offering demonstrably superior clarity and precision compared to singular Supertrend implementations, particularly within the turbulent dynamics of high-volatility markets.
Elevated Signal Confluence: Integrated Multi-Timeframe (MTF) Validation Suite
MFTA transcends the limitations of conventional trend indicators by incorporating an advanced suite of three independent MTF filters: RSI, MACD, and Volume. These filters function as sophisticated validation protocols, rigorously ensuring that only signals exhibiting a confluence of high-probability factors are brought to the forefront.
1. Granular Lower Timeframe RSI Momentum Filter
The Relative Strength Index (RSI) filter, computed from a user-defined lower timeframe, furnishes critical momentum-based signal validation. By meticulously monitoring RSI dynamics on an accelerated timeframe, traders gain the capacity to evaluate underlying momentum strength with precision, prior to committing to signal execution on the primary chart timeframe.
// --- Lower Timeframe RSI Filter ---
ltf_rsi_filter_enable = input.bool(false, title="Enable RSI Filter", group="MTF Filters", tooltip="Use RSI from lower timeframe as a filter")
ltf_rsi_timeframe = input.timeframe("1", title="RSI Timeframe", group="MTF Filters", tooltip="Timeframe for RSI calculation")
ltf_rsi_length = input.int(14, title="RSI Length", minval=1, group="MTF Filters", tooltip="Length for RSI calculation")
ltf_rsi_threshold = input.int(30, title="RSI Threshold", minval=0, maxval=100, group="MTF Filters", tooltip="RSI value threshold for filtering signals")
2. Convergent Lower Timeframe MACD Trend-Momentum Filter
The Moving Average Convergence Divergence (MACD) filter, also calculated on a lower timeframe basis, introduces a critical layer of trend-momentum convergence confirmation. The bullish signal configuration rigorously mandates that the MACD line be definitively positioned above the Signal line on the designated lower timeframe. This stringent condition ensures a robust indication of converging momentum that aligns synergistically with the prevailing trend identified on the primary timeframe.
// --- Lower Timeframe MACD Filter ---
ltf_macd_filter_enable = input.bool(false, title="Enable MACD Filter", group="MTF Filters", tooltip="Use MACD from lower timeframe as a filter")
ltf_macd_timeframe = input.timeframe("1", title="MACD Timeframe", group="MTF Filters", tooltip="Timeframe for MACD calculation")
ltf_macd_fast_length = input.int(12, title="MACD Fast Length", minval=1, group="MTF Filters", tooltip="Fast EMA length for MACD")
ltf_macd_slow_length = input.int(26, title="MACD Slow Length", minval=1, group="MTF Filters", tooltip="Slow EMA length for MACD")
ltf_macd_signal_length = input.int(9, title="MACD Signal Length", minval=1, group="MTF Filters", tooltip="Signal SMA length for MACD")
3. Definitive Volume Confirmation Filter
The Volume Filter functions as an indispensable arbiter of trade conviction. By establishing a dynamic volume threshold, defined as a percentage relative to the average volume over a user-specified lookback period, traders can effectively ensure that all generated signals are rigorously validated by demonstrably increased trading activity. This pivotal validation step signifies robust market participation, substantially diminishing the potential for spurious or false breakout signals.
// --- Volume Filter ---
volume_filter_enable = input.bool(false, title="Enable Volume Filter", group="MTF Filters", tooltip="Use volume level as a filter")
volume_threshold_percent = input.int(title="Volume Threshold (%)", defval=150, minval=100, group="MTF Filters", tooltip="Minimum volume percentage compared to average volume to allow signal (100% = average)")
These meticulously engineered filters operate in synergistic confluence, requiring all enabled filters to definitively satisfy their pre-defined conditions before a Buy or Sell signal is generated. This stringent multi-layered validation process drastically minimizes the incidence of false positive signals, thereby significantly enhancing entry precision and overall signal reliability.
Intuitive Visual Architecture & Actionable Intelligence
MFTA provides a demonstrably intuitive and visually rich charting environment, meticulously delineating trend direction and momentum through precisely color-coded plots:
Average Supertrend: Thin line, green/red for uptrend/downtrend, immediate directional bias.
Smoothed Supertrend: Bold line, teal/purple for uptrend/downtrend, cleaner, institutionally robust trend.
Dynamic Trend Fill: Green/red fill between Supertrends quantifies trend strength and momentum.
Adaptive Background Coloring: Light green/red background mirrors Smoothed Supertrend direction, holistic trend perspective.
Precision Buy/Sell Signals: ‘BUY’/‘SELL’ labels appear on chart when trend touch and MTF filter confluence are satisfied, facilitating high-conviction trade action.
MFTA indicator applied to BTCUSDT 4-hour chart, showcasing its effectiveness on higher timeframes. The Smoothed Length parameter is increased to 200 for enhanced smoothness on this timeframe, coupled with 1min RSI and Volume filters for signal refinement. This illustrates the indicator's adaptability across different timeframes and market conditions.
Strategic Applications for Institutional Mandates
MFTA’s sophisticated design provides distinct advantages for advanced trading operations and institutional investment mandates. Key strategic applications include:
High-Probability Trend Identification: Fibonacci-averaged Supertrend with MTF filters robustly identifies high-probability trend continuations and reversals, enhancing alpha generation.
Precision Entry/Exit Signals: Volume and momentum-filtered signals enable institutional-grade precision for optimized risk-adjusted returns.
Algorithmic Trading Integration: Clear signal logic facilitates seamless integration into automated trading systems for scalable strategy deployment.
Multi-Asset/Timeframe Versatility: Adaptable parameters ensure applicability across diverse asset classes and timeframes, catering to varied trading mandates.
Enhanced Risk Management: Superior signal fidelity from MTF filters inherently reduces false signals, supporting robust risk management protocols.
Granular Customization and Parameterized Control
MFTA offers unparalleled customization, empowering users to fine-tune parameters for precise alignment with specific trading styles and market conditions. Key adjustable parameters include:
Fibonacci Factors: Adjust Supertrend sensitivity to volatility regimes.
ATR Length: Control volatility responsiveness in Supertrend calculations.
Smoothing Length: Refine Smoothed Trend line responsiveness and noise reduction.
MTF Filter Parameters: Independently configure timeframes, lookback periods, and thresholds for RSI, MACD, and Volume filters for optimal signal filtering.
Disclaimer
MFTA is meticulously engineered for high-quality trend signals; however, no indicator guarantees profit. Market conditions are unpredictable, and trading involves substantial risk. Rigorous backtesting and forward testing across diverse datasets, alongside a comprehensive understanding of the indicator's logic, are essential before live deployment. Past performance is not indicative of future results. MFTA is for informational and analytical purposes only and is not financial or investment advice.
Forexsom MA Crossover SignalsA Trend-Following Trading Indicator for TradingView
Overview
This indicator plots two moving averages (MA) on your chart and generates visual signals when they cross, helping traders identify potential trend reversals. It is designed to be simple yet effective for both beginners and experienced traders.
Key Features
✅ Dual Moving Averages – Plots a Fast MA (default: 9-period) and a Slow MA (default: 21-period)
✅ Customizable MA Types – Choose between EMA (Exponential Moving Average) or SMA (Simple Moving Average)
✅ Clear Buy/Sell Signals – Displays "BUY" (green label) when the Fast MA crosses above the Slow MA and "SELL" (red label) when it crosses below
✅ Alerts – Get notified when new signals appear (compatible with TradingView alerts)
✅ Clean Visuals – Easy-to-read moving averages with adjustable colors
How It Works
Bullish Signal (BUY) → Fast MA crosses above Slow MA (suggests uptrend)
Bearish Signal (SELL) → Fast MA crosses below Slow MA (suggests downtrend)
Best Used For
✔ Trend-following strategies (swing trading, day trading)
✔ Confirming trend reversals
✔ Filtering trade entries in combination with other indicators
Customization Options
Adjust Fast & Slow MA lengths
Switch between EMA or SMA for smoother or more responsive signals
Why Use This Indicator?
Simple & Effective – No clutter, just clear signals
Works on All Timeframes – From scalping (1M, 5M) to long-term trading (4H, Daily)
Alerts for Real-Time Trading – Never miss a signal
Trendline Breaks with Multi Fibonacci Supertrend StrategyTMFS Strategy: Advanced Trendline Breakouts with Multi-Fibonacci Supertrend
Elevate your algorithmic trading with institutional-grade signal confluence
Strategy Genesis & Evolution
This advanced trading system represents the culmination of a personal research journey, evolving from my custom " Multi Fibonacci Supertrend with Signals " indicator into a comprehensive trading strategy. Built upon the exceptional trendline detection methodology pioneered by LuxAlgo in their " Trendlines with Breaks " indicator, I've engineered a systematic framework that integrates multiple technical factors into a cohesive trading system.
Core Fibonacci Principles
At the heart of this strategy lies the Fibonacci sequence application to volatility measurement:
// Fibonacci-based factors for multiple Supertrend calculations
factor1 = input.float(0.618, 'Factor 1 (Weak/Fibonacci)', minval = 0.01, step = 0.01)
factor2 = input.float(1.618, 'Factor 2 (Medium/Golden Ratio)', minval = 0.01, step = 0.01)
factor3 = input.float(2.618, 'Factor 3 (Strong/Extended Fib)', minval = 0.01, step = 0.01)
These precise Fibonacci ratios create a dynamic volatility envelope that adapts to changing market conditions while maintaining mathematical harmony with natural price movements.
Dynamic Trendline Detection
The strategy incorporates LuxAlgo's pioneering approach to trendline detection:
// Pivotal swing detection (inspired by LuxAlgo)
pivot_high = ta.pivothigh(swing_length, swing_length)
pivot_low = ta.pivotlow(swing_length, swing_length)
// Dynamic slope calculation using ATR
slope = atr_value / swing_length * atr_multiplier
// Update trendlines based on pivot detection
if bool(pivot_high)
upper_slope := slope
upper_trendline := pivot_high
else
upper_trendline := nz(upper_trendline) - nz(upper_slope)
This adaptive trendline approach automatically identifies key structural market boundaries, adjusting in real-time to evolving chart patterns.
Breakout State Management
The strategy implements sophisticated state tracking for breakout detection:
// Track breakouts with state variables
var int upper_breakout_state = 0
var int lower_breakout_state = 0
// Update breakout state when price crosses trendlines
upper_breakout_state := bool(pivot_high) ? 0 : close > upper_trendline ? 1 : upper_breakout_state
lower_breakout_state := bool(pivot_low) ? 0 : close < lower_trendline ? 1 : lower_breakout_state
// Detect new breakouts (state transitions)
bool new_upper_breakout = upper_breakout_state > upper_breakout_state
bool new_lower_breakout = lower_breakout_state > lower_breakout_state
This state-based approach enables precise identification of the exact moment when price breaks through a significant trendline.
Multi-Factor Signal Confluence
Entry signals require confirmation from multiple technical factors:
// Define entry conditions with multi-factor confluence
long_entry_condition = enable_long_positions and
upper_breakout_state > upper_breakout_state and // New trendline breakout
di_plus > di_minus and // Bullish DMI confirmation
close > smoothed_trend // Price above Supertrend envelope
// Execute trades only with full confirmation
if long_entry_condition
strategy.entry('L', strategy.long, comment = "LONG")
This strict requirement for confluence significantly reduces false signals and improves the quality of trade entries.
Advanced Risk Management
The strategy includes sophisticated risk controls with multiple methodologies:
// Calculate stop loss based on selected method
get_long_stop_loss_price(base_price) =>
switch stop_loss_method
'PERC' => base_price * (1 - long_stop_loss_percent)
'ATR' => base_price - long_stop_loss_atr_multiplier * entry_atr
'RR' => base_price - (get_long_take_profit_price() - base_price) / long_risk_reward_ratio
=> na
// Implement trailing functionality
strategy.exit(
id = 'Long Take Profit / Stop Loss',
from_entry = 'L',
qty_percent = take_profit_quantity_percent,
limit = trailing_take_profit_enabled ? na : long_take_profit_price,
stop = long_stop_loss_price,
trail_price = trailing_take_profit_enabled ? long_take_profit_price : na,
trail_offset = trailing_take_profit_enabled ? long_trailing_tp_step_ticks : na,
comment = "TP/SL Triggered"
)
This flexible approach adapts to varying market conditions while providing comprehensive downside protection.
Performance Characteristics
Rigorous backtesting demonstrates exceptional capital appreciation potential with impressive risk-adjusted metrics:
Remarkable total return profile (1,517%+)
Strong Sortino ratio (3.691) indicating superior downside risk control
Profit factor of 1.924 across all trades (2.153 for long positions)
Win rate exceeding 35% with balanced distribution across varied market conditions
Institutional Considerations
The strategy architecture addresses execution complexities faced by institutional participants with temporal filtering and date-range capabilities:
// Time Filter settings with flexible timezone support
import jason5480/time_filters/5 as time_filter
src_timezone = input.string(defval = 'Exchange', title = 'Source Timezone')
dst_timezone = input.string(defval = 'Exchange', title = 'Destination Timezone')
// Date range filtering for precise execution windows
use_from_date = input.bool(defval = true, title = 'Enable Start Date')
from_date = input.time(defval = timestamp('01 Jan 2022 00:00'), title = 'Start Date')
// Validate trading permission based on temporal constraints
date_filter_approved = time_filter.is_in_date_range(
use_from_date, from_date, use_to_date, to_date, src_timezone, dst_timezone
)
These capabilities enable precise execution timing and market session optimization critical for larger market participants.
Acknowledgments
Special thanks to LuxAlgo for the pioneering work on trendline detection and breakout identification that inspired elements of this strategy. Their innovative approach to technical analysis provided a valuable foundation upon which I could build my Fibonacci-based methodology.
This strategy is shared under the same Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license as LuxAlgo's original work.
Past performance is not indicative of future results. Conduct thorough analysis before implementing any algorithmic strategy.
Smart Wick AnalyzerOverview:
The Smart Wick Analyzer (SWA) is designed to help traders identify potential liquidity grabs and high-probability reversal zones based on extended wicks combined with volume and trend confirmation. It visually marks significant upper and lower wick events and highlights possible turning points in the market using wick-to-body ratios and other market context filters.
How It Works:
This indicator evaluates wick-to-body ratios to detect candles with disproportionately long upper or lower wicks — a common signature of stop hunts or liquidity grabs. To improve signal reliability, it incorporates:
• Trend Filter using a Simple Moving Average (SMA).
• Volume Confirmation relative to average volume.
• Cooldown Period to avoid repetitive signals in tight price zones.
When all conditions align, the indicator plots a Buy Signal (triangle up) for long lower wicks in an uptrend, and a Sell Signal (triangle down) for long upper wicks in a downtrend.
Additionally, it draws open/close dotted lines extending from signal candles to provide context for future price interaction zones.
Key Features:
• Wick-to-body ratio detection logic.
• Trend confirmation using user-defined lookback SMA.
• Volume threshold multiplier filter.
• Cooldown mechanism to prevent signal clustering.
• Visual cues: Triangles, bar coloring, and signal lines.
• Built-in alert conditions for Buy/Sell signal detection.
• Clean chart representation with minimal noise.
How to Use:
• Use it as a reversal confirmation tool near support/resistance or liquidity zones.
• Combine with your existing price action or structure-based strategies.
• Works effectively across timeframes, but best results are often seen on 15min to 1H charts.
• Ideal for discretionary scalpers or swing traders looking to refine entry points.
Why This Combination?
Wick traps alone can be misleading. By combining price wick behavior, trend alignment, and volume confirmation, this tool aims to filter out noise and highlight only the most contextually relevant wick-based reversal signals. The cooldown period further enhances signal quality by avoiding back-to-back triggers.
Why It’s Worth Using:
Smart Wick Analyzer is not just a wick detector—it’s a multi-layered reversal signal filter that offers clear visual guidance without cluttering your charts. Whether you’re catching traps or refining your entries, it helps add structure and consistency to your decision-making.
Note :
This script follows TradingView’s publishing guidelines. It does not include performance guarantees or promotional content and is designed for educational and analytical purposes only.
Logarithmic Regression Channel-Trend [BigBeluga]
This indicator utilizes logarithmic regression to track price trends and identify overbought and oversold conditions within a trend. It provides traders with a dynamic channel based on logarithmic regression, offering insights into trend strength and potential reversal zones.
🔵Key Features:
Logarithmic Regression Trend Tracking: Uses log regression to model price trends and determine trend direction dynamically.
f_log_regression(src, length) =>
float sumX = 0.0
float sumY = 0.0
float sumXSqr = 0.0
float sumXY = 0.0
for i = 0 to length - 1
val = math.log(src )
per = i + 1.0
sumX += per
sumY += val
sumXSqr += per * per
sumXY += val * per
slope = (length * sumXY - sumX * sumY) / (length * sumXSqr - sumX * sumX)
average = sumY / length
intercept = average - slope * sumX / length + slope
Regression-Based Channel: Plots a log regression channel around the price to highlight overbought and oversold conditions.
Adaptive Trend Colors: The color of the regression trend adjusts dynamically based on price movement.
Trend Shift Signals: Marks trend reversals when the log regression line cross the log regression line 3 bars back.
Dashboard for Key Insights: Displays:
- The regression slope (multiplied by 100 for better scale).
- The direction of the regression channel.
- The trend status of the logarithmic regression band.
🔵Usage:
Trend Identification: Observe the regression slope and channel direction to determine bullish or bearish trends.
Overbought/Oversold Conditions: Use the channel boundaries to spot potential reversal zones when price deviates significantly.
Breakout & Continuation Signals: Price breaking outside the channel may indicate strong trend continuation or exhaustion.
Confirmation with Other Indicators: Combine with volume or momentum indicators to strengthen trend confirmation.
Customizable Display: Users can modify the lookback period, channel width, midline visibility, and color preferences.
Logarithmic Regression Channel-Trend is an essential tool for traders who want a dynamic, regression-based approach to market trends while monitoring potential price extremes.
Parabolic SAR Deviation [BigBeluga]Parabolic SAR + Deviation is an enhanced Parabolic SAR indicator designed to detect trends while incorporating deviation levels and trend change markers for added depth in analyzing price movements.
🔵 Key Features:
> Parabolic SAR with Optimized Settings:
Built on the classic Parabolic SAR, this version uses predefined default settings to enhance its ability to detect and confirm trends.
Clear trend direction is indicated by smooth trend lines, allowing traders to easily visualize market movements.
Trend Change Markers:
When a trend change occurs based on the SAR, the indicator plots a triangle at the trend change point.
The triangle is accompanied by the price value of the trend change, allowing traders to identify key reversal points instantly.
> Deviation Levels:
Four deviation levels are automatically plotted when a trend change occurs (up or down).
Uptrend: Deviation levels are positioned above the entry point.
Downtrend: Deviation levels are positioned below the entry point.
Levels are labeled with numbers 1 to 4, representing increasing degrees of deviation.
> Dynamic Level Updates:
When the price crosses a deviation level, the level becomes dashed and its label changes to display the volume at the breakout point.
This volume information helps traders assess the strength of the breakout and the potential for trend continuation or reversal.
> Volume Analysis at Breakpoints:
The volume displayed at crossed deviation levels provides insight into the strength of the price movement.
High volume at a breakout may indicate strong momentum, while low volume could signal potential exhaustion or a false breakout.
🔵 Usage:
Identify Trends: Use the trend change triangles and smooth SAR trend lines to confirm whether the market is trending up or down.
Analyze Deviation Levels: Monitor deviation levels **1–4** to identify potential breakout points and assess the degree of price deviation from the entry point.
Observe Trend Change Points: Utilize the triangles and price labels to quickly spot significant trend changes.
Volume Insights: Evaluate the volume displayed at crossed levels to determine the strength of the breakout and assess the likelihood of trend continuation or reversal.
Risk Management: Use deviation levels as potential stop-loss or take-profit zones, depending on the strength of the trend and volume conditions.
Parabolic SAR + Deviation is an essential tool for traders seeking a straightforward yet powerful method to identify trends, analyze price deviations, and gain insights into volume dynamics at critical breakout and trend change levels.
Multi-Timeframe PSAR Indicator ver 1.0Enhance your trend analysis with the Multi-Timeframe Parabolic SAR (MTF PSAR) indicator! This powerful tool displays the Parabolic SAR (Stop and Reverse) from both the current chart's timeframe and a higher timeframe, all in one convenient view. Identify potential trend reversals and set dynamic trailing stops with greater confidence by understanding the broader market context.
Key Features:
Dual Timeframe Analysis: Simultaneously visualize the PSAR on your current chart and a user-defined higher timeframe (e.g., see the Daily PSAR while trading on the 1-hour chart). This helps you align your trades with the dominant trend.
Customizable PSAR Settings: Fine-tune the PSAR calculation with adjustable Start, Increment, and Maximum values. Optimize the indicator's sensitivity to match your trading style and the volatility of the asset.
Independent Timeframe Control: Choose to display either or both the current timeframe PSAR and the higher timeframe PSAR. Focus on the information most relevant to your analysis.
Clear Visual Representation: Distinct colors for the current and higher timeframe PSAR dots make it easy to differentiate between the two. Quickly identify potential entry and exit points.
Configurable Colors You can easily change colors of Current and HTF PSAR.
Standard PSAR Logic: Uses the classic Parabolic SAR algorithm, providing a reliable and widely-understood trend-following indicator.
lookahead=barmerge.lookahead_off used in the security function, there is no data leak or repainting.
Benefits:
Improved Trend Identification: Spot potential trend changes earlier by observing divergences between the current and higher timeframe PSAR.
Enhanced Risk Management: Use the PSAR as a dynamic trailing stop-loss to protect profits and limit potential losses.
Greater Trading Confidence: Make more informed decisions by considering the broader market trend.
Reduced Chart Clutter: Avoid the need to switch between multiple charts to analyze different timeframes.
Versatile Application: Suitable for various trading styles (swing trading, day trading, trend following) and markets (stocks, forex, crypto, etc.).
How to Use:
Add to Chart: Add the "Multi-Timeframe PSAR" indicator to your TradingView chart.
Configure Settings:
PSAR Settings: Adjust the Start, Increment, and Maximum values to control the PSAR's sensitivity.
Multi-Timeframe Settings: Select the desired "Higher Timeframe PSAR" resolution (e.g., "D" for Daily). Enable or disable the display of the current and/or higher timeframe PSAR using the checkboxes.
Interpret Signals:
Current Timeframe PSAR: Dots below the price suggest an uptrend; dots above the price suggest a downtrend.
Higher Timeframe PSAR: Provides context for the overall trend. Agreement between the current and higher timeframe PSAR strengthens the trend signal. Divergences may indicate potential reversals.
Trade Management:
Use PSAR dots as dynamic trailing stop.
Example Use Cases:
Confirming Trend Strength: A trader on a 1-hour chart sees the 1-hour PSAR flip bullish (dots below the price). They check the MTF PSAR and see that the Daily PSAR is also bullish, confirming the strength of the uptrend.
Identifying Potential Reversals: A trader sees the current timeframe PSAR flip bearish, but the higher timeframe PSAR remains bullish. This divergence could signal a potential pullback within a larger uptrend, or a warning of a more significant reversal.
Trailing Stops: A trader enters a long position and uses the current timeframe PSAR as a trailing stop, moving their stop-loss up as the PSAR dots rise.
Disclaimer: The Parabolic SAR is a lagging indicator and may produce false signals, especially in ranging markets. It is recommended to use this indicator in conjunction with other technical analysis tools and risk management strategies. Past performance is not indicative of future results.
[GYTS-CE] Market Regime Detector🧊 Market Regime Detector (Community Edition)
🌸 Part of GoemonYae Trading System (GYTS) 🌸
🌸 --------- INTRODUCTION --------- 🌸
💮 What is the Market Regime Detector?
The Market Regime Detector is an advanced, consensus-based indicator that identifies the current market state to increase the probability of profitable trades. By distinguishing between trending (bullish or bearish) and cyclic (range-bound) market conditions, this detector helps you select appropriate tactics for different environments. Instead of forcing a single strategy across all market conditions, our detector allows you to adapt your approach based on real-time market behaviour.
💮 The Importance of Market Regimes
Markets constantly shift between different behavioural states or "regimes":
• Bullish trending markets - characterised by sustained upward price movement
• Bearish trending markets - characterised by sustained downward price movement
• Cyclic markets - characterised by range-bound, oscillating behaviour
Each regime requires fundamentally different trading approaches. Trend-following strategies excel in trending markets but fail in cyclic ones, while mean-reversion strategies shine in cyclic markets but underperform in trending conditions. Detecting these regimes is essential for successful trading, which is why we've developed the Market Regime Detector to accurately identify market states using complementary detection methods.
🌸 --------- KEY FEATURES --------- 🌸
💮 Consensus-Based Detection
Rather than relying on a single method, our detector employs two complementary detection methodologies that analyse different aspects of market behaviour:
• Dominant Cycle Average (DCA) - analyzes price movement relative to its lookback period, a proxy for the dominant cycle
• Volatility Channel - examines price behaviour within adaptive volatility bands
These diverse perspectives are synthesised into a robust consensus that minimises false signals while maintaining responsiveness to genuine regime changes.
💮 Dominant Cycle Framework
The Market Regime Detector uses the concept of dominant cycles to establish a reference framework. You can input the dominant cycle period that best represents the natural rhythm of your market, providing a stable foundation for regime detection across different timeframes.
💮 Intuitive Parameter System
We've distilled complex technical parameters into intuitive controls that traders can easily understand:
• Adaptability - how quickly the detector responds to changing market conditions
• Sensitivity - how readily the detector identifies transitions between regimes
• Consensus requirement - how much agreement is needed among detection methods
This approach makes the detector accessible to traders of all experience levels while preserving the power of the underlying algorithms.
💮 Visual Market Feedback
The detector provides clear visual feedback about the current market regime through:
• Colour-coded chart backgrounds (purple shades for bullish, pink for bearish, yellow for cyclic)
• Colour-coded price bars
• Strength indicators showing the degree of consensus
• Customizable colour schemes to match your preferences or trading system
💮 Integration in the GYTS suite
The Market Regime Detector is compatible with the GYTS Suite , i.e. it passes the regime into the 🎼 Order Orchestrator where you can set how to trade the trending and cyclic regime.
🌸 --------- CONFIGURATION SETTINGS --------- 🌸
💮 Adaptability
Controls how quickly the Market Regime detector adapts to changing market conditions. You can see it as a low-frequency, long-term change parameter:
Very Low: Very slow adaptation, most stable but may miss regime changes
Low: Slower adaptation, more stability but less responsiveness
Normal: Balanced between stability and responsiveness
High: Faster adaptation, more responsive but less stable
Very High: Very fast adaptation, highly responsive but may generate false signals
This setting affects lookback periods and filter parameters across all detection methods.
💮 Sensitivity
Controls how sensitive the detector is to market regime transitions. This acts as a high-frequency, short-term change parameter:
Very Low: Requires substantial evidence to identify a regime change
Low: Less sensitive, reduces false signals but may miss some transitions
Normal: Balanced sensitivity suitable for most markets
High: More sensitive, detects subtle regime changes but may have more noise
Very High: Very sensitive, detects minor fluctuations but may produce frequent changes
This setting affects thresholds for regime detection across all methods.
💮 Dominant Cycle Period
This parameter allows you to specify the market's natural rhythm in bars. This represents a complete market cycle (up and down movement). Finding the right value for your specific market and timeframe might require some experimentation, but it's a crucial parameter that helps the detector accurately identify regime changes. Most of the times the cycle is between 20 and 40 bars.
💮 Consensus Mode
Determines how the signals from both detection methods are combined to produce the final market regime:
• Any Method (OR) : Signals bullish/bearish if either method detects that regime. If methods conflict (one bullish, one bearish), the stronger signal wins. More sensitive, catches more regime changes but may produce more false signals.
• All Methods (AND) : Signals only when both methods agree on the regime. More conservative, reduces false signals but might miss some legitimate regime changes.
• Weighted Decision : Balances both methods with equal weighting. Provides a middle ground between sensitivity and stability.
Each mode also calculates a continuous regime strength value that's used for colour intensity in the 'unconstrained' display mode.
💮 Display Mode
Choose how to display the market regime colours:
• Unconstrained regime: Shows the regime strength as a continuous gradient. This provides more nuanced visualisation where the intensity of the colour indicates the strength of the trend.
• Consensus only: Shows only the final consensus regime with fixed colours based on the detected regime type.
The background and bar colours will change to indicate the current market regime:
• Purple shades: Bullish trending market (darker purple indicates stronger bullish trend)
• Pink shades: Bearish trending market (darker pink indicates stronger bearish trend)
• Yellow: Cyclic (range-bound) market
💮 Custom Colour Options
The Market Regime Detector allows you to customize the colour scheme to match your personal preferences or to coordinate with other indicators:
• Use custom colours: Toggle to enable your own colour choices instead of the default scheme
• Transparency: Adjust the transparency level of all regime colours
• Bullish colours: Define custom colours for strong, medium, weak, and very weak bullish trends
• Bearish colours: Define custom colours for strong, medium, weak, and very weak bearish trends
• Cyclic colour: Define a custom colour for cyclic (range-bound) market conditions
🌸 --------- DETECTION METHODS --------- 🌸
💮 Dominant Cycle Average (DCA)
The Dominant Cycle Average method forms a key part of our detection system:
1. Theoretical Foundation :
The DCA method builds on cycle analysis and the observation that in trending markets, price consistently remains on one side of a moving average calculated using the dominant cycle period. In contrast, during cyclic markets, price oscillates around this average.
2. Calculation Process :
• We calculate a Simple Moving Average (SMA) using the specified lookback period - a proxy for the dominant cycle period
• We then analyse the proportion of time that price spends above or below this SMA over a lookback window. The theory is that the price should cross the SMA each half cycle, assuming that the dominant cycle period is correct and price follows a sinusoid.
• This lookback window is adaptive, scaling with the dominant cycle period (controlled by the Adaptability setting)
• The different values are standardised and normalised to possess more resolving power and to be more robust to noise.
3. Regime Classification :
• When the normalised proportion exceeds a positive threshold (determined by Sensitivity setting), the market is classified as bullish trending
• When it falls below a negative threshold, the market is classified as bearish trending
• When the proportion remains between these thresholds, the market is classified as cyclic
💮 Volatility Channel
The Volatility Channel method complements the DCA method by focusing on price movement relative to adaptive volatility bands:
1. Theoretical Foundation :
This method is based on the observation that trending markets tend to sustain movement outside of normal volatility ranges, while cyclic markets tend to remain contained within these ranges. By creating adaptive bands that adjust to current market volatility, we can detect when price behaviour indicates a trending or cyclic regime.
2. Calculation Process :
• We first calculate a smooth base channel center using a low pass filter, creating a noise-reduced centreline for price
• True Range (TR) is used to measure market volatility, which is then smoothed and scaled by the deviation factor (controlled by Sensitivity)
• Upper and lower bands are created by adding and subtracting this scaled volatility from the centreline
• Price is smoothed using an adaptive A2RMA filter, which has a very flat and stable behaviour, to reduce noise while preserving trend characteristics
• The position of this smoothed price relative to the bands is continuously monitored
3. Regime Classification :
• When smoothed price moves above the upper band, the market is classified as bullish trending
• When smoothed price moves below the lower band, the market is classified as bearish trending
• When price remains between the bands, the market is classified as cyclic
• The magnitude of price's excursion beyond the bands is used to determine trend strength
4. Adaptive Behaviour :
• The smoothing periods and deviation calculations automatically adjust based on the Adaptability setting
• The measured volatility is calculated over a period proportional to the dominant cycle, ensuring the detector works across different timeframes
• Both the center line and the bands adapt dynamically to changing market conditions, making the detector responsive yet stable
This method provides a unique perspective that complements the DCA approach, with the consensus mechanism synthesising insights from both methods.
🌸 --------- USAGE GUIDE --------- 🌸
💮 Starting with Default Settings
The default settings (Normal for Adaptability and Sensitivity, Weighted Decision for Consensus Mode) provide a balanced starting point suitable for most markets and timeframes. Begin by observing how these settings identify regimes in your preferred instruments.
💮 Finding the Optimal Dominant Cycle
The dominant cycle period is a critical parameter. Here are some approaches to finding an appropriate value:
• Start with typical values, usually something around 25 works well
• Visually identify the average distance between significant peaks and troughs
• Experiment with different values and observe which provides the most stable regime identification
• Consider using cycle-finding indicators to help identify the natural rhythm of your market
💮 Adjusting Parameters
• If you notice too many regime changes → Decrease Sensitivity or increase Consensus requirement
• If regime changes seem delayed → Increase Adaptability
• If a trending regime is not detected, the market is automatically assigned to be in a cyclic state
• If you want to see more nuanced regime transitions → Try the "unconstrained" display mode (note that this will not affect the output to other indicators)
💮 Trading Applications
Regime-Specific Strategies:
• Bullish Trending Regime - Use trend-following strategies, trail stops wider, focus on breakouts, consider holding positions longer, and emphasize buying dips
• Bearish Trending Regime - Consider shorts, tighter stops, focus on breakdown points, sell rallies, implement downside protection, and reduce position sizes
• Cyclic Regime - Apply mean-reversion strategies, trade range boundaries, apply oscillators, target definable support/resistance levels, and use profit-taking at extremes
Strategy Switching:
Create a set of rules for each market regime and switch between them based on the detector's signal. This approach can significantly improve performance compared to applying a single strategy across all market conditions.
GYTS Suite Integration:
• In the GYTS 🎼 Order Orchestrator, select the '🔗 STREAM-int 🧊 Market Regime' as the market regime source
• Note that the consensus output (i.e. not the "unconstrained" display) will be used in this stream
• Create different strategies for trending (bullish/bearish) and cyclic regimes. The GYTS 🎼 Order Orchestrator is specifically made for this.
• The output stream is actually very simple, and can possibly be used in indicators and strategies as well. It outputs 1 for bullish, -1 for bearish and 0 for cyclic regime.
🌸 --------- FINAL NOTES --------- 🌸
💮 Development Philosophy
The Market Regime Detector has been developed with several key principles in mind:
1. Robustness - The detection methods have been rigorously tested across diverse markets and timeframes to ensure reliable performance.
2. Adaptability - The detector automatically adjusts to changing market conditions, requiring minimal manual intervention.
3. Complementarity - Each detection method provides a unique perspective, with the collective consensus being more reliable than any individual method.
4. Intuitiveness - Complex technical parameters have been abstracted into easily understood controls.
💮 Ongoing Refinement
The Market Regime Detector is under continuous development. We regularly:
• Fine-tune parameters based on expanded market data
• Research and integrate new detection methodologies
• Optimise computational efficiency for real-time analysis
Your feedback and suggestions are very important in this ongoing refinement process!
XGBoost Approximation Indicator with HTF Filter Ver. 3.2XGBoost Approx Indicator with Higher Timeframe Filter Ver. 3.2
What It Is
The XGBoost Approx Indicator is a technical analysis tool designed to generate trading signals based on a composite of multiple indicators. It combines Simple Moving Average (SMA), Relative Strength Index (RSI), MACD, Rate of Change (ROC), and Volume to create a composite indicator score. Additionally, it incorporates a higher timeframe filter (HTF) to enhance trend confirmation and reduce false signals.
This indicator helps traders identify long (buy) and short (sell) opportunities based on a weighted combination of trend-following and momentum indicators.
How to Use It Properly
Setup and Configuration:
Add the indicator to your TradingView chart.
Customize input settings based on your trading strategy. Key configurable inputs include:
HTF filter (default: 1-hour)
SMA, RSI, MACD, and ROC lengths
Custom weightings for each component
Thresholds for buy and sell signals
Understanding the Signals:
Green "Long" Label: Appears when the composite indicator crosses above the buy threshold, signaling a potential buy opportunity.
Red "Short" Label: Appears when the composite indicator crosses below the sell threshold, signaling a potential sell opportunity.
These signals are filtered by a higher timeframe SMA trend to improve accuracy.
Alerts:
The indicator provides alert conditions for long and short entries.
Traders can enable alerts in TradingView to receive real-time notifications when a new signal is triggered.
Safety and Best Practices
Use in Conjunction with Other Analysis: Do not rely solely on this indicator. Combine it with price action, support/resistance levels, and fundamental analysis for better decision-making.
Adjust Settings for Your Strategy: The default settings may not suit all markets or timeframes. Test different configurations before trading live.
Backtest Before Using in Live Trading: Evaluate the indicator’s past performance on historical data to assess its effectiveness in different market conditions.
Avoid Overtrading: False signals can occur, especially in low volatility or choppy markets. Use additional confirmation (e.g., trendlines or moving averages).
Risk Management: Always set stop-loss levels and position sizes to limit potential losses.
Dual SuperTrend w VIX Filter - Strategy [presentTrading]Hey everyone! Haven't been here for a long time. Been so busy again in the past 2 months. I recently started working on analyzing the combination of trend strategy and VIX, but didn't get outstanding results after a few tries. Sharing this tool with all of you in case you have better insights.
█ Introduction and How it is Different
The Dual SuperTrend with VIX Filter Strategy combines traditional trend following with market volatility analysis. Unlike conventional SuperTrend strategies that focus solely on price action, this experimental system incorporates VIX (Volatility Index) as an adaptive filter to create a more context-aware trading approach. By analyzing where current volatility stands relative to historical norms, the strategy adjusts to different market environments rather than applying uniform logic across all conditions.
BTCUSD 6hr Long Short Performance
█ Strategy, How it Works: Detailed Explanation
🔶 Dual SuperTrend Core
The strategy uses two SuperTrend indicators with different sensitivity settings:
- SuperTrend 1: Length = 13, Multiplier = 3.5
- SuperTrend 2: Length = 8, Multiplier = 5.0
The SuperTrend calculation follows this process:
1. ATR = Average of max(High-Low, |High-PreviousClose|, |Low-PreviousClose|) over 'length' periods
2. UpperBand = (High+Low)/2 - (Multiplier * ATR)
3. LowerBand = (High+Low)/2 + (Multiplier * ATR)
Trend direction is determined by:
- If Close > previous LowerBand, Trend = Bullish (1)
- If Close < previous UpperBand, Trend = Bearish (-1)
- Otherwise, Trend = previous Trend
🔶 VIX Analysis Framework
The core innovation lies in the VIX analysis system:
1. Statistical Analysis:
- VIX Mean = SMA(VIX, 252)
- VIX Standard Deviation = StdDev(VIX, 252)
- VIX Z-Score = (Current VIX - VIX Mean) / VIX StdDev
2. **Volatility Bands:
- Upper Band 1 = VIX Mean + (2 * VIX StdDev)
- Upper Band 2 = VIX Mean + (3 * VIX StdDev)
- Lower Band 1 = VIX Mean - (2 * VIX StdDev)
- Lower Band 2 = VIX Mean - (3 * VIX StdDev)
3. Volatility Regimes:
- "Very Low Volatility": VIX < Lower Band 1
- "Low Volatility": Lower Band 1 ≤ VIX < Mean
- "Normal Volatility": Mean ≤ VIX < Upper Band 1
- "High Volatility": Upper Band 1 ≤ VIX < Upper Band 2
- "Extreme Volatility": VIX ≥ Upper Band 2
4. VIX Trend Detection:
- VIX EMA = EMA(VIX, 10)
- VIX Rising = VIX > VIX EMA
- VIX Falling = VIX < VIX EMA
Local performance:
🔶 Entry Logic Integration
The strategy combines trend signals with volatility filtering:
Long Entry Condition:
- Both SuperTrend 1 AND SuperTrend 2 must be bullish (trend = 1)
- AND selected VIX filter condition must be satisfied
Short Entry Condition:
- Both SuperTrend 1 AND SuperTrend 2 must be bearish (trend = -1)
- AND selected VIX filter condition must be satisfied
Available VIX filter rules include:
- "Below Mean + SD": VIX < Lower Band 1
- "Below Mean": VIX < VIX Mean
- "Above Mean": VIX > VIX Mean
- "Above Mean + SD": VIX > Upper Band 1
- "Falling VIX": VIX < VIX EMA
- "Rising VIX": VIX > VIX EMA
- "Any": No VIX filtering
█ Trade Direction
The strategy allows testing in three modes:
1. **Long Only:** Test volatility effects on uptrends only
2. **Short Only:** Examine volatility's impact on downtrends only
3. **Both (Default):** Compare how volatility affects both trend directions
This enables comparative analysis of how volatility regimes impact bullish versus bearish markets differently.
█ Usage
Use this strategy as an experimental framework:
1. Form a hypothesis about how volatility affects trend reliability
2. Configure VIX filters to test your specific hypothesis
3. Analyze performance across different volatility regimes
4. Compare results between uptrends and downtrends
5. Refine your volatility filtering approach based on results
6. Share your findings with the trading community
This framework allows you to investigate questions like:
- Are uptrends more reliable during rising or falling volatility?
- Do downtrends perform better when volatility is above or below its historical average?
- Should different volatility filters be applied to long vs. short positions?
█ Default Settings
The default settings serve as a starting point for exploration:
SuperTrend Parameters:
- SuperTrend 1 (Length=13, Multiplier=3.5): More responsive to trend changes
- SuperTrend 2 (Length=8, Multiplier=5.0): More selective filter requiring stronger trends
VIX Analysis Settings:
- Lookback Period = 252: Establishes a full market cycle for volatility context
- Standard Deviation Bands = 2 and 3 SD: Creates statistically significant regime boundaries
- VIX Trend Period = 10: Balances responsiveness with noise reduction
Default VIX Filter Selection:
- Long Entry: "Above Mean" - Tests if uptrends perform better during above-average volatility
- Short Entry: "Rising VIX" - Tests if downtrends accelerate when volatility is increasing
Feel Free to share your insight below!!!
Whale Buy Activity Detector (Real-Time)Whale Buy Activity Detector (Real-Time)
This indicator helps to identify abnormal spikes in the volume of purchases, which may indicate the activity of large players ("whales"). It analyzes the volume of purchases and compares it with the average volume over a certain period of time. If the volume of purchases exceeds a set threshold, the indicator marks this as potential whale activity.
Basic parameters:
Volume Threshold (x Average): The coefficient by which the current purchase volume must exceed the average volume in order to be considered abnormal. The default value is 2.0, which means that the purchase volume should be 2 times the average volume for the selected time period. This parameter can be adjusted in the range from 1.0 and higher in increments of 0.1.
Example: If you set the value to 1.5, the indicator will mark situations when the volume of purchases exceeds the average volume by 1.5 times.
Lookback Period: The time period used to calculate the average purchase volume. The default value is 20, which means that the average purchase volume will be calculated for the last 20 candles. This parameter can be set in the range from 1 and above.Example: If you set the value to 10, the average purchase volume will be calculated for the last 10 candles.
How to use:
Buy Volume: Shows the volume of purchases on each candle. This is the volume that was sold at a price higher than the opening price of the candle.
Average Buy Volume: The average volume of purchases over a given time period (Lookback Period). This parameter helps to determine the "normal" level of purchase volume.
Whale Buy: Notes abnormal spikes in the volume of purchases, which may indicate the activity of "whales". The indicator draws a mark on the top of the candle when the purchase volume exceeds the threshold set by the Volume Threshold parameter.
Notifications:
The indicator can send notifications when an abnormal volume of purchases is detected. You can set up notifications via the TradingView menu to receive real-time alerts.
Usage example:
If you are trading in a highly volatile market, you can increase the Volume Threshold to filter out small volume spikes.
If you trade in a low-volatility market, you can reduce the Volume Threshold to capture even small anomalies.
TrendPredator FOTrendPredator Fakeout Highlighter (FO)
The TrendPredator Fakeout Highlighter is designed to enhance multi-timeframe trend analysis by identifying key market behaviors that indicate trend strength, weakness, and potential reversals. Inspired by Stacey Burke’s trading approach, this tool focuses on trend-following, momentum shifts, and trader traps, helping traders capitalize on high-probability setups.
At its core, this indicator highlights peak formations—anchor points where price often locks in trapped traders before making decisive moves. These principles align with George Douglas Taylor’s 3-day cycle and Steve Mauro’s BTMM method, making the FO Highlighter a powerful tool for reading market structure. As markets are fractal, this analysis works on any timeframe.
How It Works
The TrendPredator FO highlights key price action signals by coloring candles based on their bias state on the current timeframe.
It tracks four major elements:
Breakout/Breakdown Bars – Did the candle close in a breakout or breakdown relative to the last candle?
Fakeout Bars (Trend Close) – Did the candle break a prior high/low and close back inside, but still in line with the trend?
Fakeout Bars (Counter-Trend Close) – Did the candle break a prior high/low, close back inside, and against the trend?
Switch Bars – Did the candle lose/ reclaim the breakout/down level of the last bar that closed in breakout/down, signalling a possible trend shift?
Reading the Trend with TrendPredator FO
The annotations in this example are added manually for illustration.
- Breakouts → Strong Trend
Multiple candles closing in breakout signal a healthy and strong trend.
- Fakeouts (Trend Close) → First Signs of Weakness
Candles that break out but close back inside suggest a potential slowdown—especially near key levels.
- Fakeouts (Counter-Trend Close) → Stronger Reversal Signal
Closing against the trend strengthens the reversal signal.
- Switch Bars → Momentum Shift
A shift in trend is confirmed when price crosses back through the last closed breakout candles breakout level, trapping traders and fuelling a move in the opposite direction.
- Breakdowns → Trend Reversal Confirmed
Once price breaks away from the peak formation, closing in breakdown, the trend shift is validated.
Customization & Settings
- Toggle individual candle types on/off
- Customize colors for each signal
- Set the number of historical candles displayed
Example Use Cases
1. Weekly Template Analysis
The weekly template is a core concept in Stacey Burke’s trading style. FO highlights individual candle states. With this the state of the trend and the developing weekly template can be evaluated precisely. The analysis is done on the daily timeframe and we are looking especially for overextended situations within a week, after multiple breakouts and for peak formations signalling potential reversals. This is helpful for thesis generation before a session and also for backtesting. The annotations in this example are added manually for illustration.
📈 Example: Weekly Template Analysis snapshot on daily timeframe
2. High Timeframe 5-Star Setup Analysis (Stacey Burke "ain't coming back" ACB Template)
This analysis identifies high-probability trade opportunities when daily breakout or down closes occur near key monthly levels mid-week, signalling overextensions and potentially large parabolic moves. Key signals for this are breakout or down closes occurring on a Wednesday. This is helpful for thesis generation before a session and also for backtesting. The annotations in this example are added manually for illustration. Also an indicator can bee seen on this chart shading every Wednesday to identify the signal.
📉 Example: High Timeframe Setup snapshot
3. Low Timeframe Entry Confirmation
FO helps confirm entry signals after a setup is identified, allowing traders to time their entries and exits more precisely. For this the highlighted Switch and/ or Fakeout bars can be highly valuable.
📊 Example (M15 Entry & Exit): Entry and Exit Confirmation snapshot
📊 Example (M5 Scale-In Strategy): Scaling Entries snapshot
The annotations in this examples are added manually for illustration.
Disclaimer
This indicator is for educational purposes only and does not guarantee profits.
None of the information provided shall be considered financial advice.
Users are fully responsible for their trading decisions and outcomes.
Market Trend Levels Detector [BigBeluga]Market Trend Levels Detector is an trend-following tool that utilizes moving average crossovers to identify key market trend levels. By detecting local highs and lows after EMA crossovers, the indicator helps traders track significant price zones and trend strength.
🔵 Key Features:
EMA Crossover-Based Trend Levels Detection:
Uses a fast and slow EMA to detect market flow shifts.
When the fast EMA crosses under the slow EMA, the indicator searches for the most recent local top and marks it with a label and horizontal level.
When the fast EMA crosses over the slow EMA, it searches for the most recent local low and marks it accordingly.
Dynamic Zone Levels:
Each detected high or low is plotted as a horizontal level, highlighting important price zones.
Traders can extend these levels to observe how price interacts with them over time.
If price crosses a level, its extension stops. Uncrossed levels continue expanding.
Gradient Trend Band Visualization:
The trend band is formed by shading the area between the two EMAs.
Color intensity varies based on volatility and trend strength.
Strong trends and high volatility areas appear with more intense colors, making trend shifts visually distinct.
🔵 Usage:
Trend Identification: Use EMA crossovers and trend bands to confirm bullish or bearish momentum.
Key Zone Mapping: Observe local high/low levels to track historical reaction points.
Breakout & Rejection Signals: Monitor price interactions with extended levels to assess potential breakouts or reversals.
Volatility Strength Analysis: Use color intensity in the trend band to gauge trend power and possible exhaustion points.
Scalping & Swing Trading: Ideal for both short-term scalping strategies and larger swing trade setups.
Market Trend Levels Detector is a must-have tool for traders looking to track market flow, key price levels, and trend momentum with dynamic visual cues. It provides a comprehensive approach to identifying high-probability trade setups using EMA-based flow detection and trend analysis.
[COG]TMS Crossfire 🔍 TMS Crossfire: Guide to Parameters
📊 Core Parameters
🔸 Stochastic Settings (K, D, Period)
- **What it does**: These control how the first stochastic oscillator works. Think of it as measuring momentum speed.
- **K**: Determines how smooth the main stochastic line is. Lower values (1-3) react quickly, higher values (3-9) are smoother.
- **D**: Controls the smoothness of the signal line. Usually kept equal to or slightly higher than K.
- **Period**: How many candles are used to calculate the stochastic. Standard is 14 days, lower for faster signals.
- **For beginners**: Start with the defaults (K:3, D:3, Period:14) until you understand how they work.
🔸 Second Stochastic (K2, D2, Period2)
- **What it does**: Creates a second, independent stochastic for stronger confirmation.
- **How to use**: Can be set identical to the first one, or with slightly different values for dual confirmation.
- **For beginners**: Start with the same values as the first stochastic, then experiment.
🔸 RSI Length
- **What it does**: Controls the period for the RSI calculation, which measures buying/selling pressure.
- **Lower values** (7-9): More sensitive, good for short-term trading
- **Higher values** (14-21): More stable, better for swing trading
- **For beginners**: The default of 11 is a good balance between speed and reliability.
🔸 Cross Level
- **What it does**: The centerline where crosses generate signals (default is 50).
- **Traditional levels**: Stochastics typically use 20/80, but 50 works well for this combined indicator.
- **For beginners**: Keep at 50 to focus on trend following strategies.
🔸 Source
- **What it does**: Determines which price data is used for calculations.
- **Common options**:
- Close: Most common and reliable
- Open: Less common
- High/Low: Used for specialized indicators
- **For beginners**: Stick with "close" as it's most commonly used and reliable.
🎨 Visual Theme Settings
🔸 Bullish/Bearish Main
- **What it does**: Sets the overall color scheme for bullish (up) and bearish (down) movements.
- **For beginners**: Green for bullish and red for bearish is intuitive, but choose any colors that are easy for you to distinguish.
🔸 Bullish/Bearish Entry
- **What it does**: Colors for the entry signals shown directly on the chart.
- **For beginners**: Use bright, attention-grabbing colors that stand out from your chart background.
🌈 Line Colors
🔸 K1, K2, RSI (Bullish/Bearish)
- **What it does**: Controls the colors of each indicator line based on market direction.
- **For beginners**: Use different colors for each line so you can quickly identify which line is which.
⏱️ HTF (Higher Timeframe) Settings
🔸 HTF Timeframe
- **What it does**: Sets which higher timeframe to use for filtering (e.g., 240 = 4 hour chart).
- **How to choose**: Should be at least 4x your current chart timeframe (e.g., if trading on 15min, use 60min or higher).
- **For beginners**: Start with a timeframe 4x higher than your trading chart.
🔸 Use HTF Filter
- **What it does**: Toggles whether the higher timeframe filter is applied or not.
- **For beginners**: Keep enabled to reduce false signals, especially when learning.
🔸 HTF Confirmation Bars
- **What it does**: How many bars must confirm a trend change on higher timeframe.
- **Higher values**: More reliable but slower to react
- **Lower values**: Faster signals but more false positives
- **For beginners**: Start with 2-3 bars for a good balance.
📈 EMA Settings
🔸 Use EMA Filter
- **What it does**: Toggles price filtering with an Exponential Moving Average.
- **For beginners**: Keep enabled for better trend confirmation.
🔸 EMA Period
- **What it does**: Length of the EMA for filtering (shorter = faster reactions).
- **Common values**:
- 5-13: Short-term trends
- 21-50: Medium-term trends
- 100-200: Long-term trends
- **For beginners**: 5-10 is good for short-term trading, 21 for swing trading.
🔸 EMA Offset
- **What it does**: Shifts the EMA forward or backward on the chart.
- **For beginners**: Start with 0 and adjust only if needed for visual clarity.
🔸 Show EMA on Chart
- **What it does**: Toggles whether the EMA appears on your main price chart.
- **For beginners**: Keep enabled to see how price relates to the EMA.
🔸 EMA Color, Style, Width, Transparency
- **What it does**: Customizes how the EMA line looks on your chart.
- **For beginners**: Choose settings that make the EMA visible but not distracting.
🌊 Trend Filter Settings
🔸 Use EMA Trend Filter
- **What it does**: Enables a multi-EMA system that defines the overall market trend.
- **For beginners**: Keep enabled for stronger trend confirmation.
🔸 Show Trend EMAs
- **What it does**: Toggles visibility of the trend EMAs on your chart.
- **For beginners**: Enable to see how price moves relative to multiple EMAs.
🔸 EMA Line Thickness
- **What it does**: Controls how the thickness of EMA lines is determined.
- **Options**:
- Uniform: All EMAs have the same thickness
- Variable: Each EMA has its own custom thickness
- Hierarchical: Automatically sized based on period (longer periods = thicker)
- **For beginners**: "Hierarchical" is most intuitive as longer-term EMAs appear more dominant.
🔸 EMA Line Style
- **What it does**: Sets the line style (solid, dotted, dashed) for all EMAs.
- **For beginners**: "Solid" is usually clearest unless you have many lines overlapping.
🎭 Trend Filter Colors/Width
🔸 EMA Colors (8, 21, 34, 55)
- **What it does**: Sets the color for each individual trend EMA.
- **For beginners**: Use a logical progression (e.g., shorter EMAs brighter, longer EMAs darker).
🔸 EMA Width Settings
- **What it does**: Controls the thickness of each EMA line.
- **For beginners**: Thicker lines for longer EMAs make them easier to distinguish.
🔔 How These Parameters Work Together
The power of this indicator comes from how these components interact:
1. **Base Oscillator**: The stochastic and RSI components create the main oscillator
2. **HTF Filter**: The higher timeframe filter prevents trading against larger trends
3. **EMA Filter**: The EMA filter confirms signals with price action
4. **Trend System**: The multi-EMA system identifies the overall market environment
Think of it as multiple layers of confirmation, each adding more reliability to your trading signals.
💡 Tips for Beginners
1. **Start with defaults**: Use the default settings first and understand what each element does
2. **One change at a time**: When customizing, change only one parameter at a time
3. **Keep notes**: Write down how each change affects your results
4. **Backtest thoroughly**: Test any changes on historical data before trading real money
5. **Less is more**: Sometimes simpler settings work better than complicated ones
Remember, no indicator is perfect - always combine this with proper risk management and other forms of analysis!
Tillson T3 Moving Average (improved)T3 Moving Average – Advanced Smoothing for Trend Analysis
Overview
The Tillson T3 Moving Average (T3 MA) is a superior smoothing moving average that reduces lag while maintaining responsiveness to price changes. Unlike traditional moving averages such as SMA, EMA, or WMA, the T3 applies multiple levels of smoothing, making it more adaptive to market conditions.
How It Works
The T3 MA is an exponentially smoothed moving average with a factor that controls the level of smoothing. This multi-layered smoothing process allows it to:
✅ React faster than a standard EMA while still filtering out market noise.
✅ Smooth out price fluctuations better than SMA or WMA, reducing false signals.
✅ Reduce lag compared to traditional moving averages, making it useful for both trend identification and entry/exit decisions.
How to Use This Script
🔹 Trend Identification – Use T3 MA as a dynamic trend filter. Price above T3 signals an uptrend, while price below signals a downtrend.
🔹 Direction Signal – The direction of the T3 MA (i.e. sloping upwards or downwards) can itself be used as a signal. The script allows the MA line to be colored, so it's easier to spot.
🔹 Crossover Signals – Combine T3 with another moving average (e.g., a shorter T3 or EMA, SMA, etc.) to generate trade signals when they cross.
🔹 Support & Resistance – The T3 can act as dynamic support and resistance in trending markets.
Features of This Script
✅ Custom Source Selection – Apply T3 not just to price, but also to any indicator (e.g., RSI, volume, etc.).
✅ Customizable Length & Smoothing – Adjust how smooth and responsive the T3 MA is.
✅ Optional Color Changes – The T3 MA can dynamically change color based on trend direction, making it easier to read.
✅ Versatile for Any Strategy – Works well in trend-following, mean-reversion, and breakout trading systems.
This script is ideal for traders looking for a smoother, more adaptive moving average that reduces noise while remaining reactive to price action. 🚀
Chaikin Money Flow with Moving AverageThis indicator combines the Chaikin Money Flow (CMF) with a moving average, helping traders analyze buying/selling pressure and whether it's increasing or decreasing.
What It Does:
Chaikin Money Flow (CMF) developed by Marc Chaikin is a volume-weighted average of accumulation and distribution over a specified period.
A moving average is applied to CMF to reduce noise and smooth trends, making it easier to identify sustained market sentiment shifts.
How to Use It?
CMF helps confirm trend strength and potential reversals. We reduces false signals from CMF by smoothing fluctuations and making it easier to spot trends.
A CMF value above zero is a sign of strength, and a value below zero is a sign of weakness.
A rising price with a falling CMF (below moving average) is a bearish divergence and a possible reversal of the uptrend.
Similarly, a falling price with a rising CMF (above moving average) is a bullish divergence and again signals a possible reversal of the downtrend.
Configurable Parameters:
CMF Length: Adjusts how many periods are used for CMF calculation.
MA Type: Choose between SMA, EMA, WMA, VWMA, or T3 for smoothing.
MA Length: Controls how much smoothing is applied.
This tool is great for traders looking to improve volume-based trend analysis while filtering out short-term noise.
ADX with Moving AverageADX with Moving Average is a powerful indicator that enhances trend analysis by combining the standard Average Directional Index (ADX) with a configurable moving average.
The ADX helps traders identify the strength of a trend. In general:
ADX 0-20 – Absent or Weak Trend
ADX 25-50 – Strong Trend
ADX 50-75 – Very Strong Trend
ADX 75-100 – Extremely Strong Trend
By adding a moving average we can judge if the ADX itself is trending upwards or downwards, i.e. if a new trend is emerging or an existing one is weakening.
This combination allows traders to better confirm strong trends and filter out weak or choppy market conditions.
Key Features & Customization:
✔ Configurable DI & ADX Lengths – Adjust how quickly the ADX reacts to price movements (default: 14, 14).
✔ Multiple Moving Average Options – Choose between SMA, EMA, WMA, VWMA, or T3 for trend confirmation.
✔ Custom MA Length – Fine-tune the sensitivity of the moving average to match your strategy.
🔹 Use this indicator to confirm strong trends before entering trades, filter out false signals, or refine existing strategies with a dynamic trend-strength component. 🚀
Blockchain Fundamentals: Liquidity Cycle MomentumLiquidity Cycle Momentum Indicator
Overview:
This indicator analyzes global liquidity trends by calculating a unique Liquidity Index and measuring its year-over-year (YoY) percentage change. It then applies a momentum oscillator to the YoY change, providing insights into the cyclical momentum of liquidity. The indicator incorporates a limited historical data workaround to ensure accurate calculations even when the chart’s history is short.
Features Breakdown:
1. Limited Historical Data Workaround
Function: The limit(length) function adjusts the lookback period when there isn’t enough historical data (i.e., near the beginning of the chart), ensuring that calculations do not break due to insufficient data.
2. Global Liquidity Calculation
Data Sources:
TVC:CN10Y (10-year yield from China)
TVC:DXY (US Dollar Index)
ECONOMICS:USCBBS (US Central Bank Balance Sheet)
FRED:JPNASSETS (Japanese assets)
ECONOMICS:CNCBBS (Chinese Central Bank Balance Sheet)
FRED:ECBASSETSW (ECB assets)
Calculation Methodology:
A ratio is computed (cn10y / dxy) to adjust for currency influences.
The Liquidity Index is then derived by multiplying this ratio with the sum of the other liquidity components.
3. Year-over-Year (YoY) Percent Change
Computation:
The indicator determines the number of bars that approximately represent one year.
It then compares the current Liquidity Index to its value one year ago, calculating the YoY percentage change.
4. Momentum Oscillator on YoY Change
Oscillator Components:
1. Calculated using the Chande Momentum Oscillator (CMO) applied to the YoY percent change with a user-defined momentum length.
2. A weighted moving average (WMA) that smooths the momentum signal.
3. Overbought and Oversold zones
Signal Generation:
Buy Signal: Triggered when the momentum crosses upward from an oversold condition, suggesting a potential upward shift in liquidity momentum.
Sell Signal: Triggered when crosses below an overbought condition, indicating potential downward momentum.
State Management:
The indicator maintains a state variable to avoid repeated signals, ensuring that a new buy or sell signal is only generated when there’s a clear change in momentum.
5. Visual Presentation and Alerts
Plots:
The oscillator value and signalline are plotted for visual analysis.
Overbought and oversold levels are marked with dashed horizontal lines.
Signal Markers:
Buy and sell signals are marked with green and maroon circles, respectively.
Background Coloration:
Optionally, the chart’s background bars are colored (yellow for buy signals and fuchsia for sell signals) to enhance visual cues when signals are triggered.
Conclusion
In summary, the Liquidity Cycle Momentum Indicator provides a robust framework to analyze liquidity trends by combining global liquidity data, YoY changes, and momentum oscillation. This makes it an effective tool for traders and analysts looking to identify cyclical shifts in liquidity conditions and potential turning points in the market.
Price Action Trend and Margin EquityThe Price Action Trend and Margin Equity indicator is a multifunctional market analysis tool that combines elements of money management and price pattern analysis. The indicator helps traders identify key price action patterns and determine optimal entry, exit and stop loss levels based on the current trend.
The main components of the indicator:
Money Management:
Allows the trader to set risk management parameters such as the percentage of possible loss on the position, the use of fixed leverage and the total capital.
Calculates the required leverage level to achieve a specified percentage of loss.
Price Action:
Correctly identifies various price patterns such as Pin Bar, Engulfing Bar, PPR Bar and Inside Bar.
Displays these patterns on the chart with the ability to customize candle colors and display styles.
Allows the trader to customize take profit and stop loss points to display them on the chart.
The ability to display patterns only in the direction of the trend.
Trend: (some code taken from ChartPrime)
Uses a trend cloud to visualize the current market direction.
The trend cloud is displayed on the chart and helps traders determine whether the market is in an uptrend or a downtrend.
Alert:
Allows you to set an alert that will be triggered when the pattern is formed.
Example of use:
Let's say a trader uses the indicator to trade the crypto market. He sets the money management parameters, setting the maximum loss per position to 5% and using a fixed leverage of 1:100. The indicator automatically calculates the required position size to meet these parameters ($: on the label). Or displays the leverage (X: on the label) to achieve the required risk.
The trader receives an alert when a Pin Bar is formed. The indicator displays the entry, exit, and stop loss levels based on this pattern. The trader opens a position for the recommended amount in the direction indicated by the indicator and sets the stop loss and take profit at the recommended levels.
General Settings:
Position Loss Percentage: Sets the maximum loss percentage you are willing to take on a single position.
Use Fixed Leverage: Enables or disables the use of fixed leverage.
Fixed Leverage: Sets the fixed leverage level.
Total Equity: Specifies the total equity you are using for trading. (Required for calculation when using fixed leverage)
Turn Patterns On/Off: You can turn on or off the display of various price patterns such as Pin Bar, Outside Bar (Engulfing), Inside Bar, and PPR Bar.
Pattern Colors: Sets the colors for displaying each pattern on the chart.
Candle Color: Allows you to set a neutral color for candles that do not match the price action.
Show Lines: Allows you to turn on or off the display of labels and lines.
Line Length: Sets the length of the stop, entry, and take profit lines.
Label color: One color for all labels (configured below) or the color of the labels in the color of the candle pattern.
Pin entry: Select the entry point for the pin bar: candle head, bar close, or 50% of the candle.
Coefficients for stop and take lines.
Use trend for price action: When enabled, will show price action signals only in the direction of the trend.
Display trend cloud: Enables or disables the display of the trend cloud.
Cloud calculation period: Sets the period for which the maximum and minimum values for the cloud are calculated. The longer the period, the smoother the cloud will be.
Cloud colors: Sets the colors for uptrends and downtrends, as well as the transparency of the cloud.
The logic of the indicator:
Pin Bar is a candle with a long upper or lower shadow and a short body.
Logic: If the length of one shadow is twice the body and the opposite shadow of the candle, it is considered a Pin Bar.
An Inside Bar is a candle that is completely engulfed by the previous candle.
Logic: If the high and low of the current candle are inside the previous candle, it is an Inside Bar.
An Outside Bar or Engulfing is a candle that completely engulfs the previous candle.
Logic: If the high and low of the current candle are outside the previous candle and close outside the previous candle, it is an Outside Bar.
A PPR Bar is a candle that closes above or below the previous candle.
Logic: If the current candle closes above the high of the previous candle or below its low, it is a PPR Bar.
Stop Loss Levels: Calculated based on the specified ratios. If set to 1.0, it shows the correct stop for the pattern by pushing away from the entry point.
Take Profit Levels: Calculated based on the specified ratios.
Create a Label: The label is created at the stop loss level and contains information about the potential leverage and loss.
The formula for calculating the $ value is:
=(Total Capital x (Maximum Loss Percentage on Position/100)) / (Difference between Entry Level and Stop Loss Level × Ratio that sets the stop loss level relative to the length of the candlestick shadow × Fixed Leverage Value) .
Labels contain the following information:
The percentage of price change from the recommended entry point to the stop loss level.
Required Leverage (X: ): The amount of leverage required to achieve the specified loss percentage. (Or a fixed value if selected).
Required Capital ($: ): The amount of capital required to open a position with the specified leverage and loss percentage (only displayed when using fixed leverage).
The trend cloud identifies the maximum and minimum price values for the specified period.
The cloud value is set depending on whether the current price is equal to the high or low values.
If the current closing price is equal to the high value, the cloud is set at the low value, and vice versa.
RU
Индикатор "Price Action Trend and Margin Equity" представляет собой многофункциональный инструмент для анализа рынка, объединяющий в себе элементы управления капиталом и анализа ценовых паттернов. Индикатор помогает трейдерам идентифицировать ключевые прайс экшн паттерны и определять оптимальные уровни входа, выхода и стоп-лосс на основе текущего тренда.
Основные компоненты индикатора:
Управление капиталом:
Позволяет трейдеру задавать параметры управления рисками, такие как процент возможного убытка по позиции, использование фиксированного плеча и общий капитал.
Рассчитывает необходимый уровень плеча для достижения заданного процента убытка.
Price Action:
Правильно идентифицирует различные ценовые паттерны, такие как Pin Bar, Поглащение Бар, PPR Bar и Внутренний Бар.
Отображает эти паттерны на графике с возможностью настройки цветов свечей и стилей отображения.
Позволяет трейдеру настраивать точки тейк профита и стоп лосса для отображения их на графике.
Возможность отображения паттернов только в натправлении тренда.
Trend: (часть кода взята у ChartPrime)
Использует облако тренда для визуализации текущего направления рынка.
Облако тренда отображается на графике и помогает трейдерам определить, находится ли рынок в восходящем или нисходящем тренде.
Оповещение:
Дает возможность установить оповещение которое будет срабатывать при формировании паттерна.
Пример применения:
Предположим, трейдер использует индикатор для торговли на крипто рынке. Он настраивает параметры управления капиталом, устанавливая максимальный убыток по позиции в 5% и используя фиксированное плечо 1:100. Индикатор автоматически рассчитывает необходимый объем позиции для соблюдения этих параметров ($: на лейбле). Или отображает плечо (Х: на лейбле) для достижения необходимого риска.
Трейдер получает оповещение о формировании Pin Bar. Индикатор отображает уровни входа, выхода и стоп-лосс, основанные на этом паттерне. Трейдер открывает позицию на рекомендуемую сумму в направлении, указанном индикатором, и устанавливает стоп-лосс и тейк-профит на рекомендованных уровнях.
Общие настройки:
Процент убытка по позиции: Устанавливает максимальный процент убытка, который вы готовы понести по одной позиции.
Использовать фиксированное плечо: Включает или отключает использование фиксированного плеча.
Уровень фиксированного плеча: Задает уровень фиксированного плеча.
Общий капитал: Указывает общий капитал, который вы используете для торговли. (Необходим для расчета при использовании фиксированного плеча)
Включение/отключение паттернов: Вы можете включить или отключить отображение различных ценовых паттернов, таких как Pin Bar, Outside Bar (Поглощение), Inside Bar и PPR Bar.
Цвета паттернов: Задает цвета для отображения каждого паттерна на графике.
Цвет свечей: Позволяет задать нейтральный цвет для свечей неподходящих под прйс экшн.
Показывать линии: Позволяет включить или отключить отображение лейблов и линий.
Длинна линий: Настройка длинны линий стопа, линии входа и тейк профита.
Цвет лейбла: Один цвет для всех лейблов (настраивается ниже) или цвет лейблов в цвет паттерна свечи.
Вход в пин: Выбор точки входа для пин бара: голова свечи, точка закрытия бара или 50% свечи.
Коэффиценты для стоп и тейк линий.
Использовать тренд для прайс экшна: При включении будет показывать прайс экшн сигналы только в направлении тренда.
Отображение облака тренда: Включает или отключает отображение облака тренда.
Период расчета облака: Устанавливает период, за который рассчитываются максимальные и минимальные значения для облака. Чем больше период, тем более сглаженным будет облако.
Цвета облака: Задает цвета для восходящего и нисходящего трендов, а также прозрачность облака.
Логика работы индикатора:
Pin Bar — это свеча с длинной верхней или нижней тенью и коротким телом.
Логика: Если длина одной тени вдвое больше тела и противоположной тени свечи, считается, что это Pin Bar.
Inside Bar — это свеча, полностью поглощенная предыдущей свечой.
Логика: Если максимум и минимум текущей свечи находятся внутри предыдущей свечи, это Inside Bar.
Outside Bar или Поглощение — это свеча, которая полностью поглощает предыдущую свечу.
Логика: Если максимум и минимум текущей свечи выходят за пределы предыдущей свечи и закрывается за пределами предыдущей свечи, это Outside Bar.
PPR Bar — это свеча, которая закрывается выше или ниже предыдущей свечи.
Логика: Если текущая свеча закрывается выше максимума предыдущей свечи или ниже ее минимума, это PPR Bar.
Уровни стоп-лосс: Рассчитываются на основе заданных коэффициентов. При значении 1.0 показывает правильный стоп для паттерна отталкиваясь от точки входа.
Уровки тейк-профита: Рассчитываются на основе заданных коэффициентов.
Создание метки: Метка создается на уровне стоп-лосс и содержит информацию о потенциальном плече и убытке.
Формула для вычисления значения $:
=(Общий капитал x (Максимальный процент убытка по позиции/100)) / (Разница между уровнем входа и уровнем стоп-лосс × Коэффициент, задающий уровень стоп-лосс относительно длины тени свечи × Значение фиксированного плеча).
Метки содержат следующую информацию:
Процент изменения цены от рекомендованной точки входа до уровня стоп-лосс.
Необходимое плечо (Х: ): Уровень плеча, необходимый для достижения заданного процента убытка. (Или фиксированное значение если оно выбрано).
Необходимый капитал ($: ): Сумма капитала, необходимая для открытия позиции с заданным плечом и процентом убытка (отображается только при использовании фиксированного плеча).
Облако тренда определяет максимальные и минимальные значения цены за указанный период.
Значение облака устанавливается в зависимости от того, совпадает ли текущая цена с максимальными или минимальными значениями.
Если текущая цена закрытия равна максимальному значению, облако устанавливается на уровне минимального значения, и наоборот.
Machine Learning: kNN Trend PredictorThe kNN Trend Predictor is a machine learning-based indicator that uses the k-Nearest Neighbors (kNN) algorithm for price prediction in trading. By analyzing historical price movements and computing Euclidean distances, the script identifies the closest past price patterns and forecasts potential trends. It provides color-coded trend signals, optional trade entry labels, and alerts for long and short signals.