Dynamic Gap Probability ToolDynamic Gap Probability Tool measures the percentage gap between price and a chosen moving average, then analyzes your chart history to estimate the likelihood of the next candle moving up or down. It dynamically adjusts its sample size to ensure statistical robustness while focusing on the exact deviation level.
Originality and Value:
• Combines gap-based analysis with dynamic sample aggregation to balance precision and reliability.
• Automatically extends the sample when exact matches are scarce, avoiding misleading signals on rare extreme moves.
• Provides real “next-candle” probabilities based on historical occurrences rather than fixed thresholds or untested heuristics.
• Adds value by giving traders an evidence-based edge: you see how similar past deviations actually played out.
How It Works:
1. Calculate gap = (close – moving average) / moving average * 100.
2. Round the absolute gap to nearest percent (X%).
3. Count historical bars where gap ≥ X% above or ≤ –X% below.
4. If exact X% count is below the minimum occurrences threshold, include gaps at X+1%, X+2%, etc., until threshold is reached.
5. Compute “next-candle” green vs. red probabilities from the aggregated sample.
6. Display current gap, sample size, green probability, and red probability in a table.
Inputs:
• Moving Average Type (SMA, EMA, WMA, VWMA, HMA, SMMA, TMA)
• Moving Average Period (default 200)
• Minimum Occurrences Threshold (default 50)
• Table position and styling options
Examples:
• If price is 3% above the 200-period SMA and 120 occurrences ≥3% are found, with 84 green next candles (70%) and 36 red (30%), the script displays “3% | 120 | 70% green | 30% red.”
• If price is 8% below the SMA but only 20 exact matches exist, the script will include 9% and 10% gaps until it reaches 50 samples, then calculate probabilities from that broader set.
Why It’s Useful:
• Mean-reversion traders see green-probability signals at extreme overbought or oversold levels.
• Trend-followers identify continuation likelihood when red probability is high.
• Risk managers gauge reliability by inspecting sample size before acting on any signal.
Limitations:
• Historical probabilities do not guarantee future performance.
• Results depend on timeframe and symbol, backtest with your data before trading.
• Use realistic slippage and commission when overlaying on strategy scripts.
Analisis Trend
Bullish & Bearish Wick MarkerMarks bullish and bearish engulfing candles
Bullish engulfing candle:
when the low is lower than the previous candle low and the body close is higher than the previous candle body
Bearish engulfing cande:
when the high is higher than the previous candle high and the body close is lower than the previous candle body
Auto-Length Anchored Multiple EMA (Hour-Based)# Auto-Length Anchored Multiple EMA (Hour-Based)
## Overview
This advanced EMA indicator automatically calculates Exponential Moving Average lengths based on the time elapsed since user-defined anchor dates. Unlike traditional fixed-length EMAs, this indicator dynamically adjusts EMA periods based on actual trading hours, making it ideal for event-based analysis and time-sensitive trading strategies.
## Key Features
### 🎯 **Dual Mode Operation**
- **Auto Mode**: EMA length automatically calculated from anchor date to current time
- **Manual Mode**: Traditional fixed-length EMA calculation
- Switch between modes independently for each EMA
### 📊 **Multiple EMA Support**
- Up to 4 independent EMAs with individual configurations
- Each EMA can have its own anchor date and settings
- Individual enable/disable controls for each EMA
### ⏰ **Smart Time Calculation**
- Accounts for actual trading hours (customizable)
- Weekend exclusion with Saturday trading option (for markets like NSE/BSE)
- Hour multiplier for fine-tuning EMA sensitivity
- Minimum EMA length protection to prevent calculation errors
### 🎨 **Visual Enhancements**
- **Dynamic Fill Colors**: Fill between EMA1 and EMA3 changes color based on price position
- **Customizable Colors**: Individual color settings for each EMA
- **Anchor Visualization**: Optional vertical lines and labels at anchor dates
- **Real-time Table**: Shows current EMA lengths, modes, and values
## Configuration Options
### Trading Session Settings
- **Trading Hours Per Day**: Set your market's trading hours (1-24)
- **Trading Days Per Week**: Configure for different markets (5 for Mon-Fri, 6 for Mon-Sat)
- **Include Saturday**: Enable for markets that trade on Saturday
- **Hour Multiplier**: Fine-tune EMA sensitivity (0.1x to 10x)
### EMA Configuration
- **Anchor Dates**: Set specific start dates for each EMA calculation
- **Manual Lengths**: Override with traditional fixed periods when needed
- **Enable/Disable**: Individual control for each EMA
- **Color Customization**: Personalize appearance for each EMA
### Visual Options
- **Fill Settings**: Toggle and customize fill colors between EMAs
- **Anchor Lines**: Show vertical lines at anchor dates
- **Anchor Labels**: Display formatted anchor date information
- **Length Table**: Real-time display of current EMA parameters
## Use Cases
### 📈 **Event-Based Analysis**
- Anchor EMAs to earnings announcements, policy decisions, or market events
- Track price behavior relative to specific time periods
- Analyze momentum changes from key market catalysts
### 🕐 **Time-Sensitive Trading**
- Perfect for intraday strategies where timing is crucial
- Automatically adjusts to market hours and trading sessions
- Eliminates manual EMA length recalculation
### 🌍 **Multi-Market Support**
- Configurable for different global markets
- Saturday trading support for Asian markets
- Flexible trading hour settings
## Technical Details
### Calculation Method
The indicator calculates trading bars elapsed since anchor date using:
```
Total Trading Bars = (Days Since Anchor × Trading Days Per Week ÷ 7) × Trading Hours Per Day × Hour Multiplier
```
### EMA Formula
Uses standard EMA calculation with dynamically calculated alpha:
```
Alpha = 2 ÷ (Current Length + 1)
EMA = Alpha × Current Price + (1 - Alpha) × Previous EMA
```
### Weekend Handling
- Automatically excludes weekends from calculation
- Optional Saturday inclusion for specific markets
- Accurate trading day counting
## Installation & Setup
1. **Add to Chart**: Apply the indicator to your desired timeframe
2. **Set Anchor Dates**: Configure anchor dates for each EMA you want to use
3. **Adjust Trading Hours**: Set your market's trading session parameters
4. **Customize Appearance**: Choose colors and visual options
5. **Enable Features**: Turn on fills, anchor lines, and information table as needed
## Best Practices
- **Anchor Selection**: Choose significant market events or technical breakouts as anchor points
- **Multiple Timeframes**: Use different anchor dates for short, medium, and long-term analysis
- **Hour Multiplier**: Start with 1.0 and adjust based on market volatility and your trading style
- **Visual Clarity**: Use contrasting colors for different EMAs to improve readability
## Compatibility
- **Pine Script Version**: v6
- **Chart Types**: All chart types supported
- **Timeframes**: Works on all timeframes (optimal on intraday charts)
- **Markets**: Suitable for stocks, forex, crypto, and commodities
## Notes
- Indicator starts calculation from the anchor date forward
- Minimum EMA length prevents calculation errors with very recent anchor dates
- Table display updates in real-time showing current EMA parameters
- Fill colors dynamically change based on price position relative to EMA1
---
*This indicator is perfect for traders who want to combine the power of EMAs with event-driven analysis and precise time-based calculations.*
SMA Crossing Background Color (Multi-Timeframe)When day trading or scalping on lower timeframes, it’s often difficult to determine whether the broader market trend is moving upward or downward. To address this, I usually check higher timeframes. However, splitting the layout makes the charts too small and hard to read.
To solve this issue, I created an indicator that uses the background color to show whether the current price is above or below a moving average from a higher timeframe.
For example, if you set the SMA Length to 200 and the MT Timeframe to 5 minutes, the indicator will display a red background on the 1-minute chart when the price drops below the 200 SMA on the 5-minute chart. This helps you quickly recognize that the trend on the higher timeframe has turned bearish—without having to open a separate chart.
デイトレード、スキャルピングで短いタイムフレームでトレードをするときに、大きな動きは上に向いているのか下に向いているのかトレンドがわからなくなることがあります。
その時に上位足を確認するのですが、レイアウトをスプリットすると画面が小さくて見えにくくなるので、バックグラウンドの色で上位足の移動平均線では価格が上なのか下なのかを表示させるインジケーターを作りました。
例えば、SMA Length で200を選び、MT Timeframeで5分を選べば、1分足タイムフレームでトレードしていて雲行きが怪しくなってくるとBGが赤になり、5分足では200線以下に突入しているようだと把握することができます。
Vasyl Ivanov | Volatility with MAThis indicator calculates and displays the volatility value for each bar.
The main line shows the relative range (spread) of the current bar compared to its closing price.
This allows you to quickly assess how much the price fluctuated within the bar relative to where it closed.
The Simple Moving Average (SMA) with a length of 9 smooths the main indicator values, helping to identify volatility trends and filter out random spikes.
Practical Application:
The indicator can be useful for assessing current market volatility and identifying periods with unusually wide or narrow ranges.
The smoothed line helps track medium-term changes in volatility and can be used to confirm trading signals related to range expansion or contraction.
Enhanced Ichimoku Cloud Strategy V1 [Quant Trading]Overview
This strategy combines the powerful Ichimoku Kinko Hyo system with a 171-period Exponential Moving Average (EMA) filter to create a robust trend-following approach. The strategy is designed for traders seeking to capitalize on strong momentum moves while using the Ichimoku cloud structure to identify optimal entry and exit points.
This is a patient, low-frequency trading system that prioritizes quality over quantity. In backtesting on Solana, the strategy achieved impressive results with approximately 3600% profit over just 29 trades, demonstrating its effectiveness at capturing major trend movements rather than attempting to profit from every market fluctuation. The extended parameters and strict entry criteria are specifically optimized for Solana's price action characteristics, making it well-suited for traders who prefer fewer, higher-conviction positions over high-frequency trading approaches.
What Makes This Strategy Original
This implementation enhances the traditional Ichimoku system by:
Custom Ichimoku Parameters: Uses non-standard periods (Conversion: 7, Base: 211, Lagging Span 2: 120, Displacement: 41) optimized for different market conditions
EMA Confirmation Filter: Incorporates a 171-period EMA as an additional trend confirmation layer
State Memory System: Implements a sophisticated memory system to track buy/sell states and prevent false signals
Dual Trade Modes: Offers both traditional Ichimoku signals ("Ichi") and cloud-based signals ("Cloud")
Breakout Confirmation: Requires price to break above the 25-period high for long entries
How It Works
Core Components
Ichimoku Elements:
-Conversion Line (Tenkan-sen): 7-period Donchian midpoint
-Base Line (Kijun-sen): 211-period Donchian midpoint
-Span A (Senkou Span A): Average of Conversion and Base lines, plotted 41 periods ahead
-Span B (Senkou Span B): 120-period Donchian midpoint, plotted 41 periods ahead
-Lagging Span (Chikou Span): Current close plotted 41 periods back
EMA Filter: 171-period EMA acts as a long-term trend filter
Entry Logic (Ichi Mode - Default)
A long position is triggered when ALL conditions are met:
Cloud Bullish: Span A > Span B (41 periods ago)
Breakout Confirmation: Current close > 25-period high
Ichimoku Bullish: Conversion Line > Base Line
Trend Alignment: Current close > 171-period EMA
State Memory: No previous buy signal is still active
Exit Logic
Positions are closed when:
Ichimoku Bearish: Conversion Line < Base Line
Alternative Cloud Mode
When "Cloud" mode is selected, the strategy uses:
Entry: Span A crosses above Span B with additional cloud and EMA confirmations
Exit: Span A crosses below Span B with cloud and EMA confirmations
Default Settings Explained
Strategy Properties
Initial Capital: $1,000 (realistic for average traders)
Position Size: 100% of equity (appropriate for backtesting single-asset strategies)
Commission: 0.1% (realistic for most brokers)
Slippage: 3 ticks (accounts for realistic execution costs)
Date Range: January 1, 2018 to December 31, 2069
Key Parameters
Conversion Periods: 7 (faster than traditional 9, more responsive to price changes)
Base Periods: 211 (much longer than traditional 26, provides stronger trend confirmation)
Lagging Span 2 Periods: 120 (custom period for stronger support/resistance levels)
Displacement: 41 (projects cloud further into future than standard 26)
EMA Period: 171 (long-term trend filter, approximately 8.5 months of daily data)
How to Use This Strategy
Best Market Conditions
Trending Markets: Works best in clearly trending markets where the cloud provides strong directional bias
Medium to Long-term Timeframes: Optimized for daily charts and higher timeframes
Volatile Assets: The breakout confirmation helps filter out weak signals in choppy markets
Risk Management
The strategy uses 100% equity allocation, suitable for backtesting single strategies
Consider reducing position size when implementing with real capital
Monitor the 25-period high breakout requirement as it may delay entries in fast-moving markets
Visual Elements
Green/Red Cloud: Shows bullish/bearish cloud conditions
Yellow Line: Conversion Line (Tenkan-sen)
Blue Line: Base Line (Kijun-sen)
Orange Line: 171-period EMA trend filter
Gray Line: Lagging Span (Chikou Span)
Important Considerations
Limitations
Lagging Nature: Like all Ichimoku strategies, signals may lag significant price moves
Whipsaw Risk: Extended periods of consolidation may generate false signals
Parameter Sensitivity: Custom parameters may not work equally well across all market conditions
Backtesting Notes
Results are based on historical data and past performance does not guarantee future results
The strategy includes realistic slippage and commission costs
Default settings are optimized for backtesting and may need adjustment for live trading
Risk Disclaimer
This strategy is for educational purposes only and should not be considered financial advice. Always conduct your own analysis and risk management before implementing any trading strategy. The unique parameter combinations used may not be suitable for all market conditions or trading styles.
Customization Options
Trade Mode: Switch between "Ichi" and "Cloud" signal generation
Short Trading: Option to enable short positions (disabled by default)
Date Range: Customize backtesting period
All Ichimoku Parameters: Fully customizable for different market conditions
This enhanced Ichimoku implementation provides a structured approach to trend following while maintaining the flexibility to adapt to different trading styles and market conditions.
TUFFYCALLS EZ TRENDLINES
📈 Trendline Indicator – Classic Diagonal Support & Resistance
This indicator automatically draws **diagonal trendlines** based on pivot points, forming **accurate support and resistance** zones in real-time. Perfect for identifying classic technical patterns such as **triangles, wedges, channels**, and more.
🔹 **Key Features:**
* Dynamic trendlines based on pivot levels
* Works across all timeframes — even on **1-second charts**
* Real-time updates for responsive trading
* **Price labels** included on trendlines for quick reference
* Set **custom alerts** for support/resistance breaks using TradingView’s Alert menu
Ideal for scalpers, intraday, and swing traders looking for **precision trend-based zones** in fast or slow markets.
IL - Inside Bar Detector - v01Indicator: IL - Inside Bar Detector - v01
Product: An Indigo Lynx Indicator
Copyright: © Indigo Lynx, v01, 2025-07-04
Description:
This indicator identifies Inside Bar candlestick patterns, which can signal
consolidation or indecision in the market, often preceding breakouts.
It offers multiple definitions for what constitutes an Inside Bar, an
optional volume filter, and differentiates markers and display for
bullish or bearish closing inside bars.
Features:
- Detects Inside Bar patterns.
- Configurable Inside Bar Definitions (via "Inside Bar Definition" input):
1. "Body (O/C)": Current O/C body within previous O/C body.
2. "Range (H/L - Standard)": Current H/L within previous H/L.
3. "Super (Range & Body)": Requires BOTH conditions.
- Optional Volume Filter: Inside Bar volume < SMA of volume.
- Display Toggles: Separate options to show/hide Bullish closing IBs
and Bearish closing IBs.
- Customizable Visuals: Bar color and optional plotshape markers (differentiated
for bullish/bearish closing inside bars using "BI" and "BRI" text).
- Data Logging: Option to log detected pattern details.
How to Use & Interpret:
- Configure definition, volume filter, and display options.
- Inside Bars are highlighted by bar color if their type (bullish/bearish closing) is enabled.
- Optional shapes: Green up-triangle (BI) for bullish-closing Inside Bars,
Red down-triangle (BRI) for bearish-closing Inside Bars, if enabled.
- Use with other analysis methods for confirmation.
Disclaimer: Trading involves substantial risk of loss and is not suitable for all investors.
Past performance is not indicative of future results.
Institutional Momentum Scanner [IMS]Institutional Momentum Scanner - Professional Momentum Detection System
Hunt explosive price movements like the professionals. IMS identifies maximum momentum displacement within 10-bar windows, revealing where institutional money commits to directional moves.
KEY FEATURES:
▪ Scans for strongest momentum in rolling 10-bar windows (institutional accumulation period)
▪ Adaptive filtering reduces false signals using efficiency ratio technology
▪ Three clear states: LONG (green), SHORT (red), WAIT (gray)
▪ Dynamic volatility-adjusted thresholds (8% ATR-scaled)
▪ Visual momentum flow with glow effects for signal strength
BASED ON:
- Pocket Pivot concept (O'Neil/Morales) applied to price momentum
- Adaptive Moving Average principles (Kaufman KAMA)
- Market Wizards momentum philosophy
- Institutional order flow patterns (5-day verification window)
HOW IT WORKS:
The scanner finds the maximum price displacement in each 10-bar window - where the market showed its hand. An adaptive filter (5-bar regression) separates real moves from noise. When momentum exceeds the volatility-adjusted threshold, states change.
IDEAL FOR:
- Momentum traders seeking explosive moves
- Swing traders (especially 4H timeframe)
- Position traders wanting institutional footprints
- Anyone tired of false breakout signals
Default parameters (10,5) optimized for 4H charts but adaptable to any timeframe. Remember: The market rewards patience and punishes heroes. Wait for clear signals.
"The market is honest. Are you?"
IL - Bull and Bear Engulfing Detector - v01Description:
This indicator is designed to identify and highlight Bullish and Bearish Engulfing
candlestick patterns on your chart. It offers a high degree of customization
through different engulfing definitions and an optional strictness filter, allowing
traders to tailor the detection to their specific criteria for these common reversal signals.
Features:
- Universal Detection: Identifies both Bullish Engulfing and Bearish Engulfing patterns.
- Configurable Engulfing Modes (via "Engulfing Definition Type" input):
1. "Body (O/C)": Traditional - current body engulfs previous body.
2. "Range (H/L)": Current H/L range engulfs previous H/L range.
3. "Body & Range (Super)": Requires BOTH "Body (O/C)" AND "Range (H/L)" conditions.
- Optional "Larger Body" Filter: Engulfing body must be strictly larger.
- Display Toggles: Options to show/hide Bullish and/or Bearish pattern signals.
- Customizable Colors: Bar colors for bullish/bearish patterns are user-configurable.
- Data Logging: Option to log detected pattern details to the Pine Logs.
- Visual Signals: Patterns marked with plot shapes and optional bar coloring.
How to Use & Interpret:
- Configure "Engulfing Definition Type", "Require Larger Engulfing Body?", display toggles,
and colors in the indicator settings.
- Enable "Log Detected Pattern Examples?" in "Debug Options" to capture data.
- BE = Bullish Engulfing (green triangle below bar). BRE = Bearish Engulfing (red triangle above).
- Use with other analysis methods for confirmation.
Disclaimer: Trading involves substantial risk of loss and is not suitable for all investors.
Past performance is not indicative of future results.
DR-SK A B C SK A B C - Target and Stop Loss Indicator for Trading
The "SK A B C" script is an advanced technical analysis tool designed to identify price targets and stop loss levels based on three input points (A, B, C) on the chart. The script calculates four potential targets (E, N, V, NT) based on the movement between the points, allowing for customization to suit different trading strategies. It also supports various stop loss methods, including Fixed Percentage, ATR-Based, and Swing High/Low.
Key Features:
Target Calculation (E, N, V, NT): The script calculates and displays potential targets (E, N, V, NT) based on the price movement between the input points (A, B, C).
Stop Loss Options:
Fixed Stop Loss: Based on a percentage of the price.
ATR-Based Stop Loss: Uses the Average True Range (ATR) for calculating the stop loss level.
Swing High/Low Stop Loss: Based on the most recent swing high or low.
Display Targets with Labels: Displays targets clearly on the chart, with options for price labels and boxes around the targets.
Full Customization: Customize colors, lines, and labels to fit your personal preferences.
Real-Time Alerts: Set up alerts to notify you when the price hits a target or stop loss level.
Summary Results Display: A table that shows the targets along with their prices and percentage distance from the current price.
How to Use the Script:
Set Input Points: Select three points (A, B, C) on the chart. The script will calculate the targets based on these points.
Choose Stop Loss Method: Select your preferred stop loss method (Fixed, ATR-Based, Swing High/Low).
Customize the Display: Customize the chart’s appearance by adjusting colors and other options.
Set Alerts: Enable alerts to be notified when the price reaches the targets or stop loss levels.
Notes:
The script follows basic technical analysis principles and helps traders accurately determine potential price targets using input points.
It provides flexibility through customizable stop loss methods and target options, making it a versatile and user-friendly tool.
CM EMA Crossover Price Probabilities customCM EMA Crossover Price Probabilities
This indicator combines Exponential Moving Average (EMA) crossovers with swing high/low detection to calculate and display the historical probability of price movements exceeding user-defined percentage thresholds. Unlike standard EMA crossover indicators, it quantifies the likelihood of specific price changes following bullish (fast EMA crossing above slow EMA) or bearish (fast EMA crossing below slow EMA) crossovers, providing traders with data-driven insights into potential price behavior.
How It Works:EMA Crossovers: Detects when the fast EMA crosses above (bullish) or below (bearish) the slow EMA, marking these events with chart labels.
Price Change Measurement: Measures the percentage price change from the crossover point to the next swing high (for bullish crossovers) or swing low (for bearish crossovers), using pivot point detection.
Probability Calculation: Analyses historical crossover data to compute the probability of price changes meeting or exceeding customizable percentage thresholds (e.g., 2.5%, 5%). Probabilities are displayed as labels on the last bar, showing both bullish and bearish outcomes.
Customization: Allows users to adjust EMA lengths, pivot lookback, historical data limit, and probability thresholds via inputs.
Inputs:Fast EMA Length (default: 20): Period for the fast EMA.
Slow EMA Length (default: 50): Period for the slow EMA.
Pivot Lookback (default: 15): Bars used to detect swing highs/lows.
Max Historical Crossovers (default: 100): Limits stored crossovers for performance.
Bin Thresholds (defaults: 2.5%, 4.6%, 8.4%, 21.0%, 100.0%): Five customizable percentage thresholds for probability calculations.
Usage:
Add the indicator to your chart and adjust inputs to match your trading style. Bullish and bearish crossover points are labeled on the chart, and probability labels appear in the top-right corner when sufficient data is available. Use these probabilities to assess the historical likelihood of price movements after EMA crossovers, aiding in trade planning or risk assessment.
Why It’s Useful:
By combining EMA crossovers with swing-based price change analysis, this indicator offers a unique perspective on market behaviour post-crossover. The customizable probability thresholds allow traders to focus on specific price movement targets, making it a versatile tool for studying trend strength and potential outcomes.
Notes:
Probabilities are based on historical data and do not predict future performance.
Set bin thresholds in ascending order for accurate probability calculations.
Designed for educational purposes to analyze EMA crossover patterns.
SimpleBias ProSimpleBias PRO - Advanced Multi-Timeframe Bias Analysis System
SimpleBias PRO is an advanced multi-timeframe bias analysis system, specifically designed for professional traders who need in-depth analysis and integrated risk management. A major upgrade from the free version, it features 6 separate table systems and sophisticated trading logic.
Key Features
Multi-Table Analysis System
SimpleBias Table - Core bias analysis across 8 timeframes
Logic Table - Advanced trading logic with confluence requirements
EMA Table - Trend analysis with customizable EMA system
Time Table - Session-based timing optimization
Time & Price Table - Combined temporal and price analysis
Risk Management Table - Automated position sizing calculations
Advanced EMA Integration
Multiple source options: Open, Close, High, Low
Dynamic color modes with bullish/bearish visualization
EMA direction analysis (RISE/FALL/NEUTRAL)
Customizable periods (1-9999) with plot capability
Professional line width control (1-5 pixels)
Smart Time-Based Analysis
Optimized trading hours for different timeframes
New York timezone integration for global markets
Time status indicators with visual confirmation
Session-specific filtering for 15m, 5m, 1m strategies
Enhanced Trading Logic
Multi-timeframe confluence requirements
Mid-timeframe bias analysis
EMA direction confirmation system
Time-based entry filtering
Separate conditions for scalping (1m), day trading (5m), and swing (15m)
Professional Risk Management
Balance input with validation ($100 - $10,000,000)
Risk percentage control (0.1% - 10.0%)
Stop loss configuration in pips (5-5000)
Automatic position sizing calculations
Real-time risk assessment display
How It Works
Bias Calculation
The indicator determines market bias by comparing the current timeframe's open price with the previous period's open price:
BULLISH: Current open > Previous open
BEARISH: Current open < Previous open
NEUTRAL: Current open = Previous open
Multi-Timeframe Confluence The system requires alignment across multiple timeframes before generating signals:
15-Minute Strategy:
4h, 1h, 15m bias alignment
1H mid-timeframe confirmation
EMA direction confirmation
Optimal time session validation
5-Minute Strategy:
1h, 15m, 5m bias alignment
15M mid-timeframe confirmation
EMA trend validation
Session timing optimization
1-Minute Strategy:
15m, 5m, 1m bias alignment
5M mid-timeframe confirmation
EMA direction sync
Precise timing windows
Risk Management Integration Automatic position sizing based on:
Account balance
Risk percentage
Stop loss distance
Current market conditions
Advanced Customization
Theme & Display Options
Light/Dark mode with automatic color adaptation
Transparent background options
Individual table toggle controls
Position control (Top/Middle/Bottom Right)
Text size optimization (Tiny/Small/Normal)
Professional Color Schemes
Separate bias color customization
Dynamic EMA coloring
Signal color differentiation
Theme-adaptive interface elements
Best Practices
For Professional Day Trading
Use 15-minute charts with 15M strategy
Focus on 4H and 1H bias alignment
Enable EMA confirmation
Trade during optimal NY sessions
Apply 0.25-0.5% risk per trade
For Advanced Scalping
Use 5-minute charts with 5M strategy
Require 1H and 15M bias confluence
Monitor EMA direction changes
Focus on high-probability time windows
Use tight risk management (0.1-0.25%)
For Swing Trading
Use 15-minute+ charts
Focus on higher timeframe bias alignment
Allow wider stop losses
Use longer EMA periods
Apply conservative risk (0.5-1%)
Technical Specifications
Pine Script Version: v6
Performance: Multi-table system with efficient rendering
Compatibility: All TradingView timeframes and instruments
Updates: Real-time bias detection and signal generation
Important Disclaimers
This indicator is for educational and analysis purposes only. Not financial advice - always conduct your own research and risk assessment. Past performance does not guarantee future results. Proper risk management is essential for all trading activities.
Two Poles Trend Finder MTF [BigBeluga]🔵 OVERVIEW
Two Poles Trend Finder MTF is a refined trend-following overlay that blends a two-pole Gaussian filter with a multi-timeframe dashboard. It provides a smooth view of price dynamics along with a clear summary of trend directions across multiple timeframes—perfect for traders seeking alignment between short and long-term momentum.
🔵 CONCEPTS
Two-Pole Filter: A smoothing algorithm that responds faster than traditional moving averages but avoids the noise of short-term fluctuations.
var float f = na
var float f_prev1 = na
var float f_prev2 = na
// Apply two-pole Gaussian filter
if bar_index >= 2
f := math.pow(alpha, 2) * source + 2 * (1 - alpha) * f_prev1 - math.pow(1 - alpha, 2) * f_prev2
else
f := source // Warm-up for first bars
// Shift state
f_prev2 := f_prev1
f_prev1 := f
Trend Detection Logic: Trend direction is determined by comparing the current filtered value with its value n bars ago (shifted comparison).
MTF Alignment Dashboard: Trends from 5 configurable timeframes are monitored and visualized as colored boxes:
• Green = Uptrend
• Magenta = Downtrend
Summary Arrow: An average trend score from all timeframes is used to plot an overall arrow next to the asset name.
🔵 FEATURES
Two-Pole Gaussian Filter offers ultra-smooth trend curves while maintaining responsiveness.
Multi-Timeframe Trend Detection:
• Default: 1H, 2H, 4H, 12H, 1D (fully customizable)
• Each timeframe is assessed independently using the same trend logic.
Visual Trend Dashboard positioned at the bottom-right of the chart with color-coded trend blocks.
Dynamic Summary Arrow shows overall market bias (🢁 / 🢃) based on majority of uptrends/downtrends.
Bold + wide trail plot for the filter value with gradient coloring based on directional bias.
🔵 HOW TO USE
Use the multi-timeframe dashboard to identify aligned trends across your preferred trading horizons.
Confirm trend strength or weakness by observing filter slope direction .
Look for dashboard consensus (e.g., 4 or more timeframes green] ) as confirmation for breakout, continuation, or trend reentry strategies.
Combine with volume or price structure to enhance entry timing.
🔵 CONCLUSION
Two Poles Trend Finder MTF delivers a clean and intuitive trend-following solution with built-in multi-timeframe awareness. Whether you’re trading intra-day or positioning for swing setups, this tool helps filter out market noise and keeps you focused on directional consensus.
TradersAID - Adaptive Smoothing Velocity ColoringTradersAID – Adaptive Smoothing Velocity Coloring
1. Overview
TradersAID – Adaptive Smoothing Velocity Coloring is a momentum visualization tool designed to highlight bullish or bearish pressure directly on price bars — helping you intuitively read directional strength and velocity shifts in any market or timeframe.
Using a Kalman-inspired estimation framework originally developed for aerospace and autonomous navigation, this tool analyzes the velocity of price movement and assigns a contextual candle color — offering a clean and readable way to interpret short-term flow.
Whether you’re navigating ranges or watching for trend continuation, this visualization simplifies complex data into actionable visual rhythm.
2. What It Does
Instead of measuring only price, the script focuses on price velocity — the rate of change over time. It computes this through a proprietary estimator that continuously adapts to volatility and momentum shifts.
The output is color-coded candles that reflect velocity dynamics:
• Green shades represent bullish acceleration
• Red shades reflect bearish velocity
• Neutral tones indicate fading momentum or transition phases
This allows you to quickly assess market tone:
• In strong trends: Watch for fading momentum (weaker colors)
• In ranges: Spot subtle shifts that hint at upcoming breakout direction
• Near potential reversals: Diverging velocity and price can stand out at a glance
3. How to Use It
• Momentum Insight:
Use color intensity to judge whether the current move is gaining or losing strength.
• Breakout Anticipation:
In sideways markets, shifting colors within the range can help anticipate which side may take control next.
• Divergence Reading:
Look for double tops or bottoms where price holds but velocity changes — often a hint that the move is maturing.
• Visual Confirmation Layer:
Combine with structural tools (like TradersAID Warning Dots or Trend Bands) to add a layer of momentum awareness.
4. Key Features
• Adaptive Velocity Model: Kalman-filter-like algorithm continuously tracks price velocity
• Gradient Candle Coloring: Smooth scale from deep red (strong bearish) to deep green (strong bullish)
• Flexible Sensitivity Modes:
o Slow – smoothest interpretation
o Regular – balanced tone
o Fast – more responsive
• RSI Normalization: Translates raw velocity into a familiar oscillator scale
• Full Overlay Integration: Candle coloring works seamlessly with other studies on the same chart
5. Technical Basis (Why It’s Closed Source)
The tool is built on a proprietary Unscented Kalman Filter implementation that estimates both price and its velocity simultaneously.
This advanced approach is rare in retail tools, drawing from real-time estimation techniques used in robotics and aerospace applications.
While the source remains closed to protect the performance logic and smoothing implementation, the core concepts — adaptive filtering, velocity-based analysis, and visual gradient output — are fully explained here for transparency and compliant understanding.
6. Settings
• Sensitivity Modes: Fast / Regular / Slow
• RSI Length: Adjustable to control the smoothness of velocity normalization
• Color Theme: Intuitive gradient from red (bearish) to green (bullish)
• Compatible Timeframes: Designed to work across all timeframes — no restriction
7. Disclaimer
This tool is for educational and informational purposes only. It does not offer financial advice, predict outcomes, or generate trading signals. Always use in conjunction with your own analysis and supporting systems.
Traders AID / Adaptive Smoothing Line (use on 1-week TF)TradersAID – Adaptive Smoothing Line (use on 1-week TF)
1. Overview
TradersAID – Adaptive Smoothing Line is a trend-following overlay designed to bring structure to noisy markets — especially on the 1-week chart, where clarity is crucial.
Instead of using conventional moving averages, this tool applies a Kalman-inspired smoothing method that adapts to changing price behavior.
Originally used in fields like robotics and autonomous driving, this filtering concept helps track directional flow without overreacting to minor fluctuations — making it easier to identify sustained moves or exhaustion patterns.
2. What It Does
The line continuously adapts to current market conditions by filtering volatility and directional flow through an internal estimator logic.
Unlike laggy moving averages, it does not simply average past prices — it adjusts dynamically based on how price behaves.
Key behaviors include:
• Directional slope that reflects trend strength
• Increased sensitivity during acceleration phases
• Stabilized flattening during sideways periods
This makes the trend easier to follow without being distracted by short-term chop.
3. How to Use It
• Trend Interpretation:
Use the line’s angle to judge momentum. Steep slopes show conviction, while flattening may signal transition or fading strength.
• Support & Resistance Context:
During trending phases, the line often acts as dynamic support or resistance — especially when combined with other tools.
• Volatility Filtering:
In consolidation, the line becomes smoother, helping reduce noise and simplify your view of structure.
• Layering Tool:
Use it as a visual foundation beneath more reactive tools like TradersAID Warning Dots or Velocity Coloring to stay grounded in context.
4. Key Features
• Adaptive Behavior: Responds to both price and volatility
• Three Modes:
o Slow for structure clarity
o Regular for balanced responsiveness
o Fast for shorter-term context
• Overlay Design: Plots directly on price for seamless interpretation
• Minimalist Output: Clean, unobtrusive line — no clutter
5. Technical Basis (Why It’s Closed Source)
This tool uses a custom smoothing technique based on Kalman-inspired logic, tuned specifically for longer-term trend structure.
While not a full Kalman implementation, the core idea is drawn from systems that track state under uncertainty — offering stability without lagging behind price.
The algorithm adapts continuously to live market input, producing a smooth yet responsive curve that reflects trend direction and change in a visually intuitive way.
As this smoothing mechanism is not available in open-source scripts and is part of a broader proprietary system, the code remains closed to protect its originality and performance edge.
6. Settings
• Mode Selection: Fast / Regular / Slow
• Styling Controls: Color, line width, smoothing curve
• Frame Lock:
✅ This tool is designed to work exclusively on the 1-week timeframe.
7. Disclaimer
This script is for educational and informational purposes only. It does not provide financial advice or generate trading signals. Use with your own judgment and supporting tools.
TradersAID / Adaptive Smoothing Channel (use on 1W chart)TradersAID – Adaptive Smoothing Channel (use on 1-Week chart)
Overview
TradersAID – Adaptive Smoothing Channel is a two-line price overlay designed to help traders interpret trend structure and shifting momentum zones on the 1-week chart only.
Unlike traditional moving averages or fixed smoothing methods, this tool uses an adaptive approach inspired by Kalman filtering — a concept widely used in robotics and control systems to track signals in noisy environments. Applied to price, this allows the band to adapt to directional flow and volatility while filtering out distracting short-term fluctuations.
1.What It Does
This tool builds a dynamic corridor around price using:
• A faster line that follows near-term directional movement
• A slower line that anchors broader market structure
Together, they form a responsive band that:
• Tilts with trend direction (via slope)
• Expands or contracts with volatility
• Fills the space between to show directional rhythm
It’s especially useful for observing how price moves within sustained trends or compression zones, helping traders visually interpret market structure with more clarity.
2. How to Use It
• Trend Structure:
Follow the slope of the band to understand overall direction. A narrowing band may indicate consolidation; a widening band may reflect strong follow-through.
• Momentum Compression Zones:
Watch for tightening distance between the lines — this may signal the market is preparing for a structural transition or breakout.
• Clarity Layer:
Overlay this tool with others (e.g. TradersAID Warning Dots) to reduce noise and improve decision context.
3. Key Features
• Dual Adaptive Lines: One fast, one slow — capturing different time dynamics
• Shaded Fill Zone: Highlights directional bias and rhythm
• 3 Reaction Modes: Slow / Regular / Fast for different sensitivities
• Overlay Style: Plots directly on price
• Minimalist Layout: Clean visual language
4. Technical Basis (Why It’s Closed Source)
This tool is based on a custom smoothing logic inspired by Kalman filtering, adapted specifically for charting market structure.
While it does not replicate a full Kalman system, it borrows key principles: dynamically adjusting to noisy input while maintaining structural clarity.
The algorithm was developed internally to provide a visual layer that integrates into the broader TradersAID analysis system — offering something distinct from public indicators. Its behavior, flexibility, and integration were designed to serve advanced structural analysis, and as such, the script is closed to protect proprietary logic and intellectual property.
5. Settings
• Mode Selector: Fast / Regular / Slow
• Color Fill Toggle & Styling
• Frame Lock:
✅ This script is built to work exclusively on the 1-week timeframe.
6. Disclaimer
This tool is for educational and informational purposes only. It does not offer financial advice or generate trading signals. Always use with your own strategy and discretion.
Frahm Factor Position Size CalculatorThe Frahm Factor Position Size Calculator is a powerful evolution of the original Frahm Factor script, leveraging its volatility analysis to dynamically adjust trading risk. This Pine Script for TradingView uses the Frahm Factor’s volatility score (1-10) to set risk percentages (1.75% to 5%) for both Margin-Based and Equity-Based position sizing. A compact table on the main chart displays Risk per Trade, Frahm Factor, and Average Candle Size, making it an essential tool for traders aligning risk with market conditions.
Calculates a volatility score (1-10) using true range percentile rank over a customizable look-back window (default 24 hours).
Dynamically sets risk percentage based on volatility:
Low volatility (score ≤ 3): 5% risk for bolder trades.
High volatility (score ≥ 8): 1.75% risk for caution.
Medium volatility (score 4-7): Smoothly interpolated (e.g., 4 → 4.3%, 5 → 3.6%).
Adjustable sensitivity via Frahm Scale Multiplier (default 9) for tailored volatility response.
Position Sizing:
Margin-Based: Risk as a percentage of total margin (e.g., $175 for 1.75% of $10,000 at high volatility).
Equity-Based: Risk as a percentage of (equity - minimum balance) (e.g., $175 for 1.75% of ($15,000 - $5,000)).
Compact 1-3 row table shows:
Risk per Trade with Frahm score (e.g., “$175.00 (Frahm: 8)”).
Frahm Factor (e.g., “Frahm Factor: 8”).
Average Candle Size (e.g., “Avg Candle: 50 t”).
Toggles to show/hide Frahm Factor and Average Candle Size rows, with no empty backgrounds.
Four sizes: XL (18x7, large text), L (13x6, normal), M (9x5, small, default), S (8x4, tiny).
Repositionable (9 positions, default: top-right).
Customizable cell color, text color, and transparency.
Set Frahm Factor:
Frahm Window (hrs): Pick how far back to measure volatility (e.g., 24 hours). Shorter for fast markets, longer for chill ones.
Frahm Scale Multiplier: Set sensitivity (1-10, default 9). Higher makes the score jumpier; lower smooths it out.
Set Margin-Based:
Total Margin: Enter your account balance (e.g., $10,000). Risk auto-adjusts via Frahm Factor.
Set Equity-Based:
Total Equity: Enter your total account balance (e.g., $15,000).
Minimum Balance: Set to the lowest your account can go before liquidation (e.g., $5,000). Risk is based on the difference, auto-adjusted by Frahm Factor.
Customize Display:
Calculation Method: Pick Margin-Based or Equity-Based.
Table Position: Choose where the table sits (e.g., top_right).
Table Size: Select XL, L, M, or S (default M, small text).
Table Cell Color: Set background color (default blue).
Table Text Color: Set text color (default white).
Table Cell Transparency: Adjust transparency (0 = solid, 100 = invisible, default 80).
Show Frahm Factor & Show Avg Candle Size: Check to show these rows, uncheck to hide (default on).
Dividers Timeframe/Session/Calendar-Based [ARTech]Dividers Timeframe/Session/Calendar-Based
This indicator provides customizable visual dividers for multiple timeframes, trading sessions, and calendar-based periods (daily, weekly, monthly). It helps traders visually separate chart areas by key time boundaries without cluttering the chart with price lines.
Key Features:
Multi-Timeframe Dividers: Select up to 4 timeframes (e.g., 60 min, 4 hours, daily, weekly) to display customizable lines marking the start of each timeframe’s candle.
Session Dividers: Define up to 4 trading sessions with user-defined time zones, colors, and active weekdays. The indicator highlights the session’s highest and lowest price range using a box, and compares the session’s opening and closing prices. Based on this comparison, it displays a green or red emoji to indicate bullish or bearish sessions, making it easy to identify session momentum visually.
Calendar-Based Dividers: Enable daily, weekly, or monthly background color zones, with individual toggles and color settings for each day, week, or month. Perfect for visually distinguishing trading periods.
Why use this indicator?
Divider Indicator helps keep your chart organized by visually segmenting timeframes, sessions, and calendar periods, aiding in better analysis of price action relative to important time boundaries.
How to Use
███████ Timezone ███████
A valid timezone name exactly as it appears in the chart’s lower-right corner (e.g. New York, London).
A valid UTC offset in ±H:MM or ±HH:MM format. Hours: 0–14 (zero-padded or not, e.g. +1:30, +01:30, -0:00). Minutes: Must be 00, 15, 30, or 45.
Examples;
UTC → ✅ Valid
Exchange → ✅ Valid
New York → ✅ Valid
London → ✅ Valid
Berlin → ✅ Valid
America/New York → ❌ Invalid. (Use "New York" instead)
+1:30 → ✅ Valid offset with single-digit hour
+01:30 → ✅ Valid offset with zero-padded hour
-05:00 → ✅ Valid negative offset
-0:00 → ✅ Valid zero offset
+1:1 → ❌ Invalid (minute must be 00, 15, 30, or 45)
+2:50 → ❌ Invalid (minute must be 00, 15, 30, or 45)
+15:00 → ❌ Invalid (hour must be 14 or below)
███████ Timeframe ███████
Use this section to display vertical divider lines at the opening of higher timeframe candles (e.g., 1H, 4H, Daily, Weekly). This helps visually separate price action according to larger market structures.
1. Enable a Timeframe:
Turn on one or more timeframes (e.g., 60, 240, D, W) by checking their respective toggle boxes.
2. Lines Mark Candle Opens:
Each active timeframe will draw a vertical line at the start of its candle , making it easier to align intraday moves with larger timeframe shifts.
3. Customize Line Style:
For each timeframe, you can individually set:
Line Style: Solid, dashed, or dotted.
Line Width: From 1 to 10 pixels.
Line Color: Pick any color to match your chart theme.
Opacity: Use transparent colors to avoid overwhelming the chart.
4. Use Multiple Timeframes Together:
You can enable multiple timeframe dividers simultaneously. To maintain clarity:
Use distinct colors for each timeframe.
Use thinner or dotted lines for lower timeframes and bolder lines for higher ones.
Match line style and color intensity to reflect timeframe importance. (e.g., a thick green solid line for Weekly, a thin gray dotted line for 1H)
5. Visual Tip:
These dividers are especially useful for identifying higher timeframe candle opens during intraday trading, spotting breaks above/below previous candle ranges, or aligning session-based strategies with higher timeframe trends.
███████ Session ███████
Use this section to visually highlight specific trading sessions (e.g., London, New York, Tokyo, Sydney) on your chart using time zones, session ranges, and optional weekday filters. This helps focus your analysis on active market hours.
1. Enable a Session:
Activate up to 4 separate trading sessions. Each session can be named (e.g., "London") and customized independently.
2. Set Session Time and Days:
Define session time using the hhmm-hhmm format. (e.g., 0800-1700)
Select which days of the week the session applies to (Sunday through Saturday)
Set your preferred time zone (UTC, Exchange, etc.) from the global settings.
3. Session Box Drawing:
For each active session, the indicator will:
Draw a background-colored box from the session’s start to end time.
Stretch the box to fit the highest and lowest price within that time window.
Draw an outline using customizable border style and width.
4. Session Labels and Directional Hints:
Optionally display the session’s name as a label.
The indicator compares the session’s opening and closing prices . Based on the result:
📈 Green emoji shows a bullish session (close >= open)
📉 Red emoji shows a bearish session (close < open)
5. Display Options:
Show all sessions, only the last session, or a specific number of previous sessions.
Customize label size, location (top/bottom), and whether it appears inside or outside the box.
Adjust background opacity to blend the sessions neatly into your chart.
6. Visual Tip:
Session boxes are particularly useful for:
Spotting repeated highs/lows during active trading hours.
Recognizing session-based breakouts or consolidations.
Comparing performance across different markets and time zones.
███████ Calendar-Based ███████
This section helps you visually segment your chart based on calendar periods: daily, weekly, and monthly. You can enable background color highlighting for individual days, weeks, or months to better track price movements within these time frames.
1. Enable Daily, Weekly, or Monthly Highlighting:
Toggle on the options for Daily, Weekly, and/or Monthly highlighting according to your needs.
2. Select Specific Days, Weeks, or Months:
For Daily, enable any combination of days (up to 7) to color-code.
For Weekly, enable up to 5 weeks per month to cover partial weeks.
For Monthly, enable up to 12 months with individual toggles and colors.
3. Customize Colors for Each Period:
Assign distinct colors to each day, week, or month for easy differentiation. Choose hues that stand out but avoid colors that are too close in tone for adjacent periods.
4. Background Opacity:
Adjust the opacity level of the background coloring to ensure it complements your chart without obscuring price data.
5. Handling Partial Weeks and Overlaps:
The weekly highlighting accounts for months that span 4 to 6 weeks by allowing toggles up to 5 weeks, including weeks that may partially overlap with previous or next months.
6. Visual Tip:
Calendar-based backgrounds are excellent for:
Quickly identifying price behavior within specific calendar units.
Comparing price action across days, weeks, or months.
Spotting seasonal trends or recurring patterns tied to calendar cycles.
Pivot Swings w Table Pivot Swings w Table — Intraday Structure & Range Analyzer
This indicator identifies key pivot highs and lows on the chart and highlights market structure shifts using a real-time table display. It helps traders visually confirm potential trade setups by tracking unbroken swing points and measuring the range between the most recent pivots.
🔍 Features:
🔹 Automatic Pivot Detection using configurable left/right bar logic.
🔹 Unbroken Pivot Filtering — only pivots that haven't been invalidated by price are displayed.
🔹 Dynamic Range Table with:
Latest valid Pivot High and Pivot Low
Total Range Width
Upper & Lower 25% range thresholds (useful for value/imbalance analysis)
🔹 Trend-Based Color Coding — the table background changes based on which pivot (high or low) occurred more recently:
🟥 Red: Downward bias (last pivot was a lower high)
🟩 Green: Upward bias (last pivot was a higher low)
🔹 Optional extension of pivot levels to the right of the chart for support/resistance confluence.
⚙️ How to Use:
Adjust the Left Bars and Right Bars inputs to fine-tune how swings are defined.
Look for price reacting near the Upper or Lower 25% zones to anticipate mean reversion or breakout setups.
Use the trend color of the table to confirm directional bias, especially useful during consolidation or retracement periods.
💡 Best For:
Intraday or short-term swing traders
Traders who use market structure, support/resistance, or trend-based strategies
Those looking to avoid low-quality trades in tight ranges
✅ Built for overlay use on price charts
📈 Works on all symbols and timeframes
🧠 No repainting — pivots are confirmed with completed bars
Multi-Timeframe PivotDescription:
This script provides an advanced tool for multi-timeframe pivot point
analysis. It identifies swing points based on a candle's relationship to
its neighbors. The default strength settings of 1 align with the Inner
Circle Trader (ICT) concept of market structure.
The ICT concept defines a swing point based on a simple 3-candle pattern:
- A swing high is a candle where the candles to the immediate left and right
both have lower highs.
- A swing low is a candle where the candles to the immediate left and right
both have higher lows.
A key feature is its ability to accurately calculate and translate pivot
points from up to five higher timeframes (HTFs) and display them
precisely on a lower timeframe (LTF) chart.
NOTE: This indicator is designed to show HTF data on an LTF chart.
If you select a timeframe in the settings that is lower than your
current chart's timeframe, it will show pivots for the chart's
timeframe instead.
Core Features:
- Up to five independent higher timeframes.
- Per-timeframe customization for pivot strength (left/right bars) and color.
- Optional "Watchlines" that project the price of each pivot forward,
complete with a text label identifying the timeframe.
- An optional "Alignment Model" that colors the background when price is
aligned across all active timeframes (requires at least 2 TFs to be enabled).
Default State:
For a clean initial application, the Watchlines and Alignment Model features
are disabled by default but can be enabled in the settings.
Tsallis Entropy Market RiskTsallis Entropy Market Risk Indicator
What Is It?
The Tsallis Entropy Market Risk Indicator is a market analysis tool that measures the degree of randomness or disorder in price movements. Unlike traditional technical indicators that focus on price patterns or momentum, this indicator takes a statistical physics approach to market analysis.
Scientific Foundation
The indicator is based on Tsallis entropy, a generalization of traditional Shannon entropy developed by physicist Constantino Tsallis. The Tsallis entropy is particularly effective at analyzing complex systems with long-range correlations and memory effects—precisely the characteristics found in crypto and stock markets.
The indicator also borrows from Log-Periodic Power Law (LPPL).
Core Concepts
1. Entropy Deficit
The primary measurement is the "entropy deficit," which represents how far the market is from a state of maximum randomness:
Low Entropy Deficit (0-0.3): The market exhibits random, uncorrelated price movements typical of efficient markets
Medium Entropy Deficit (0.3-0.5): Some patterns emerging, moderate deviation from randomness
High Entropy Deficit (0.5-0.7): Strong correlation patterns, potentially indicating herding behavior
Extreme Entropy Deficit (0.7-1.0): Highly ordered price movements, often seen before significant market events
2. Multi-Scale Analysis
The indicator calculates entropy across different timeframes:
Short-term Entropy (blue line): Captures recent market behavior (20-day window)
Long-term Entropy (green line): Captures structural market behavior (120-day window)
Main Entropy (purple line): Primary measurement (60-day window)
3. Scale Ratio
This measures the relationship between long-term and short-term entropy. A healthy market typically has a scale ratio above 0.85. When this ratio drops below 0.85, it suggests abnormal relationships between timeframes that often precede market dislocations.
How It Works
Data Collection: The indicator samples price returns over specific lookback periods
Probability Distribution Estimation: It creates a histogram of these returns to estimate their probability distribution
Entropy Calculation: Using the Tsallis q-parameter (typically 1.5), it calculates how far this distribution is from maximum entropy
Normalization: Results are normalized against theoretical maximum entropy to create the entropy deficit measure
Risk Assessment: Multiple factors are combined to generate a composite risk score and classification
Market Interpretation
Low Risk Environments (Risk Score < 25)
Market is functioning efficiently with reasonable randomness
Price discovery is likely effective
Normal trading and investment approaches appropriate
Medium Risk Environments (Risk Score 25-50)
Increasing correlation in price movements
Beginning of trend formation or momentum
Time to monitor positions more closely
High Risk Environments (Risk Score 50-75)
Strong herding behavior present
Market potentially becoming one-sided
Consider reducing position sizes or implementing hedges
Extreme Risk Environments (Risk Score > 75)
Highly ordered market behavior
Significant imbalance between buyers and sellers
Heightened probability of sharp reversals or corrections
Practical Application Examples
Market Tops: Often characterized by gradually increasing entropy deficit as momentum builds, followed by extreme readings near the actual top
Market Bottoms: Can show high entropy deficit during capitulation, followed by normalization
Range-Bound Markets: Typically display low and stable entropy deficit measurements
Trending Markets: Often show moderate entropy deficit that remains relatively consistent
Advantages Over Traditional Indicators
Forward-Looking: Identifies changing market structure before price action confirms it
Statistical Foundation: Based on robust mathematical principles rather than empirical patterns
Adaptability: Functions across different market regimes and asset classes
Noise Filtering: Focuses on meaningful structural changes rather than price fluctuations
Limitations
Not a Timing Tool: Signals market risk conditions, not precise entry/exit points
Parameter Sensitivity: Results can vary based on the chosen parameters
Historical Context: Requires some historical perspective to interpret effectively
Complementary Tool: Works best alongside other analysis methods
Enjoy :)
ATR Stop-Loss with Fibonacci Take-Profit [jpkxyz]ATR Stop-Loss with Fibonacci Take-Profit Indicator
This comprehensive indicator combines Average True Range (ATR) volatility analysis with Fibonacci extensions to create dynamic stop-loss and take-profit levels. It's designed to help traders set precise risk management levels and profit targets based on market volatility and mathematical ratios.
Two Operating Modes
Default Mode (Rolling Levels)
In default mode, the indicator continuously plots evolving stop-loss and take-profit levels based on real-time price action. These levels update dynamically as new bars form, creating rolling horizontal lines across the chart. I use this mode primarily to plot the rolling ATR-Level which I use to trail my Stop-Loss into profit.
Characteristics:
Levels recalculate with each new bar
All selected Fibonacci levels display simultaneously
Uses plot() functions with trackprice=true for price tracking
Custom Anchor Mode (Fixed Levels)
This is the primary mode for precision trading. You select a specific timestamp (typically your entry bar), and the indicator locks all calculations to that exact moment, creating fixed horizontal lines that represent your actual trade levels.
Characteristics:
Entry line (blue) marks your anchor point
Stop-loss calculated using ATR from the anchor bar
Fibonacci levels projected from entry-to-stop distance
Lines terminate when price breaks through them
Includes comprehensive alert system
Core Calculation Logic
ATR Stop-Loss Calculation:
Stop Loss = Entry Price ± (ATR × Multiplier)
Long positions: SL = Entry - (ATR × Multiplier)
Short positions: SL = Entry + (ATR × Multiplier)
ATR uses your chosen smoothing method (RMA, SMA, EMA, or WMA)
Default multiplier is 1.5, adjustable to your risk tolerance
Fibonacci Take-Profit Projection:
The distance from entry to stop-loss becomes the base unit (1.0) for Fibonacci extensions:
TP Level = Entry + (Entry-to-SL Distance × Fibonacci Ratio)
Available Fibonacci Levels:
Conservative: 0.618, 1.0, 1.618
Extended: 2.618, 3.618, 4.618
Complete range: 0.0 to 4.764 (23 levels total)
Multi-Timeframe Functionality
One of the indicator's most powerful features is timeframe flexibility. You can analyze on one timeframe while using stop-loss and take-profit calculations from another.
Best Practices:
Identify your entry point on execution timeframe
Enable "Custom Anchor" mode
Set anchor timestamp to your entry bar
Select appropriate analysis timeframe
Choose relevant Fibonacci levels
Enable alerts for automated notifications
Example Scenario:
Analyse trend on 4-hour chart
Execute entry on 5-minute chart for precision
Set custom anchor to your 5-minute entry bar
Configure timeframe setting to "4h" for swing-level targets
Select appropriate Fibonacci Extension levels
Result: Precise entry with larger timeframe risk management
Visual Intelligence System
Line Behaviour in Custom Anchor Mode:
Active levels: Lines extend to the right edge
Hit levels: Lines terminate at the breaking bar
Entry line: Always visible in blue
Stop-loss: Red line, terminates when hit
Take-profits: Green lines (1.618 level in gold for emphasis)
Customisation Options:
Line width (1-4 pixels)
Show/hide individual Fibonacci levels
ATR length and smoothing method
ATR multiplier for stop-loss distance