Gold Friday Anomaly StrategyThis script implements the " Gold Friday Anomaly Strategy ," a well-known historical trading strategy that leverages the gold market's behavior from Thursday evening to Friday close. It is a backtesting-focused strategy designed to assess the historical performance of this pattern. Traders use this anomaly as it captures a recurring market tendency observed over the years.
What It Does:
Entry Condition: The strategy enters a long position at the beginning of the Friday trading session (Thursday evening close) within the defined backtesting period.
Exit Condition: Friday evening close.
Backtesting Controls: Allows users to set custom backtesting periods to evaluate strategy performance over specific date ranges.
Key Features:
Custom Backtest Periods: Easily configurable inputs to set the start and end date of the backtesting range.
Fixed Slippage and Commission Settings: Ensures realistic simulation of trading conditions.
Process Orders on Close: Backtesting is optimized by processing orders at the bar's close.
Important Notes:
Backtesting Only: This script is intended purely for backtesting purposes. Past performance is not indicative of future results.
Live Trading Recommendations: For live trading, it is highly recommended to use limit orders instead of market orders, especially during evening sessions, as market order slippage can be significant.
Default Settings:
Entry size: 10% of equity per trade.
Slippage: 1 tick.
Commission: 0.05% per trade.
Ciclos
Cabal Dev IndicatorThis is a TradingView Pine Script (version 6) that creates a technical analysis indicator called the "Cabal Dev Indicator." Here's what it does:
1. Core Functionality:
- It calculates a modified version of the Stochastic Momentum Index (SMI), which is a momentum indicator that shows where the current close is relative to the high/low range over a period
- The indicator combines elements of stochastic oscillator calculations with exponential moving averages (EMA)
2. Key Components:
- Uses configurable input parameters for:
- Percent K Length (default 15)
- Percent D Length (default 3)
- EMA Signal Length (default 15)
- Smoothing Period (default 5)
- Overbought level (default 40)
- Oversold level (default -40)
3. Calculation Method:
- Calculates the highest high and lowest low over the specified period
- Finds the difference between current close and the midpoint of the high-low range
- Applies EMA smoothing to both the range and relative differences
- Generates an SMI value and further smooths it using a simple moving average (SMA)
- Creates an EMA signal line based on the smoothed SMI
4. Visual Output:
- Plots the smoothed SMI line in green
- Plots an EMA signal line in red
- Shows overbought and oversold levels as gray horizontal lines
- Fills the areas above the overbought level with light red
- Fills the areas below the oversold level with light green
This indicator appears designed to help traders identify potential overbought and oversold conditions in the market, as well as momentum shifts, which could be used for trading decisions.
Would you like me to explain any specific part of the indicator in more detail?
Aeon FluxAeon Flux visualizes rolling cumulative realized volatility, as a signal-generating leading indicator.
'Realized volatility' is shorthand for the metric's true output: entropy . The uniformity (or lack of uniformity) of price and volume distributions over a rolling cumulative period, normalized across the asset's full history.
Entropy = x⋅log2(x)−(1−x)⋅log2(1−x)
AEON FLUX VISUALIZES TIME CYCLES
Aeon Flux distills any asset's cyclical pendulum-like behavior, from bull to bear and vice versa, in a visualization that surfaces and isolates the pendulum shift.
As such, Aeon Flux may be the first metric to automate visualization of time cycles.
Time cycles are a soft science and esoteric concept in markets: an opinion, hard to prove or disprove.
They're ultimately just cycles of accumulation & distribution, that tend to recur at rough consistent intervals.
(Aeon Flux does not measure accumulation & distribution directly, those forces are merely implied.)
ENTROPY AS A LEADING INDICATOR
The transitions between state (from bullish to bearish & vice versa) are often good swing entries & exits, across a wide range of high cap risk markets.
ENTROPY AS A DISTRIBUTION MONITOR
Aeon Flux has a track record of detecting higher timeframe macro distribution on the BTC Index.
The signal: two cycles in a row of lower highs, where the cycle high (the highest oscillator print achieved that cycle) is lower than the previous cycle's high.
Invalidation: if the second cycle in a row of lower highs touches the green AND red target areas on its way up, that demonstrates robust volatility, and the distribution signal is invalidated.
ALERTS & NOTIFICATIONS
Alerts are enabled for swing long & short signals. Automating alerts to monitor distribution are a potential enhancement for future iterations of the script.
Bitcoin Value Capture HeatmapBTC Value Capture Heatmap answers a question originally posed by Willy Woo:
"How much pressure on Bitcoin's market cap does one dollar of purchasing power exert?"
The higher the print, the more market cap grows per dollar invested -- adjusted for global M2 growth.
Bitcoin Value Capture Heatmap = ( market cap / global M2 ) / realized cap
A NOVEL INGREDIENT REVEALS A UNIQUE USE CASE
Adjusting bitcoin's market cap for global M2 growth sharpens a legacy metric with a normalizing factor that 'stabilizes' its view across cycles.
The metric peaked at identical levels (4.2), three bitcoin bull markets in a row. On the same day bitcoin price volatility peaked for the cycle, every time.
One might naturally expect this to coincide with cycle tops. But it doesn't.
It precede's cycle's tops: in a consistent, very specific way, that predisposing a unique use case.
BITCOIN'S VOLATILTY TOP
The metric's true use case only comes into clear focus when paired with an unrelated insight:
Whether in distribution (in Spring 2021) or a parabolic blow off top (2017 & 2013), each of the last 3 bitcoin cycle tops shows tight consistent adherence to the Wykoff Distribution Schematic.
"But Wykoff schematics apply to distribution tops, not to blow off tops."
A closer look at the last 15-20 years of parabolic blow off tops, across all asset classes , viewed through a Wykoff lens, reveals recurring tight adherence to Wykoff's Distribution Schematic.
Including (and especially) BTC's parabolic top in Dec 2017; BTC's parabolic top in 2013; and ETH's blow off top in Jan 2018.
In our age of automation, this makes sense. Wykoff's schematics mirror the timeless archetypal goal of his 'Composite Operator': max pain for all other market participants.
A process that lends itself to automation, optimized a bit more each passing year.
Peak cycle volatility maps directly to the Wykoff Distribution Schematic's 'Buying Climax'.
An event that preceded parabolic cycle tops, by about 2 weeks.
Future BTC parabolas (should they recur) would come at exponentially higher market caps, so they may take longer to unfold -- I don't take the 2 week pattern too seriously.
But Parabolic Distribution as an emergent archetypal market structure is likely encoded.
PUTTING IT ALL TOGETHER
Bitcoin Value Capture Heatmap signals peak cycle volatility, on a daily close of 4.2 on the metric's Y axis. It has never reached that level twice in the same cycle.
Awareness that:
(a) peak volatility for the cycle has likely been reached, and
(b) peak volatility has a history of tightly preceding bitcoin cycle tops, can
(c) empowers traders with a data-driven 'guide post' to their likely exactly location in an increasingly archetypal topping process.
SPECIFIC USES IN AN EXIT STRATEGY
When the Heatmap's signal level is reached, one might (for instance):
* Hedge, since bitcoin is likely closing in on its cycle top, OR
* Start to DCA out, over a pre-planned time period OR
* Rotate up the risk curve, since BTC probably doesn't have much upside left, OR
* Wait for acceptance one leg higher, which (consistent with Wykoff logic) is the likeliest place to expect an actual cycle top.
Though the ratio (in the past) touched 4.2 each cycle, a closer look shows subtly lower peaks per cycle, like most other on-chain cycle oscillators.
Extrapolating out, one might expect bitcoin's next top on volatility to print on any touch of 4.0 or higher.
Or one might give it more room to run, consistent with record institutiional flows this cycle.
Alerts are enabled for both options.
The metric works on any timeframe, but should only be used on the 1D chart.
ADM Indicator [CHE] Comprehensive Description of the Three Market Phases for TradingView
Introduction
Financial markets often exhibit patterns that reflect the collective behavior of participants. Recognizing these patterns can provide traders with valuable insights into potential future price movements. The ADM Indicator is designed to help traders identify and capitalize on these patterns by detecting three primary market phases:
1. Accumulation Phase
2. Manipulation Phase
3. Distribution Phase
This indicator places labels on the chart to signify these phases, aiding traders in making informed decisions. Below is an in-depth explanation of each phase, including how the ADM Indicator detects them.
1. Accumulation Phase
Definition
The Accumulation Phase is a period where informed investors or institutions discreetly purchase assets before a potential price increase. During this phase, the price typically moves within a confined range between established highs and lows.
Characteristics
- Price Range Bound: The asset's price stays within the previous high and low after a timeframe change.
- Low Volatility: Minimal price movement indicates a balance between buyers and sellers.
- Steady Volume: Trading volume may remain relatively constant or show slight increases.
- Market Sentiment: General market interest is low, as the accumulation is not yet apparent to the broader market.
Detection with ADM Indicator
- Criteria: An accumulation is detected when the price remains within the previous high and low after a timeframe change.
- Indicator Action: At the end of the period, if accumulation has occurred, the indicator places a label "Accumulation" on the chart.
- Visual Cues: A yellow semi-transparent background highlights the accumulation phase, enhancing visual recognition.
Implications for Traders
- Entry Opportunity: Consider preparing for potential long positions before a possible upward move.
- Risk Management: Use tight stop-loss orders below the support level due to the defined trading range.
2. Manipulation Phase
Definition
The Manipulation Phase, also known as the Shakeout Phase, occurs when dominant market players intentionally move the price to trigger stop-loss orders and create panic among less-informed traders. This action generates liquidity and better entry prices for large positions.
Characteristics
- False Breakouts: The price moves above the previous high or below the previous low but quickly reverses.
- Increased Volatility: Sharp price movements occur without fundamental reasons.
- Stop-Loss Hunting: The price targets common stop-loss areas, triggering them before reversing.
- Emotional Trading: Retail traders may react impulsively, leading to poor trading decisions.
Detection with ADM Indicator
- Manipulation Up:
- Criteria: Detected when the price rises above the previous high and then falls back below it.
- Indicator Action: Places a label "Manipulation Up" on the chart at the point of detection.
- Manipulation Down:
- Criteria: Detected when the price falls below the previous low and then rises back above it.
- Indicator Action: Places a label "Manipulation Down" on the chart at the point of detection.
- Visual Cues:
- Manipulation Up: Blue background highlights the phase.
- Manipulation Down: Orange background highlights the phase.
Implications for Traders
- Caution Advised: Be wary of false signals and avoid overreacting to sudden price changes.
- Preparation for Next Phase: Use this phase to anticipate potential distribution and adjust strategies accordingly.
3. Distribution Phase
Definition
The Distribution Phase occurs when the institutions or informed investors who accumulated positions start selling to the general market at higher prices. This phase often follows a Manipulation Phase and may signal an impending trend reversal.
Characteristics
- Price Reversal: The price moves in the opposite direction of the prior manipulation.
- High Trading Volume: Increased selling activity as large players offload positions.
- Trend Weakening: The previous trend loses momentum, indicating a potential shift.
- Market Sentiment Shift: Optimism fades, and uncertainty or pessimism may emerge.
Detection with ADM Indicator
- Distribution Up:
- Criteria: Detected after a verified Manipulation Up when the price subsequently falls below the previous low.
- Indicator Action: Places a label "Distribution Up" on the chart.
- Distribution Down:
- Criteria: Detected after a verified Manipulation Down when the price subsequently rises above the previous high.
- Indicator Action: Places a label "Distribution Down" on the chart.
- Visual Cues:
- Distribution Up: Purple background highlights the phase.
- Distribution Down: Maroon background highlights the phase.
Implications for Traders
- Exit Signals: Consider closing long positions if in a Distribution Up phase.
- Short Selling Opportunities: Potential to enter short positions anticipating a downtrend.
Using the ADM Indicator on TradingView
Indicator Overview
The ADM Indicator automates the detection of Accumulation, Manipulation, and Distribution phases by analyzing price movements relative to previous highs and lows on a selected timeframe. It provides visual cues and labels on the chart, helping traders quickly identify the current market phase.
Features
- Multi-Timeframe Analysis: Choose from auto, multiplier, or manual timeframe settings.
- Visual Labels: Clear labeling of market phases directly on the chart.
- Background Highlighting: Distinct background colors for each phase.
- Customizable Settings: Adjust colors, styles, and display options.
- Period Separators: Optional separators delineate different timeframes.
Interpreting the Indicator
1. Accumulation Phase
- Detection: Price stays within the previous high and low after a timeframe change.
- Label: "Accumulation" placed at the period's end if detected.
- Background: Yellow semi-transparent color.
- Action: Prepare for potential long positions.
2. Manipulation Phase
- Detection:
- Manipulation Up: Price rises above previous high and then falls back below.
- Manipulation Down: Price falls below previous low and then rises back above.
- Labels: "Manipulation Up" or "Manipulation Down" placed at detection.
- Background:
- Manipulation Up: Blue color.
- Manipulation Down: Orange color.
- Action: Exercise caution; avoid impulsive trades.
3. Distribution Phase
- Detection:
- Distribution Up: After a Manipulation Up, price falls below previous low.
- Distribution Down: After a Manipulation Down, price rises above previous high.
- Labels: "Distribution Up" or "Distribution Down" placed at detection.
- Background:
- Distribution Up: Purple color.
- Distribution Down: Maroon color.
- Action: Consider exiting positions or entering counter-trend trades.
Configuring the Indicator
- Timeframe Type: Select Auto, Multiplier, or Manual for analysis timeframe.
- Multiplier: Set a custom multiplier when using "Multiplier" type.
- Manual Resolution: Define a specific timeframe with "Manual" option.
- Separator Settings: Customize period separators for visual clarity.
- Label Display Options: Choose to display all labels or only the most recent.
- Visualization Settings: Adjust colors and styles for personal preference.
Practical Tips
- Combine with Other Analysis Tools: Use alongside volume indicators, trend lines, or other technical tools.
- Backtesting: Review historical data to understand how the indicator signals would have impacted past trades.
- Stay Informed: Keep abreast of market news that might affect price movements beyond technical analysis.
- Risk Management: Always employ stop-loss orders and position sizing strategies.
Conclusion
The ADM Indicator is a valuable tool for traders seeking to understand and leverage market phases. By detecting Accumulation, Manipulation, and Distribution phases through specific price action criteria, it provides actionable insights into market dynamics.
Understanding the precise conditions under which each phase is detected empowers traders to make more informed decisions. Whether preparing for potential breakouts during accumulation, exercising caution during manipulation, or adjusting positions during distribution, the ADM Indicator aids in navigating the complexities of the financial markets.
Disclaimer:
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
This indicator is inspired by the Super 6x Indicators: RSI, MACD, Stochastic, Loxxer, CCI, and Velocity . A special thanks to Loxx for their relentless effort, creativity, and contributions to the TradingView community, which served as a foundation for this work.
Best regards Chervolino
Overview of the Timeframe Levels in the `autotimeframe()` Function
The `autotimeframe()` function automatically adjusts the higher timeframe based on the current chart timeframe. Here are the specific timeframe levels used in the function:
- Current Timeframe ≤ 1 Minute
→ Higher Timeframe: 240 Minutes (4 Hours)
- Current Timeframe ≤ 5 Minutes
→ Higher Timeframe: 1 Day
- Current Timeframe ≤ 1 Hour
→ Higher Timeframe: 3 Days
- Current Timeframe ≤ 4 Hours
→ Higher Timeframe: 7 Days
- Current Timeframe ≤ 12 Hours
→ Higher Timeframe: 1 Month
- Current Timeframe ≤ 1 Day
→ Higher Timeframe: 3 Months
- Current Timeframe ≤ 7 Days
→ Higher Timeframe: 6 Months
- For All Higher Timeframes (over 7 Days)
→ Higher Timeframe: 12 Months
Summary:
The function assigns a corresponding higher timeframe based on the current timeframe to optimize the analysis:
- 1 Minute or Less → 4 Hours
- Up to 5 Minutes → 1 Day
- Up to 1 Hour → 3 Days
- Up to 4 Hours → 7 Days
- Up to 12 Hours → 1 Month
- Up to 1 Day → 3 Months
- Up to 7 Days → 6 Months
- Over 7 Days → 12 Months
This automated adjustment ensures that the indicator works effectively across different chart timeframes without requiring manual changes.
Weekly Stacked Daily Changes [LuxAlgo]The Weekly Stacked Daily Changes tool allows traders to compare daily net price changes for each day of the week, stacked by week. It provides a very convenient way to compare daily and weekly volatility at the same time.
🔶 USAGE
The tool requires no configuration and works perfectly out of the box, displaying the net price change for each day of the week as stacked boxes of the appropriate size.
Traders can adjust the width of the columns and the spacing between days and weeks, options to change the color and disable the months and new month lines are also available.
🔹 Bottom Stack Bias
This feature allows traders to compare weekly volatility in two different ways.
With this feature disabled, all weeks use zero as the bottom of the stack, so traders can see at a glance weeks with more volatility and weeks with less volatility.
Enabling this feature will cause the tool to display the stacks with the weekly net price change as the bottom, so if a stack starts below the zero line it means that week has a negative net return, and if it starts above the zero line it means that week has a positive net return.
🔶 SETTINGS
Width: Select the fixed width for each column.
Offset: Choose the fixed width between each column.
Spacing: Select the distance between each day within each column.
🔹 Style
Bottom Stack Bias: Use weekly net price change as the bottom of the stack.
Bullish Change: Color for days with positive net price change
Bearish Change: Color for days with negative net price change
Show Months: Under each week stack, display the month
Show Months Delimiter: Display a line indicating the start of a new month
[w3ss1] TimewindowsYou can use this if you want some subtle indication of a specific timewindow on the chart.
You can use it to see the macrowindows, or set the time of a session or any timewindow you want.
You can choose the color and plot it on the bottom or the top of the chart.
[w3ss1] Colored candlesA simple script that colors the candles in a color of choise on specific times of choice.
You can use it if you want to color like Asia session, or if you want to focus on specific times of day.
This keeps the chart clean, it just colors the candles in the choosen timings.
Statistical Volatility Injections [neo.|]Introduction:
The Statistical Volatility indicator is a versatile tool designed to help traders gauge market volatility over time. By analyzing historical data through a customizable lookback period, it highlights zones of high and low volatility using intuitive colored gradients. This indicator enables traders to make informed decisions by identifying patterns in price movement or volume fluctuations, helping to optimize entries, exits, and overall trading strategy.
Description:
Volatility plays a critical role in financial markets, influencing price movements and trader behavior. This indicator calculates historical volatility using two approaches:
Ranges: Evaluates the price movement by measuring the high-to-low range of candles relative to their closing price.
Volume: Considers trading activity by analyzing the volume associated with each candle.
By mapping out periods of high and low volatility, the indicator provides traders with actionable insights into time where potential breakouts, reversals, or consolidations are more likely to happen. High volatility zones may indicate strong market movements, while low volatility zones often precede significant price action, giving traders a valuable edge.
Key Features:
Compare time based volatility between assets:
Adaptive display will calculate intraday volatility when under the 1h timeframe, and weekly volatility if on the 1h timeframe or above:
OANDA:GBPJPY On the 5min timeframe:
OANDA:GBPJPY On the 1h timeframe:
Display modes allow the volatility to be viewed as ranges and as bars:
How It Works:
Data Collection: The script analyzes historical candles using the user-defined lookback period and calculation type.
Data Processing: Each candle’s volatility is calculated and stored, enabling comparisons across the selected timeframe.
Visual Representation: Using a gradient color scheme, the indicator overlays the results on your chart, highlighting areas of interest based on historical volatility levels.
How to Use:
Setup:
Add the indicator to your chart.
Adjust the lookback period, gradient colors, and choose your preferred calculation mode (Ranges or Volume).
Interpretation:
Look for red zones to identify high-volatility periods—potential breakout or reversal areas.
Use yellow zones to anticipate consolidation or low-activity phases.
Customization:
Enable "Display ranges" to see box height variations reflecting volatility intensity.
Use the "Use Table" feature to summarize volatility data for quick reference.
Advanced Settings:
Adjust style options such as color gradients and overlapping controls for a cleaner chart view.
Retracement Painpoints - Robinhodl21Description:
Retracement Painpoints is crafted to delve into the psychology of markets, particularly assets that are heavily driven by profit expectations and hype cycles. This tool excels when applied to assets experiencing strong hype phases. By visualizing downturns, you can assess which pullbacks are mere pauses in the hype cycle and which ones might signal the end of a trend or precede more significant declines. This insight allows you to identify critical points where market sentiment shifts, helping you make more informed trading decisions.
Main Features:
Focuses on assets influenced by hype and strong profit expectations. Helps distinguish between normal retracements and potential trend reversals.
Trend Detection Methods: Moving Average (MA): Utilizes a customizable MA period to determine market trends. Delta to All-Time High (ATH): Analyzes the percentage distance from the ATH to define trend direction. No Trend Detection: Allows for neutral analysis without trend bias.
Statistical Drawdown Analysis: Identifies local minima in drawdowns to calculate statistically significant levels. Option to calculate statistics based on trend direction (bullish/bearish). Adjustable variables for fine-tuning statistical levels.
Visualization: Plots drawdown curves with color-coding based on trend direction. Displays calculated statistical levels on the chart to highlight potential pain points.
Usage:
Set Parameters: Trend Detection Method: Choose your preferred method (MA, Delta to ATH, or None). MA Period: Define the period for the moving average (default: 420). Delta to ATH (%): Set the threshold for distance to ATH (default: 30%). Neutral Zone Delta to ATH (%): Define the neutral market zone (default: 60%). Stat Variables 1 & 2: Adjust these to select the desired statistical drawdown levels. Minimum Drawdown Threshold (%): Set the minimum drawdown to consider in analysis (default: 10%).
Interpretation: Drawdown Curve: Monitor percentage declines from local maxima. The color indicates the current trend direction: Green: Uptrend. Red: Downtrend. Gray: Neutral or no trend detection. Statistical Levels: Use the displayed levels as potential support or resistance zones, reflecting key psychological levels in the market.
Strategic Application: Identify crucial areas where the price has historically reversed. Assess whether a downturn is a typical retracement within a hype cycle or a sign of a more significant decline. Combine this tool with other technical analysis methods to enhance your trading strategy. Adjust settings based on market conditions and personal trading preferences.
Notes: The indicator is based on historical data and should not be used as the sole basis for trading decisions. It's recommended to test the indicator across various markets and timeframes. Past performance is not indicative of future results.
Created by Robinhodl
Kalman Trend Strength Index (K-TSI)The Kalman Trend Strength Index (K-TSI) is an innovative technical indicator that combines the Kalman filter with correlation analysis to measure trend strength in financial markets. This sophisticated tool aims to provide traders with a more refined method for trend analysis and market dynamics interpretation.
The use of the Kalman filter is a key feature of the K-TSI. This advanced algorithm is renowned for its ability to extract meaningful signals from noisy data. In financial markets, this translates to smoothing out price action while maintaining responsiveness to genuine market movements. By applying the Kalman filter to price data before performing correlation analysis, the K-TSI potentially offers more stable and reliable trend signals.
The synergy between the Kalman-filtered price data and correlation analysis creates an oscillator that attempts to capture market dynamics more effectively. The correlation component contributes by measuring the strength and consistency of price movements relative to time, while the Kalman filter adds robustness by reducing the impact of market noise. Basing these calculations on Kalman-filtered data may help reduce false signals and provide a clearer picture of underlying market trends.
A notable aspect of the K-TSI is its normalization process. This approach adjusts the indicator's values to a standardized range (-1 to 1), allowing for consistent interpretation across different market conditions and timeframes. This flexibility, combined with the noise-reduction properties of the Kalman filter, positions the K-TSI as a potentially useful tool for various market environments.
In practice, traders might find that the K-TSI offers several potential benefits:
Smoother trend identification, which could aid in detecting the start and end of trends more accurately.
Possibly reduced false signals, particularly in choppy or volatile markets.
Potential for improved trend strength assessment, which might lead to more confident trading decisions.
Consistent performance across different timeframes, due to the adaptive nature of the Kalman filter and the normalization process.
The K-TSI's visual representation as a color-coded histogram further enhances its utility. The changing colors and intensities provide an intuitive way to gauge both the direction and strength of trends, making it easier for traders to quickly assess market conditions.
While the K-TSI builds upon existing concepts in technical analysis, its integration of the Kalman filter with correlation analysis offers traders an interesting tool for market analysis. It represents an attempt to address common challenges in technical analysis, such as noise reduction and trend strength quantification.
As with any technical indicator, the K-TSI should be used as part of a broader trading strategy rather than in isolation. Its effectiveness will depend on how well it aligns with a trader's individual approach and market conditions. For traders looking to explore a more refined trend strength oscillator, the Kalman Trend Strength Index could be a worthwhile addition to their analytical toolkit.
Precision Swing Point V2.0 - [Gozlan]"Precision Swing Point V2.0," is well-structured and aims to highlight specific conditions in the chart while factoring in time zones and user configurations. Here's a quick breakdown and a couple of improvements or fixes to consider:
Key Features:
Multi-Symbol Analysis:
Incorporates three symbols (Symbol 1, Symbol 2, and Symbol 3) and compares their open/close values to derive candle states (green/red).
Highlighting Conditions:
Green: When Symbol 2 is red and Symbol 1 is green.
Red: When Symbol 2 is green and Symbol 1 is red.
Blue: When Symbol 3 is green and Symbol 1 is red.
Custom Time Highlights:
Allows users to specify times for highlighting specific bars.
Timezone Flexibility:
Time calculations adjust based on user-defined UTC offsets.
Edwin K Stochastic Candle ColorsThe Stochastic Candle Colors indicator highlights price action using candle colors based on signals from the stochastic oscillator. Here's how to use it:
1. Indicator Purpose
This indicator overlays on your price chart and changes candle colors based on stochastic oscillator signals:
Green candles: Indicate a bullish signal when the %K line crosses above the %D line in an oversold area (below 20).
Red candles: Indicate a bearish signal when the %K line crosses below the %D line in an overbought area (above 80).
2. How to Use the Inputs
K (periodK): The lookback period for calculating the %K line of the stochastic oscillator. A smaller value makes the indicator more sensitive to price changes.
D (periodD): The period for smoothing the %K line to get the %D line. A larger value creates smoother signals but may result in delays.
Smooth (smoothK): The additional smoothing applied to the %K line before calculating the %D line. This helps reduce noise.
3. How to Interpret the Candle Colors
Green Candle:
Occurs when the %K line crosses above the %D line in the oversold zone (below 20).
Signals a potential bullish reversal.
Red Candle:
Occurs when the %K line crosses below the %D line in the overbought zone (above 80).
Signals a potential bearish reversal.
No Color:
No crossover occurs, or the crossover doesn't happen in overbought/oversold zones.
4. Application in Trading
Entry Points:
Buy when you see a green candle and confirm with other indicators or chart patterns.
Sell when you see a red candle and confirm with additional signals.
Trend Context:
Combine this indicator with trend-following tools like moving averages or support/resistance levels to improve accuracy.
Stop Loss/Take Profit:
Use nearby swing highs/lows for stop-loss placement.
Set profit targets based on risk-reward ratios or key levels.
5. Customization
Adjust the input parameters (K, D, and Smooth) to align the indicator's sensitivity with your trading style:
Short-term traders might prefer lower values for quicker signals.
Long-term traders might opt for higher values for smoother, more reliable signals.
6. Limitations
Signals in isolation might not be reliable. Always use this indicator in conjunction with other tools.
Avoid using during low volatility or sideways markets as stochastic oscillators can produce false signals.
Altcoin Season Index - AdamThe "Altcoin Season Index" is a powerful tool for understanding market dynamics between Bitcoin and altcoins. This indicator helps traders identify whether the market is favoring Bitcoin or if it has shifted to favor altcoins. Understanding this can be crucial for making informed decisions about allocating your investments within the crypto market.
Overview of the Altcoin Season Index
The Altcoin Season Index calculates how well the top 10 altcoins are performing compared to Bitcoin over a given period. It helps traders determine if they are currently in an "Altcoin Season" or a "Bitcoin Season." The indicator gives a score from 0 to 100, representing the percentage of altcoins outperforming Bitcoin over a specific time window. When many altcoins are performing better than Bitcoin, it suggests a possible "Altcoin Season," whereas the opposite may indicate a period of Bitcoin dominance.
Key Features:
1. Top 10 Altcoin Performance Comparison: The indicator evaluates the performance of the top 10 altcoins compared to Bitcoin. It provides a clear view of how well altcoins are doing relative to the market leader, Bitcoin.
2. Customizable Performance Period: The period of analysis is adjustable, allowing users to set a specific timeframe, typically in days, to evaluate the relative performance of altcoins versus Bitcoin.
3. Dynamic Replacement of Altcoins: The indicator includes a feature to replace the last coin in the list, ensuring that the data stays relevant as market conditions change. For example, when a new altcoin enters the top 10 in terms of market cap, the indicator can replace an older coin that is falling out of the top ranks.
4. Threshold Indicators: The indicator uses predefined thresholds to determine and visualize whether it is an "Altcoin Season" or a "Bitcoin Season":
- A value above 75 indicates an Altcoin Season, suggesting that altcoins are outperforming Bitcoin.
- A value below 25 suggests Bitcoin dominance, where Bitcoin is outperforming the majority of altcoins.
How the Indicator Works:
1. Performance Calculation: The indicator calculates the percentage change in price for each of the top 10 altcoins and Bitcoin over a given number of days. The comparison is made by looking at how much each asset's price has changed over the specified period.
2. Altcoin Season Calculation: The indicator counts the number of altcoins that have outperformed Bitcoin during the given period. The result is then expressed as a percentage, known as the Altcoin Season Index. If 8 out of 10 altcoins are outperforming Bitcoin, the index will be 80%, signaling a strong altcoin season.
3. Visual Representation: The indicator is visualized on a separate panel within TradingView, showing the Altcoin Season Index over time. Additionally, thresholds are marked on the chart, and background colors are applied to provide visual cues:
- Red Background: When the Altcoin Season Index is above 75, indicating a strong altcoin season.
- Blue Background: When the Altcoin Season Index is below 25, indicating Bitcoin dominance.
Practical Use:
- Identify Market Cycles: Traders can use this indicator to identify when the market is moving into or out of an altcoin season. This can help traders decide whether to rotate capital into altcoins or Bitcoin.
- Investment Strategy Adjustment: During altcoin seasons, altcoins tend to outperform Bitcoin. Traders might allocate more of their portfolio to promising altcoins. Conversely, during Bitcoin-dominant periods, shifting investments towards Bitcoin could provide more stability.
- Support Technical Analysis: This indicator complements other forms of technical analysis by providing macro-level insights about market direction and which asset classes might be favored.
Example Usage:
Imagine that the Altcoin Season Index is currently at 80%. This means that 8 of the top 10 altcoins have performed better than Bitcoin over the selected period. This strong altcoin performance suggests that the market has entered an "Altcoin Season." A trader observing this might consider reallocating funds towards altcoins to capitalize on the positive momentum.
Alternatively, if the index is at 20%, only 2 out of the top 10 altcoins are outperforming Bitcoin, indicating that Bitcoin is currently the stronger player. In this scenario, traders may choose to prioritize Bitcoin or maintain a more conservative portfolio allocation.
Note:
This indicator includes a feature to replace the bottom-ranked altcoin (typically a coin that falls out of the top 10) with a new altcoin when market conditions change. This ensures that the analysis remains relevant by focusing on the top-performing assets by market capitalization.
Conclusion:
The Altcoin Season Index is a helpful tool for understanding broader trends in the cryptocurrency market and making strategic investment decisions. By monitoring which assets are performing better, traders can adapt their strategies and make more informed choices, particularly during shifts in market sentiment.
Please leave your feedback or contributions if there are any inaccuracies in my indicator. Thank you!
Wick Length Display + Alert conditionsDescription of the Wick Length Display (Advanced) script
Originality and purpose of the script
The Wick Length Display (Advanced) script is an innovative tool for traders who want to gain detailed insights into the length of candle wicks. It stands out for its versatility and user-friendly customization options. It combines precise technical calculations with visual representation to provide important information about market movements and dynamics right on the chart.
Functionality
The script calculates and displays the length of the upper and lower wicks of each candle on the chart. It also provides additional visual cues such as:
• “Bull pressure”: When green candles do not have upper wicks, this indicates strong buying pressure.
• “Bear pressure”: When red candles do not have lower wicks, this indicates strong selling pressure.
• Threshold conditions: Only displays wicks that exceed a certain threshold (optional).
• Display in pips: Allows you to display wick lengths in pips, which is useful for forex traders.
How it works
The script analyzes each candle using the following calculations:
1. Wick length calculation:
◦ Upper wick length = High - (top of the body)
◦ Lower wick length = (bottom of the body) - Low
2. Display conditions:
◦ It distinguishes between bullish and bearish candles.
◦ It checks if the calculated wicks exceed the defined thresholds before displaying them.
3. Dynamic labels:
◦ Labels are placed above or below the respective candles.
◦ Size, color and type of labels are fully customizable.
4. Limitation of labels:
◦ To ensure clarity, a maximum number of labels is defined.
Usage
1. Customization:
◦ Open the script in the Pine Script Editor in TradingView.
◦ Use the input options to customize parameters such as color selection, label size, thresholds and other details according to your requirements.
2. Enable thresholds:
◦ Enable thresholds to show labels only for relevant wicks (default is 6).
◦ Define the minimum wick lengths for bullish (green) and bearish (red) candles.
3. Show in pips:
◦ Enable the “Show wick length in pips” option to show the results in pips (especially suitable for Forex).
4. Edit pressure labels:
◦ Turn the “Bull Pressure” and “Bear Pressure” features on or off depending on your analysis settings.
Concepts behind the calculations
• Technical market analysis: Wick lengths can indicate buying or selling pressure and provide important information on market psychology.
• Thresholds and filtering: The script uses thresholds to avoid visual overload and highlight only essential data.
• Label display: Dynamic labels improve chart readability and give the user instant feedback on market developments.
Usage
This script is great for:
• Intraday trading: Analyzing short-term movements using wick lengths.
• Forex trading: Tracking market momentum using the pip indicator.
• Swing trading: Identifying buying or selling pressure in key markets.
• Visual support: Ideal for traders who prefer a graphical display.
Description of the Wick Length Display (Advanced) script
Originality and purpose of the script
The Wick Length Display (Advanced) script is an innovative tool for traders who want to gain detailed insights into the length of candle wicks. It stands out for its versatility and user-friendly customization options. It combines precise technical calculations with visual representation to provide important information about market movements and dynamics right on the chart.
Functionality
The script calculates and displays the length of the upper and lower wicks of each candle on the chart. It also provides additional visual cues such as:
• “Bull pressure”: When green candles do not have upper wicks, this indicates strong buying pressure.
• “Bear pressure”: When red candles do not have lower wicks, this indicates strong selling pressure.
• Threshold conditions: Only displays wicks that exceed a certain threshold (optional).
• Display in pips: Allows you to display wick lengths in pips, which is useful for forex traders.
How it works
The script analyzes each candle using the following calculations:
1. Wick length calculation:
◦ Upper wick length = High - (top of the body)
◦ Lower wick length = (bottom of the body) - Low
2. Display conditions:
◦ It distinguishes between bullish and bearish candles.
◦ It checks if the calculated wicks exceed the defined thresholds before displaying them.
3. Dynamic labels:
◦ Labels are placed above or below the respective candles.
◦ Size, color and type of labels are fully customizable.
4. Limitation of labels
Alert conditions:
Alerts are triggered when the wick length of a bullish or bearish candle exceeds the defined thresholds.
Alert function:
alert() is used to issue messages with a frequency of once per candle when the conditions are met.
How to set up alerts
Save the script and add it to your chart.
Open the alert settings in TradingView.
Select the script's custom message as a trigger.
Adjust the frequency and notification type (popup, email, etc.).
Now you have a powerful tool with visual analysis and alert function!
New Bar AlertThis is probably the simplest indicator on Tradingview, it generates an alert on every new bar.
Useful for strategies where you only need chart attention at the new bar, see if you have a setup.
Helps not having to stare at the charts, the alert will tell you when it's time to take a look.
Works on all timeframes but in order to keep your sanity, best used on higher timeframes, 5mins and up.
Risk Indicator# Risk Indicator
A dynamic risk analysis tool that helps traders identify optimal entry and exit points using a normalized risk scale from 0 to 1. The indicator combines price action, moving averages, and logarithmic scaling to provide clear visual signals for different risk zones.
### Key Features
• Displays risk levels on a scale of 0-1 with intuitive color gradients (blue → cyan → green → yellow → orange → red)
• Shows predicted price levels for different risk values
• Divides the chart into 5 DCA (Dollar Cost Average) zones
• Includes customizable alerts for rapid risk changes and zone transitions
• Automatically adjusts to market conditions using dynamic ATH/ATL calculations
### Customizable Parameters
• SMA Period: Adjust the smoothing period for the baseline moving average
• Power Factor: Fine-tune the sensitivity of risk calculations
• Initial ATL Value: Set the starting point for ATL calculations
• Label Offset: Adjust the position of price level labels
• Visual Options: Toggle price levels and zone labels
• Alert Settings: Customize alert thresholds and enable/disable notifications
### Risk Zones Explained
The indicator divides the chart into five distinct zones:
- 0.0-0.2: DCA 5x (Deep Blue) - Strongest buy zone
- 0.2-0.4: DCA 4x (Cyan) - Strong buy zone
- 0.4-0.6: DCA 3x (Green) - Neutral zone
- 0.6-0.8: DCA 2x (Yellow/Orange) - Take profit zone
- 0.8-1.0: DCA 1x (Red) - Strong take profit / potential sell zone
### Alerts
Built-in alerts for:
• Rapid increases in risk level
• Rapid decreases in risk level
• Entry into buy zones
• Entry into sell zones
### How to Use
1. Add the indicator to your chart
2. Adjust the SMA period and power factor to match your trading timeframe
3. Monitor the risk level and corresponding price predictions
4. Use the DCA zones to guide your position sizing
5. Set up alerts for your preferred risk thresholds
### Tips
- Lower risk values (blue/cyan) suggest potentially good entry points
- Higher risk values (orange/red) suggest taking profits or reducing position size
- Use in conjunction with other technical analysis tools for best results
- Adjust the power factor to fine-tune sensitivity to price movements
### Notes
- Past performance is not indicative of future results
- This indicator is meant to be used as part of a complete trading strategy
- Always manage your risk and position size according to your trading plan
Version 1.0
Detrended Price Oscillator [NexusSignals]Detrended Price Oscillator (DPO) is a detrended price oscillator, used in technical analysis, strips out price trends in an effort to estimate the length of price cycles from peak to peak or trough to trough.
DPO is not a momentum indicator, instead highlights peaks and troughs in price, which are used to estimate buy and sell points in line with the historical cycle. (cf. to investopedia)
DPO indicator made by NexusSignals components :
a filled area that allow users to see easy the trend of an asset;
a sma moving average on chart (default length is 20)
a 20 sma on oscillator, both ma's are color coded to show uptrend / downtrend
a donchian channel applied to the dpo to show breakouts, breakdowns and resistances/support, reversals
few alerts for price crossing above ma, cross above the 0 dpo line, and for cross above and below the donchian channels top and bottom
How you can use DPO indicator ?
The detrended price oscillator (DPO) can be used for measuring the distance between peaks and troughs in the indicator that may help traders to make future decisions as they can locate the most recent trough and determine when the next one may occur in the meassured distance on oscillator between peaks and troughs.
You can use the indicator to find the potential price reversals, for example when the price of an asset is in a bearish trend and the dpo is bouncing from the donchian channel bottom, that may be a potential swing low for that asset, same thing in a bullish trend when the dpo rejecting at top of donchian channel may be a trend reversal, a pullback or swing high.
When DPO is above the 0 trend is in an uptrend and when dpo is below the zero the asset is possible to move into a downtrend.
Also crosses of DPO above and below the DPO moving average may signalising a trend change.
Asset MaxGain MinLoss Tracker [CHE]Asset MaxGain MinLoss Tracker – Your Tool to Discover the Best Trading Opportunities
Introduction
Hello dear traders,
Today, I'd like to introduce you to a fantastic tool: the Asset MaxGain MinLoss Tracker . This indicator is designed to help you identify the best trading opportunities in the market by analyzing the maximum gain and adjusted maximum loss potentials of various assets.
Why Use This Indicator?
1. Time-Saving Analysis
Instead of spending hours sifting through different charts, this indicator provides you with key metrics for up to 10 assets at a glance.
2. Compare Multiple Assets Simultaneously
Monitor and compare multiple assets to discover which ones offer the highest profit potential and the lowest risk of loss.
3. Customizable Settings
Adjust the observation period and select the assets you want to analyze according to your trading strategy.
4. Clear Visual Representation
Data is presented in an easy-to-read table directly on your chart, highlighting assets with the highest maximum gain and the lowest adjusted maximum loss.
How to Use It in Everyday Trading
Step 1: Setting Up the Indicator
Select Your Assets: Choose up to 10 assets you wish to track. These can be cryptocurrencies, stocks, forex pairs, etc.
Configure the Trading Period Length: Set the number of bars (candles) over which you want to calculate the maximum gain and adjusted maximum loss. This allows you to tailor the analysis to your preferred time frame, whether it's short-term trading or long-term investing.
Step 2: Interpreting the Results
Maximum Gain (%): This value shows the potential upside of each asset over the selected period. A higher percentage indicates a greater potential for profit if the asset's price moves upward.
Adjusted Maximum Loss (%): This figure represents the potential downside risk, adjusted to give a more accurate reflection of loss potential. A lower percentage means less risk of significant loss.
Category Highlighting: Assets are categorized based on their performance:
High Gain & Low Loss: Assets that have both the highest max gain and the lowest adjusted max loss.
High Gain: Assets with the highest max gain.
Low Loss: Assets with the lowest adjusted max loss.
Step 3: Making Trading Decisions
Identify Opportunities: Focus on assets categorized as High Gain & Low Loss for the most favorable risk-to-reward scenarios.
Risk Management: Use the adjusted maximum loss to assess and mitigate potential risks associated with each asset.
Portfolio Diversification: Allocate your investments across assets with varying levels of gain and loss potentials to diversify your portfolio effectively.
Practical Example
Imagine you're monitoring the following assets:
Asset 1: BTCUSD
Asset 2: ETHUSD
Asset 3: ADAUSD
Asset 4: XRPUSD
After applying the indicator:
BTCUSD shows a high maximum gain but also a high adjusted maximum loss.
ETHUSD has both a high maximum gain and a low adjusted maximum loss, categorizing it as High Gain & Low Loss.
ADAUSD indicates a low maximum gain but the lowest adjusted maximum loss.
XRPUSD reflects moderate values in both categories.
Decision Making:
Primary Focus: ETHUSD may be your top choice due to its high reward and lower risk.
Risk-Averse Option: ADAUSD could be considered if you prioritize minimizing losses.
Balanced Approach: Diversify by investing in both ETHUSD and ADAUSD.
Understanding the Core Functionality
While you don't need to delve deep into the code to use the indicator effectively, understanding its core function can enhance your confidence in the tool.
The Main Function: Calculating Max Gain and Adjusted Max Loss
The heart of the indicator is a function that calculates two critical metrics for each asset:
Maximum Gain (sym_MaxGain):
Purpose: Measures the highest potential profit over the selected period.
How It Works: It finds the lowest price (sym_minlow) within the period and calculates the percentage increase to the current high price. This shows how much you could have gained if you bought at the lowest point.
Adjusted Maximum Loss (sym_AdjustedMaxLoss):
Purpose: Provides an adjusted measure of the potential loss, giving a more realistic risk assessment.
How It Works: It identifies the highest price (sym_maxhigh) within the period and calculates the percentage decrease to the current low price. This value is adjusted to account for the diminishing impact as losses approach 100%.
Simplified Explanation of the Function
Data Retrieval: For each asset (sym), the function retrieves the high and low prices over the specified timeframe.
Calculations:
Find Highest and Lowest Prices: Determines sym_maxhigh and sym_minlow within the tracking period.
Compute Max Gain: Calculates the potential gain from sym_minlow to the current high.
Compute Max Loss: Calculates the potential loss from sym_maxhigh to the current low.
Adjust Max Loss: Adjusts the max loss calculation to prevent distortion as losses near 100%.
Output: Returns both sym_MaxGain and sym_AdjustedMaxLoss for further analysis.
Benefits of Understanding the Function
Transparency: Knowing how these values are calculated can increase your trust in the indicator's outputs.
Customization: If you're familiar with coding, you might tailor the function to suit specific trading strategies.
Enhanced Analysis: Understanding the underlying calculations allows you to interpret the results more effectively, aiding in better decision-making.
Conclusion
The Asset MaxGain MinLoss Tracker is a powerful tool that can significantly enhance your trading efficiency and effectiveness by:
Providing Quick Insights: Save time by getting immediate access to essential performance metrics of multiple assets.
Assisting in Risk Management: Use the adjusted maximum loss to understand and mitigate potential risks.
Supporting Strategic Decisions: Identify assets with the best risk-to-reward ratios to optimize your trading strategy.
Take advantage of this indicator to elevate your trading game and make more informed decisions with confidence.
Thank you for your time, and happy trading!
Disclaimer:
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
This indicator is inspired by the "Max Gain" indicator. A special thanks to Skipper86 for his relentless effort, creativity, and contributions to the TradingView community, which served as a foundation for this work.
Next Moon Phases 2025Next Moon Phases 2025
This custom indicator marks both past and future moon phases with vertical lines on your chart, providing a unique way to incorporate lunar cycles into your trading strategy.
This indicator is best used on the Daily timeframe. The lunar cycle is most effective when viewed in daily bars, providing the clearest correlation between moon phases and market trends.
Key Features:
Past Moon Phases (2016–2024): Marks the key lunar phases—New Moon, First Quarter, Full Moon, and Last Quarter—with vertical lines on the chart. Perfect for backtesting and analyzing the historical relationship between moon phases and market movements.
Future Moon Phases (2025): Unlike most indicators, this tool also projects upcoming moon phases for 2025, allowing you to plan ahead and anticipate potential market reactions based on future lunar events.
Adjustable Visibility: Customize which moon phases are displayed by toggling the visibility of each phase (New Moon, First Quarter, Full Moon, Last Quarter) with a simple control.
Why Moon Phases Matter in Trading:
Many traders believe that the lunar cycle can influence market sentiment and behavior. For example:
New Moon is often associated with new beginnings and potential market reversals.
Full Moon is thought to bring increased volatility and market climaxes.
First Quarter and Last Quarter may indicate periods of consolidation or momentum shifts.
By including both past and future moon phases, this indicator allows you to examine historical data while also planning for upcoming lunar events, giving you a strategic edge for both short-term and long-term trading decisions.
Risk-Reward Labels Minimal with OffsetIndicator Explanation
The indicator “Risk-Reward Labels Minimal with Offset” is designed to assist traders in managing risk and potential rewards. It displays the Stop-Loss (SL) and Take-Profit (TP) levels for both long and short positions based on identified support and resistance levels.
Key Features:
1. Risk-Reward Ratio: Traders can adjust the risk-reward ratio to define the relationship between potential losses and potential gains (e.g., 1:1 or 1:2).
2. Risk Distance: The distance (in pips) is set to determine where to place the SL and TP levels.
3. Labels with Offset: SL and TP labels can be shifted by an offset (bars), allowing for better visualization.
4. Support and Resistance Levels: The indicator dynamically calculates support and resistance. When a support or resistance level is broken, the corresponding labels are deleted.
5. Display in Range Markets: If the market is ranging or lacks a clear trend, both long and short labels are displayed. This allows traders to identify potential entry opportunities in both directions, even when the market is not clearly trending.
6. Deletion Logic: If the price falls below support or rises above resistance, the relevant SL and TP labels are removed. However, in a Range situation, the possibility of seeing both long and short labels remains, increasing flexibility and helping to avoid false signals.
PIVOTBOSS ADR The PivotBoss ADR Method offers a complete approach to analyzing the volatility for a
given market in multiple timeframes by simply using average daily range. The ADR Breakout
helps us identify markets that are extremely compressed and due for significant expansion.
The PivotBoss ADR Targets Indicator is a simple, yet powerful, tool that helps you forecast extremely accurate targets based on the volatility of a given instrument. This indicator self-adjusts to a market's current volatility in order to plot reliable targets in multiple timeframes, including daily, weekly, and monthly targets.
1. Compression/Expansion: The development of trading ranges (Compression) builds the energy that will lead to the next
phase of price discovery (Expansion). ADR helps us quantify when a range is significantly compressed and due for expansion.
2. Volatility: Measures the SPEED of a market in order to forecast future volatility and price behavior. Markets rotate between
LOW and HIGH volatility states. Low ADR readings (<65% ADR) suggest significant compression, implying expansion ahead.
3. The ADR Breakout (Expansion Day): A true breakout from a narrow ADR range includes an Expansion Day, which is a
Trend Day on Day 1, wherein the session’s midpoint exceeds the breakout point and sees a Close beyond the range.
4. The ADR Breakout (Rejection Day): A failed breakout from a narrow ADR range includes a Rejection Day, which may take
the form of a long tail on Day 1, wherein the market attempted range expansion, but failed and closes back within the range.
This signature oftentimes leads to major expansion on the OPPOSITE side of the range.
5. A Variety of Trade Opportunities: Once TRUE expansion occurs from a narrow ADR range, a variety of trade opportunities
present themselves over the course of the next several days, or even weeks. These opportunities include swing trades, day
trades, and even scalps. Understanding when and where to look for these opportunities is key
Pivot Length Percentiles### Pivot Length Percentiles — Analyze Pivot Behavior with Precision 🎯
#### Overview
The **Pivot Length Percentiles** indicator is a powerful tool designed to analyze and visualize the distances between pivot highs and lows on your chart. By calculating percentiles, it provides traders with valuable insights into market structure, volatility, and pivot behavior, helping to make informed trading decisions.
#### Key Features
- **Customizable Pivot Lengths:** Adjust the number of bars to the left and right of a pivot to match your trading strategy.
- **Percentile Analysis:** Calculate and display the 50th (low), 85th (mid), and 99th (high) percentiles of the distances between pivots.
- **Real-Time Statistics Table:** View the latest statistics, including:
- Pivot-to-pivot distances
- Current distance from the last pivot
- Last pivot type and price
- **Intuitive Inputs with Tooltips:** Easily configure the indicator with clear descriptions for each input field.
#### How It Works
1. **Pivot Detection:** The script identifies pivot highs and lows based on user-defined parameters (`Left Bars` and `Right Bars`).
2. **Distance Calculations:** The distances between consecutive pivots and the number of bars between them are recorded.
3. **Percentile Computation:** The distances are sorted to calculate specified percentiles (`Low`, `Mid`, `High`), giving a statistical perspective on market movements.
4. **Visualization:** A statistics table at the bottom of the chart displays the calculated values, ensuring quick and easy reference.
#### Use Cases
- **Identify Market Ranges:** Use pivot distances to identify typical price movement ranges in a given market condition.
- **Plan Entries and Exits:** Leverage the percentile calculations to predict potential retracement levels or continuation patterns.
- **Market Structure Analysis:** Study the relationship between pivot distances and market volatility over time.
#### Inputs Explained
- **Left Bars:** Defines how many bars to the left are considered in pivot detection.
- **Right Bars:** Defines how many bars to the right are considered in pivot detection.
- **Low Percentile:** Specifies the lower boundary percentile for pivot distances.
- **Mid Percentile:** Specifies the median percentile for pivot distances.
- **High Percentile:** Specifies the upper boundary percentile for pivot distances.
#### Tips for Use
- Adjust pivot lengths (`Left Bars` and `Right Bars`) to match your desired level of granularity or market timeframe.
#### Final Thoughts
The Pivot Length Percentiles indicator bridges the gap between statistical analysis and trading by providing actionable insights into pivot behavior. Whether you're a scalper, day trader, or swing trader, this tool can help refine your strategy and enhance your market understanding.
28 minutes ago
Prometheus Markov ChainThe Prometheus Markov Chain Indicator is a custom-built tool designed to predict potential future price movements using a Markov Chain approach. A Markov Chain is a statistical model that assumes the probability of moving to a future state depends solely on the current state. In this indicator, states represent price movement classifications—bullish, bearish, or neutral—and are determined based on historical price changes (percentage returns). The indicator builds a transition matrix to calculate probabilities of transitioning from one state to another, enabling traders to identify patterns and forecast likely price actions.
Core Functionality and Transition Matrix
The transition matrix is the backbone of the Markov Chain. It captures the frequency of transitions between states in the historical price data and normalizes these counts into probabilities. For example, if the price was in a bearish state and transitioned to a bullish state 3 out of 10 times, the probability of transitioning from bearish to bullish would be 0.3. The matrix is created dynamically using the stateFunc function to classify states, which can use either dynamic thresholds (highest and lowest returns over a lookback period) or a user-defined percent return threshold. Below is the snippet that updates the transition matrix:
transitionMatrix = matrix.new(dimension, dimension, 0.0)
for i = 0 to array.size(vec) - 2
fromState = array.get(vec, i)
toState = array.get(vec, i + 1)
transitionMatrix.set(fromState, toState, transitionMatrix.get(fromState, toState) + 1)
for i = 0 to dimension - 1
rowSum = 0.0
for j = 0 to dimension - 1
rowSum += transitionMatrix.get(i, j)
for j = 0 to dimension - 1
prob = transitionMatrix.get(i, j) / rowSum
transitionMatrix.set(i, j, prob)
This snippet iterates through historical price movements, counts state transitions, and then normalizes each row of the matrix so that the sum of probabilities for all possible transitions from a given state equals 1.
How the Indicator Predicts Future States
After constructing the transition matrix, the indicator calculates the current state of the price based on the latest percentage return and then uses the matrix to compute probabilities for transitioning to other states. The state with the highest probability is predicted as the next state, which is displayed on the chart using color-coded labels: green for bullish and red for bearish. The following snippet demonstrates how the current state and predictions are calculated:
current_chng = (close - close ) / close
var int current_state = na
if not use_custom_thresh
highest_chng = ta.highest(current_chng, int(size) * 2)
lowest_chng = ta.lowest(current_chng, int(size) * 2)
current_state := stateFunc(current_chng, highest_chng, lowest_chng)
else
current_state := stateFunc(current_chng, custom_thresh)
predicted_probs = array.new(dimension, 0.0)
for j = 0 to dimension - 1
array.set(predicted_probs, j, transitionMatrix.get(current_state, j))
The indicator evaluates which state has the highest transition probability (highest_prob) and places corresponding labels on the chart. For example, if the next state is predicted to be bullish, a green "Bullish" label is placed below the current bar. This predictive functionality helps traders anticipate potential reversals or continuations in price trends based on historical behavior patterns.
Usage:
Here we see the indicator at work on $PLTR. The states predicted are bullish then bearish. In this example we then see price move in a way that verifies those predictions.
On this 4 Hour NASDAQ:AMZN chart we see predictions play out in a short trade style. States quickly move from one to another but not without giving traders a way to take advantage.
This is the perspective we aim to provide. We encourage traders to not follow indicators blindly. No indicator is 100% accurate. This one can give you a different perspective market state. We encourage any comments about desired updates or criticism!