Automatic Fibonacci Levels with EMAAutomatic Fibonacci Levels with EMA
Description:
This script automatically calculates and displays Fibonacci retracement levels based on the highest and lowest prices over a dynamic lookback period. The Fibonacci levels are recalculated on every bar to adapt to price changes, providing an ongoing analysis of key support and resistance areas.
The Fibonacci levels are dynamically colored to reflect the trend direction, determined by the position of the price relative to the Exponential Moving Average (EMA). When the market is in an uptrend (price above EMA), Fibonacci levels are displayed in green, and in a downtrend (price below EMA), they are shown in red. This color coding helps traders quickly identify the current market direction.
Key Features:
Dynamic Fibonacci Levels: Automatically adjusts Fibonacci retracement levels based on recent price action, recalculated with each new bar.
EMA Trend Confirmation: The trend is confirmed by the position of the price relative to the 20-period EMA. Fibonacci levels are color-coded to reflect this trend.
Customizable Lookback Period: Adjust the base lookback period (default 50) and scale it according to your preferred timeframe for more or less sensitivity to recent price action.
Flexible Fibonacci Duration: The Fibonacci levels remain on the chart for a customizable duration (default 2 bars), allowing for visual clarity while adapting to new price action.
Timeframe Scaling: The script automatically adjusts the lookback period based on a scaling factor, making it suitable for different timeframes.
How to Use:
Use the Fibonacci levels to identify potential support and resistance zones based on the market's current price range.
Combine the trend color coding with your own strategy to enhance decision-making, whether for long or short entries.
Adjust the Lookback Period and Fibonacci Duration based on your trading style and timeframe preferences.
This script provides an automatic and customizable way to visualize Fibonacci retracements in a dynamic manner, helping traders make informed decisions based on trend direction and key price levels.
Note: As with any trading tool, always use proper risk management and test the script before using it in live trading.
Indicators and strategies
Order BlockOverview:
The Order Block Indicator is designed to help traders identify key bullish and bearish order blocks on their charts. Order blocks are significant price zones where institutional activity may have occurred, often leading to strong reversals or continuations. This indicator visually highlights these blocks and provides alerts for potential trade opportunities.
Key Features
Bullish Order Blocks (Yellow):
Identifies bullish structures where price signals a potential upward movement.
Highlighted in bright yellow to stand out on your chart.
Bearish Order Blocks (Pink):
Detects bearish structures where price suggests a possible downward movement.
Highlighted in pink for easy identification.
Alerts for Order Blocks:
Sends a notification whenever a bullish or bearish order block is detected.
Keeps you informed of key market zones even when you’re away from the screen.
How It Works
Bullish Order Block Criteria
The last candle (close ) is bullish (close > open).
The second last candle (close ) is bearish (close < open).
The bullish candle’s close is above the high of the bearish candle.
The bearish candle’s close is above the low of the third last candle.
The bearish candle’s low is below the low of the third last candle.
The current candle’s low is above the bearish candle’s high.
These conditions combine to identify strong bullish zones.
Bearish Order Block Criteria
The last candle (close ) is bearish (close < open).
The second last candle (close ) is bullish (close > open).
The bearish candle’s close is below the low of the bullish candle.
The third last candle’s high is above the bullish candle’s close.
The bullish candle’s high is above the high of the third last candle.
The current candle’s high is below the bullish candle’s low.
This logic highlights potential bearish zones.
How to Use It
Add the Indicator to Your Chart:
Use it on any timeframe to spot bullish or bearish order blocks.
Visual Assistance:
Yellow bars indicate bullish order blocks.
Pink bars represent bearish order blocks.
Set Alerts:
Configure alerts to notify you when a bullish or bearish order block appears.
Customization
Colors: Easily change the colors for bullish and bearish order blocks.
Alerts: Adjust alert messages to suit your trading preferences.
Disclaimer:
This indicator is a technical analysis tool and should be used alongside other strategies and market analysis. It does not guarantee profits and carries trading risks. Always trade responsibly.
London/NY Sessions [jpkxyz]London/NY Sessions Indicator Guide
This indicator tracks the forex market's most active trading periods: London session, New York session, and their overlap.
This characteristics of the London and New York trading sessions are well documented and many traders use them as a key element in their trading strategies. It is most relevant in forex trading, however it is to an extend also applicable in cryptocurrencies.
London Session (08:00-16:00 UTC)
Most active trading session (35% of daily forex volume)
Highest trading volume and liquidity
Major price movements and trend development
Significant institutional participation
New York Session (13:00-20:00 UTC)
Second most active trading period
High institutional order flow
Major US economic releases
Significant impact on USD pairs
London/New York Overlap (13:00-16:00 UTC)
The most active period in forex markets:
Maximum market liquidity
Highest daily trading volume
Strong price movements
Tightest spreads
Peak institutional activity
This indicator helps traders:
Visualize key trading sessions
Track session highs and lows
Monitor overlap dynamics
Identify potential support/resistance levels (session highs/lows)
Custom ATR with Paranormal Bar FilterCustom ATR with Paranormal Bar Filter
Description:
This indicator calculates a custom ATR (Average True Range) by filtering out bars with unusually large or small price ranges. It helps provide a more accurate measure of market volatility by ignoring outliers.
How it works:
True Range Calculation:
The price range for each bar is calculated.
Bars with ranges much larger or smaller than typical are excluded.
Filtered ATR:
The ATR is calculated using only the bars that pass the filter.
Current Bar Progress:
Measures how much the current bar has moved compared to the filtered ATR, based on the difference between its opening and closing prices.
Display:
A line represents the filtered ATR.
A table shows the filtered ATR, the current bar's range, and its progress relative to the ATR.
Input Settings:
ATR Period: Number of bars used to calculate the ATR.
Filter Window: Number of recent bars used to determine the typical range.
Filter Threshold: Sensitivity of the filter. A higher value allows more bars to pass.
How to Use:
Monitor Volatility:
Use the filtered ATR to understand market volatility while ignoring unusual price movements.
Track Current Bar Progress:
See how much of the ATR the current bar has completed.
Adjust Filter Settings:
Fine-tune the filter to match your trading timeframe and strategy.
This indicator is designed for traders who want to track market volatility without being misled by extreme outlier bars.
BTC InsightThis script is a comprehensive tool for analyzing Bitcoin's daily price range, trend predictions, and significant volume-based order block levels. It combines multiple technical analysis concepts, including exponential moving averages (EMAs), logarithmic calculations, and custom indicators for advanced forecasting and visualization.
Key Features and Technical Details
1. Exponential Moving Averages (EMAs)
The script calculates two smoothed EMAs:
EMA1 and EMA2 are derived from the logarithmic price of Bitcoin (log(close)).
The smoothing periods and multipliers are user-configurable through inputs:
Smoothed EMA1 Period (default: 728)
Smoothed EMA2 Period (default: 728)
Initial EMA Multipliers (default: 1.0 for EMA1, 5.0 for EMA2)
A time decay factor is applied to the multipliers to adjust sensitivity over time, making the EMAs adaptive to market dynamics.
2. Logarithmic Domain Calculations
The script uses logarithmic transformations to enhance accuracy when dealing with large price changes.
Adjustments to EMAs are made in the logarithmic domain and converted back to the price domain for plotting.
3. EMA Forecasting
The script performs a linear regression analysis over a specified period (728 bars by default) to estimate future price trends for both EMAs.
Slope Adjustments:
RSI (Relative Strength Index) is incorporated to modify the forecast slope dynamically:
RSI > 70: Bearish adjustment (-0.5)
RSI < 30: Bullish adjustment (+0.5)
Forecasts are plotted as dashed lines, projecting future values of EMA1 (green) and EMA2 (red).
4. Order Block Detection
Detects order block levels based on high volume spikes relative to the average volume over a lookback period (default: 100 bars).
A volume multiplier (default: 1.5x) is applied to identify significant volume activity.
Two types of order blocks are identified:
Below EMA1: A price zone where significant buying occurred below EMA1.
Above EMA2: A price zone where significant selling occurred above EMA2.
Order blocks are visualized as shaded rectangles:
Green boxes represent order blocks below EMA1.
Red boxes represent order blocks above EMA2.
5. Customization Inputs
The script allows fine-tuning via the following parameters:
EMA Settings: Periods, multipliers, and time factors for both EMAs.
Volume Analysis Settings: Lookback period and volume multiplier for order block detection.
Order Block Box Settings: Height of the range as a percentage of the detected price.
6. Visualization
EMAs: Two smoothed exponential moving averages are plotted with configurable offsets.
Forecast Lines: Dashed lines project future EMA trends based on regression analysis.
Order Block Boxes: Highlight areas of high volume below EMA1 and above EMA2, indicating potential support or resistance zones.
How It Works in Practice
EMAs and Trend Analysis:
The EMAs represent long-term market trends, adjusted dynamically using custom multipliers and time decay.
The script forecasts the EMAs' future trajectories to anticipate potential price movements.
Order Blocks:
High-volume zones indicate areas where significant market activity occurred, providing insights into potential price reversal points or continuation zones.
RSI Integration:
RSI-based slope adjustment fine-tunes the EMA forecast, adding an extra layer of dynamic market context.
Comprehensive View:
By combining trend forecasts with volume-based zones, the script delivers a robust analysis tool for identifying potential entry/exit points, support/resistance levels, and long-term trend predictions.
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!
Previous Candle AverageDescription:
The Previous Candle Average indicator is a powerful tool designed to provide traders with insights into market momentum by visualizing the relationship between the current and previous open levels for a customizable timeframe. This versatile indicator allows you to select from various timeframes, including 1 Month, 1 Week, 1 Day, 8 Hours, 4 Hours, and 1 Hour, making it suitable for different trading strategies, whether you're a swing trader, day trader, or scalper.
The indicator plots the Current Open and Previous Open levels for the selected timeframe and calculates the average value between them. By displaying these critical levels, traders can quickly gauge the current market dynamics relative to the previous period, making it easier to identify support, resistance, or trend continuation.
Key Features:
Custom Timeframe Selection: Easily select the desired timeframe from a variety of options (1M, 1W, 1D, 8H, 4H, 1H) to align with your trading strategy.
Current and Previous Open Levels: The indicator plots both the Current Open and Previous Open levels for the chosen timeframe, providing clear visual guidance on where the market is opening relative to the previous period.
Open Fill with Adjustable Transparency: The area between the Current Open and Previous Open levels is filled with color to represent the relationship between the two. The fill color changes based on whether the Current Open is above or below the Previous Open, with a default 20% opacity for better clarity without overwhelming the chart.
Average Line: The indicator also plots the average value between the Current Open and Previous Open levels, painted by default in a solid white color with a line thickness of 2. This average helps identify potential key levels where the price might react.
Dynamic Coloring: The fill color changes dynamically based on whether the Current Open is higher or lower than the Previous Open, using green to indicate bullish behavior and red for bearish behavior.
How to Use:
The Previous Candle Average indicator can help traders identify the momentum of the market by visually comparing the relationship between consecutive open levels.
Use the Average Line as a reference for potential support or resistance, especially when the market opens near this average.
The Open Fill color can quickly indicate a shift in market sentiment. A green fill suggests that the market is opening stronger than the previous period, while a red fill indicates weakness.
Best Practices:
Combine this indicator with other technical analysis tools, such as trend lines, moving averages, or volume analysis, to confirm potential trading opportunities.
The custom timeframe feature is particularly useful for multi-timeframe analysis. For instance, you can monitor weekly open levels while trading on an hourly chart.
Note: The indicator uses real-time open data and is updated accordingly, ensuring there is no delay or repainting of historical values.
Ideal For:
Traders who want a clear visual representation of market open levels relative to previous periods.
Those who want to identify potential shifts in momentum by comparing open levels across different timeframes.
Traders seeking to add an additional layer of analysis to their existing strategy by incorporating key opening levels and their averages.
Crypto Arbitrage Scanner [CryptoSea]Crypto Arbitrage Scanner
The Crypto Arbitrage Scanner is an advanced tool designed to help traders identify arbitrage opportunities across multiple cryptocurrency exchanges. With the ability to compare prices, volumes, and differences in price, this indicator is a must-have for any trader seeking to exploit cross-exchange inefficiencies in real time.
Key Features
Multi-Exchange Price and Volume Comparison: Tracks data from multiple major cryptocurrency exchanges, including BINANCE, COINBASE, KUCOIN, and others, allowing traders to easily compare prices and volume across platforms.
Customizable Difference Metrics: Allows users to toggle between displaying price differences in percentages or absolute dollar values, depending on the preferred metric for arbitrage analysis.
Sorting and Filtering Options: Includes user-defined sorting options to order the data by Price, Volume, or Difference, helping to prioritize potential arbitrage opportunities based on the trader's chosen criteria.
Difference and Volume Thresholds: Users can specify the minimum volume and price difference thresholds, ensuring that only significant arbitrage opportunities are highlighted.
Real-Time Alerts: Built-in alert conditions notify users when arbitrage opportunities exceed their defined price difference thresholds, helping traders respond instantly to market movements.
The Crypto Arb Scanner displays a table of prices, volumes, and price differences across selected exchanges. Each exchange is listed along with the current close price, volume, and the difference in price compared to the average price across all exchanges. Highlighting is used to indicate significant differences that may present arbitrage opportunities.
In the example below, we can see a highlighted opportunity in green showing that the price is below the user inputed thresold.
How it Works
Data Collection: Gathers real-time volume and price data from various exchanges using a streamlined process, allowing for a detailed comparison.
Average Price Calculation: Computes the average price across all valid exchanges to identify where price discrepancies occur, providing a clear picture of arbitrage potential.
Sorting Mechanism: Utilizes custom sorting based on user preferences, making it easy to quickly analyze and identify key opportunities.
Dynamic Highlighting and Alerts: Price differences that exceed user-defined thresholds are highlighted, and alerts can be triggered for these arbitrage opportunities, allowing for a timely response.
Application
Arbitrage Trading: The Crypto Arb Scanner is ideal for traders looking to exploit price differences across exchanges, enabling efficient arbitrage opportunities.
Market Efficiency Analysis: Offers insights into the consistency of prices across exchanges, which can help gauge the efficiency and liquidity of the markets being traded.
Customizable Alerts: Set alerts based on price differences or volume, allowing traders to stay informed about changes without constantly monitoring the markets.
The Crypto Arbitrage Scanner is a powerful addition to any trader's toolkit, offering comprehensive features to detect arbitrage opportunities with confidence. With real-time monitoring, customizable metrics, and a user-friendly interface, this tool allows traders to make informed decisions and capitalize on inefficiencies across exchanges.
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
Drummond Geometry - Pldot and EnvelopeThis Pine Script will:
1.Calculate and display the PL Dot (Price Level Dot), a moving average that reflects short-term market trends.
2.Plot the Envelope Top and Bottom lines based on averages of previous highs and lows, which represent key areas of resistance and support.
Drummond Geometry Overview
Drummond Geometry is a method of market analysis focused on:
PL Dot : Captures market energy and trend direction. It reacts to price deviations and serves as a magnet for price returns, often referred to as a "PL Dot Refresh."
Envelope Theory : Considers price movements as cycles oscillating between the Envelope Top and Bottom. Prices breaking these boundaries often indicate trends, retracements, or exhaustion.
The geometry helps traders visualize energy flows in the market and anticipate directional changes using established support and resistance zones.
Understanding PL Dot and Envelope Top/Bottom
PL Dot:
Formula: Average(Average(H, L, C) of last three bars)
Usage: Indicates short-term trends:
Trend: PL Dot slopes upward or downward.
Congestion: PL Dot moves horizontally.
Envelope Top and Bottom:
Formula:
Top: (11 H1 + 11 H2 + 11 H3) / 3
Bottom: (11 L1 + 11 L2 + 11 L3) / 3
Usage: Acts as dynamic resistance and support:
Price above the top: Indicates strong bullish momentum.
Price below the bottom: Indicates strong bearish momentum.
Advantages of Drummond Geometry
Clarity of Market Flow: Highlights the relationship between price and key levels (PL Dot, Envelope Top/Bottom).
Predictive Power: Suggests possible reversals or continuation based on energy distribution.
Adaptability: Works across multiple time frames and market types (trending, congestion).
Trading Strategy
PL Dot Trades:
Buy: When price returns to the PL Dot in an uptrend.
Sell: When price returns to the PL Dot in a downtrend.
Envelope Trades:
Reversal: Trade counter to price if it breaks and retreats from the Envelope Top/Bottom.
Continuation: Trade in the direction of price if it sustains movement beyond the Envelope Top/Bottom.
Engulfing bar detectorHere’s the updated description with the added step about using Fibonacci levels across timeframes for confirmation:
Liquidity Engulfing Bar Detector
The **Liquidity Engulfing Bar Detector** is a powerful tool designed for traders who want to identify high-probability reversal patterns in the market based on liquidity grabbing and price action. This indicator highlights **Bullish Engulfing** and **Bearish Engulfing** bars that fulfill specific liquidity criteria, helping you spot potential trend reversals and trading opportunities.
**Features**:
1. **Bullish Engulfing Bars**:
- The current candle's low dips below the previous candle's low (grabs liquidity).
- The current candle closes above the previous candle's open.
- A green label is plotted above the engulfing bar for easy identification.
2. **Bearish Engulfing Bars**:
- The current candle's high exceeds the previous candle's high (grabs liquidity).
- The current candle closes below the previous candle's open.
- A red label is plotted below the engulfing bar for clear visibility.
3. **Customizable Alerts**:
- Receive instant notifications via TradingView alerts when a bullish or bearish engulfing pattern is detected.
- Alerts are fully customizable, allowing you to stay updated without actively monitoring the chart.
4. **Visual Markers**:
- Clear and intuitive labels make it easy to spot key patterns directly on your chart.
- Fully integrated with any timeframe and market, ensuring versatility for all trading styles.
---
### **How to Use**:
1. **Add the Indicator**:
- Apply the Liquidity Engulfing Bar Detector to your chart to automatically highlight bullish and bearish engulfing bars.
2. **Enable Alerts**:
- Set up TradingView alerts to get notified of potential setups in real-time.
3. **Analyze with Fibonacci Levels**:
- Draw a Fibonacci retracement tool over the identified engulfing bar, from its low to its high (for bullish patterns) or high to low (for bearish patterns).
- Use the following Fibonacci levels as key zones of interest:
- **0.0 (start)**, **0.25**, **0.5 (midpoint)**, **0.75**, and **1.0 (end)**.
- These levels often act as critical support or resistance zones for price action.
4. **Use Multi-Timeframe Confirmation**:
- Validate zones from higher timeframes using lower timeframe candles:
- **1-minute candles** for confirming zones on the **15-minute chart**.
- **5-minute candles** for confirming zones on the **1-hour chart**.
- **15-minute candles** for confirming zones on the **4-hour chart**.
- This approach ensures precision in your entry points and aligns intraday movements with higher timeframe setups.
5. **Integrate with Your Strategy**:
- Combine the indicator with other tools (e.g., trendlines, moving averages, or volume analysis) for confirmation.
- Use proper risk management to maximize your trading edge.
---
### **Why Use This Indicator?**
Liquidity grabs often signal the participation of major market players, which can lead to significant reversals or continuations. By combining liquidity concepts with engulfing bar patterns and Fibonacci analysis, this indicator helps you:
- Identify key market turning points.
- Improve your entries and exits with multi-timeframe precision.
- Enhance your trading strategy with an edge rooted in smart money concepts.
---
**Note**: This indicator is best used with proper risk management and alongside other technical or fundamental analyses.
---
Let me know if there's anything more you'd like to include!
Equal High and Low FinderThe Matching Close / Equal High Low Finder indicator identifies candles within a specified lookback period that have matching close prices while satisfying specific conditions:
Matching Candle Types:
Only matches bullish candles (close > open) with other bullish candles.
Only matches bearish candles (close < open) with other bearish candles.
Intermediate Candle Condition:
Bullish matches: No intermediate candle between the two matching candles can have a higher close price than the first candle.
Bearish matches: No intermediate candle between the two matching candles can have a lower close price than the first candle.
Gap Between Matches: Ensures at least one intermediate candle exists with a close price different from the matched candles.
Customizable Features:
Adjustable lookback period.
Configurable line style, width, and colors for bullish and bearish matches.
This indicator visually connects the matching candles with lines, offering a clear visual cue for price behavior.
Dix$on's Weighted Volume FlowDixson's Weighted Volume Flow
Dixson's Weighted Volume Flow is a technical indicator designed to analyze and visualize the distribution of buy and sell volume within a given timeframe. It dynamically calculates the proportional allocation of volume based on price action within each bar, providing insights into market sentiment and activity. This indicator displays horizontal volume bars in a separate pane and annotates them with precise volume values.
How It Works
1. Volume Allocation:
- The indicator calculates buy and sell volume using the following formulas:
- Buy Volume = (Close - Low) / (High - Low) Total Volume
- Sell Volume = (High - Close) / (High - Low) Total Volume
- These formulas allocate volume proportionally based on the bar's price range, attributing more volume to buying or selling depending on the relationship between the close, high, and low prices.
2. Dynamic Scaling:
- The buy and sell volumes are scaled relative to their combined total for the period.
- The resulting values determine the length of the horizontal bars, providing a comparative view of buy and sell activity.
3. Bar Visualization:
- Buy Volume Bars: Displayed as green horizontal bars.
- Sell Volume Bars: Displayed as red horizontal bars.
- The lengths of the bars represent the dominance of buy or sell volume, scaled dynamically within the pane.
4. Labels:
- Each bar is annotated with a label showing its calculated buy or sell volume value.
5. Timeframe Adjustment:
- The indicator uses the request.security() function to fetch data from the selected timeframe, allowing users to customize their analysis for intraday, daily, or longer-term trends.
6. Customization Options:
- Enable or disable the indicator using a toggle.
- Adjust colors for the buy/sell bars and text labels to suit your chart theme.
How to Use It
1. Enable the Indicator:
- Activate the indicator using the "Enable/Disable" toggle in the settings.
2. Select a Timeframe:
- Choose the timeframe for analysis (e.g., 1-minute, 1-hour, daily). The indicator fetches volume data specific to the selected timeframe.
3. Interpret the Visualization:
- Compare Bar Lengths:
- Longer buy volume bars (green) indicate stronger buying activity.
- Longer sell volume bars (red) suggest dominant selling pressure.
- Labels:
- Use the labels to view the exact buy and sell volume values for precise analysis.
4. Combine with Other Tools:
- Use the indicator alongside price action analysis, support/resistance levels, or trend indicators to confirm market sentiment and detect potential reversals.
5. Monitor Imbalances:
- Significant disparities between buy and sell volume can signal shifts in market sentiment, such as the end of a trend or the start of a breakout.
Practical Applications
- Trend Confirmation:
- Align the dominance of buy or sell volume with price trends to confirm market direction.
- Reversal Signals:
- Watch for volume imbalances or a sudden shift in the dominance of buy or sell volume to identify potential reversals.
- High-Activity Zones:
- Identify areas with increased volume to anticipate significant price movements or key support/resistance interactions.
Dixson's Weighted Volume Flow provides a clear and systematic way to analyze market activity by visualizing the dynamics of buy and sell volume. It is particularly useful for traders looking to enhance their understanding of volume-based sentiment and its impact on price movements.
Enhanced Kaufman Adaptive Moving Average (KAMA) with Bollinger B# Enhanced Kaufman Adaptive Moving Average (KAMA) with Bollinger Bands
## Overview
This indicator combines the Kaufman Adaptive Moving Average (KAMA) with Bollinger Bands to create a comprehensive trading system. It provides adaptive trend following capabilities while measuring market volatility and potential reversal points.
## Key Features
- Adaptive moving average that adjusts to market conditions
- Dynamic Bollinger Bands for volatility measurement
- Color-coded KAMA line indicating trend direction
- Integrated buy/sell signals based on multiple confirmations
- Customizable parameters for both KAMA and Bollinger Bands
- Optional bar confirmation wait feature
- Built-in alert conditions for trade signals
## Main Components
### 1. Kaufman Adaptive Moving Average (KAMA)
- Adapts to market volatility using an efficiency ratio
- Changes color based on trend direction (green for uptrend, red for downtrend)
- Adjustable parameters for fine-tuning:
- Base Length: Controls the main calculation period (default: 10)
- Fast EMA Length: For rapid market response (default: 2)
- Slow EMA Length: For stable market conditions (default: 30)
### 2. Bollinger Bands
- Standard deviation-based volatility bands
- Customizable length and standard deviation multiplier
- Includes expansion threshold for volatility measurement
- Components:
- Upper Band: Upper volatility threshold
- Middle Band: Simple moving average
- Lower Band: Lower volatility threshold
## Signal Generation
### Buy Signals
Generated when:
1. KAMA color changes from red to green
2. Price closes above KAMA
3. Price closes above the middle Bollinger Band
4. Signals are marked with:
- Green triangles below the candles
- "B" labels for easy identification
### Sell Signals
Generated when:
1. KAMA color changes from green to red
2. Price closes below KAMA
3. Price closes below the middle Bollinger Band
4. Signals are marked with:
- Red triangles above the candles
- "S" labels for easy identification
## Customizable Parameters
### KAMA Settings
- Base Length (1-50)
- Fast EMA Length (1-10)
- Slow EMA Length (10-50)
- Source Price Selection
- Direction Highlight Toggle
- Bar Confirmation Option
### Bollinger Bands Settings
- Length (default: 20)
- Standard Deviation Multiplier (default: 2.0)
- Expansion Threshold (0.1-3.0)
## Alert Functionality
Built-in alerts for:
- Buy signals with customizable messages
- Sell signals with customizable messages
## Best Practices
### Timeframe Selection
- Works well on multiple timeframes
- Recommended for 15m to 4h charts for optimal signal generation
- Higher timeframes provide more reliable trend signals
### Parameter Optimization
- Adjust KAMA lengths based on trading style:
- Shorter lengths for day trading
- Longer lengths for swing trading
- Fine-tune BB multiplier based on market volatility
- Consider waiting for bar confirmation in volatile markets
### Risk Management
- Use in conjunction with other indicators for confirmation
- Consider market conditions and volatility when trading signals
- Implement proper position sizing and stop-loss levels
## Technical Notes
- Written in Pine Script™ v6
- Overlay indicator (displays on price chart)
- Compatible with all TradingView-supported markets
- Resource-efficient implementation for smooth performance
## Disclaimer
This indicator is provided under the Mozilla Public License 2.0. While it can be a valuable tool for technical analysis, it should not be used as the sole basis for trading decisions. Always combine with proper risk management and additional analysis methods.
Quick scan for signal🙏🏻 Hey TV, this is QSFS, following:
^^ Quick scan for drift (QSFD)
^^ Quick scan for cycles (QSFC)
As mentioned before, ML trading is all about spotting any kind of non-randomness, and this metric (along with 2 previously posted) gonna help ya'll do it fast. This one will show you whether your time series possibly exhibits mean-reverting / consistent / noisy behavior, that can be later confirmed or denied by more sophisticated tools. This metric is O(n) in windowed mode and O(1) if calculated incrementally on each data update, so you can scan Ks of datasets w/o worrying about melting da ice.
^^ windowed mode
Now the post will be divided into several sections, and a couple of things I guess you’ve never seen or thought about in your life:
1) About Efficiency Ratios posted there on TV;
Some of you might say this is the Efficiency Ratio you’ve seen in Perry's book. Firstly, I can assure you that neither me nor Perry, just as X amount of quants all over the world and who knows who else, would say smth like, "I invented it," lol. This is just a thing you R&D when you need it. Secondly, I invite you (and mods & admin as well) to take a lil glimpse at the following screenshot:
^^ not cool...
So basically, all the Efficiency Ratios that were copypasted to our platform suffer the same bug: dudes don’t know how indexing works in Pine Script. I mean, it’s ok, I been doing the same mistakes as well, but loxx, cmon bro, you... If you guys ever read it, the lines 20 and 22 in da code are dedicated to you xD
2) About the metric;
This supports both moving window mode when Length > 0 and all-data expanding window mode when Length < 1, calculating incrementally from the very first data point in the series: O(n) on history, O(1) on live updates.
Now, why do I SQRT transform the result? This is a natural action since the metric (being a ratio in essence) is bounded between 0 and 1, so it can be modeled with a beta distribution. When you SQRT transform it, it still stays beta (think what happens when you apply a square root to 0.01 or 0.99), but it becomes symmetric around its typical value and starts to follow a bell-shaped curve. This can be easily checked with a normality test or by applying a set of percentiles and seeing the distances between them are almost equal.
Then I noticed that on different moving window sizes, the typical value of the metric seems to slide: higher window sizes lead to lower typical values across the moving windows. Turned out this can be modeled the same way confidence intervals are made. Lines 34 and 35 explain it all, I guess. You can see smth alike on an autocorrelogram. These two match the mean & mean + 1 stdev applied to the metric. This way, we’ve just magically received data to estimate alpha and beta parameters of the beta distribution using the method of moments. Having alpha and beta, we can now estimate everything further. Btw, there’s an alternative parameterization for beta distributions based on data length.
Now what you’ll see next is... u guys actually have no idea how deep and unrealistically minimalistic the underlying math principles are here.
I’m sure I’m not the only one in the universe who figured it out, but the thing is, it’s nowhere online or offline. By calculating higher-order moments & combining them, you can find natural adaptive thresholds that can later be used for anomaly detection/control applications for any data. No hardcoded thresholds, purely data-driven. Imma come back to this in one of the next drops, but the truest ones can already see it in this code. This way we get dem thresholds.
Your main thresholds are: basis, upper, and lower deviations. You can follow the common logic I’ve described in my previous scripts on how to use them. You just register an event when the metric goes higher/lower than a certain threshold based on what you’re looking for. Then you take the time series and confirm a certain behavior you were looking for by using an appropriate stat test. Or just run a certain strategy.
To avoid numerous triggers when the metric jitters around a threshold, you can follow this logic: forget about one threshold if touched, until another threshold is touched.
In general, when the metric gets higher than certain thresholds, like upper deviation, it means the signal is stronger than noise. You confirm it with a more sophisticated tool & run momentum strategies if drift is in place, or volatility strategies if there’s no drift in place. Otherwise, you confirm & run ~ mean-reverting strategies, regardless of whether there’s drift or not. Just don’t operate against the trend—hedge otherwise.
3) Flex;
Extension and limit thresholds based on distribution moments gonna be discussed properly later, but now you can see this:
^^ magic
Look at the thresholds—adaptive and dynamic. Do you see any optimizations? No ML, no DL, closed-form solution, but how? Just a formula based on a couple of variables? Maybe it’s just how the Universe works, but how can you know if you don’t understand how fundamentally numbers 3 and 15 are related to the normal distribution? Hm, why do they always say 3 sigmas but can’t say why? Maybe you can be different and say why?
This is the primordial power of statistical modeling.
4) Thanks;
I really wanna dedicate this to Charlotte de Witte & Marion Di Napoli, and their new track "Sanctum." It really gets you connected to the Source—I had it in my soul when I was doing all this ∞
4-Frame Trend CountThis script tracks the current close vs the close from 4 time frames prior to spot a trend reversal after 9 consecutive up or down moves.
Four Supertrend By Baljit AujlaThis Pine Script is an implementation of a "Four Supertrend" indicator by Baljit Aujla. It calculates and plots four Supertrend indicators based on the Average True Range (ATR) method, allowing for different ATR periods and multipliers for each line.
Here is an explanation of the key components:
Inputs
1:- ATR Periods: Four different periods for ATR, adjustable by the user (defaults: 10, 11, 12, 13).
2:- ATR Multipliers: Four different multipliers for the ATR, adjustable by the user (defaults: 1.0, 2.0, 3.0, 4.0).
3:- Source: The data source used for calculation, default is the average of high and low prices (hl2).
4:- Change ATR Calculation Method: Option to switch between the traditional ATR and a simple moving average of true range (SMA of TR).
5:- Signal Display- Options to show buy/sell signals and highlight trends.
Logic:
The script computes four separate Supertrend lines using the ATR method for each line. For each of the four lines, it calculates an uptrend and downtrend threshold, and the trend direction changes when the close price crosses these thresholds.
For each trend line:
1. Uptrend and Downtrend Calculation: The script uses ATR-based bands above and below the price. The uptrend line is calculated by subtracting the ATR multiplied by a given multiplier from the source price, and the downtrend line is calculated by adding the ATR multiplied by a multiplier to the source price.
2. Trend Reversal Logic: The trend switches based on the price action relative to the uptrend and downtrend lines. If the price moves above the downtrend, it signals a switch to an uptrend, and vice versa for a downtrend.
3. Signal Generation: Buy signals occur when the trend changes from negative to positive (down to up), and sell signals occur when the trend changes from positive to negative (up to down).
Plots:
The script plots:
Uptrend and Downtrend Lines: These are visualized as green and red lines for each trend.
Buy/Sell Signals: Small circles are drawn on the chart when a trend change occurs (buy and sell signals).
Trend Highlighting: Background highlighting is applied to show when the market is in an uptrend (green) or downtrend (red).
Alerts:
The script has commented-out alert conditions (alertcondition), which can be enabled to send notifications when a buy or sell signal occurs, or when a trend change happens.
Enhancements:
1. Background Highlighting: This is an option to visually emphasize uptrends and downtrends by filling the background with respective colors.
2. Signal Visibility: You can toggle whether to show the buy/sell signals on the chart.
3. ATR Calculation Method: Option to change the ATR calculation method (using SMA of TR vs the default ATR).
The script is useful for identifying multi-timeframe trends with adjustable parameters and provides both signals and visual markers on the chart to aid in trading decisions.
Issues and Improvements:
The code seems to be truncated, specifically for the last Supertrend line (Line 4). To fully complete the functionality for the fourth line, the logic for up4, down4 and tread4 needs to be finished, similar to the other three lines.
Would you like help finishing the script for the fourth line or improving specific parts of it?
Richs Market StructureThis Pine Script indicator, "Last Bullish High & Lowest Low Tracker with Timeframe Background and Fill", is designed to visually track bullish and bearish trends based on price action on the current chart and a user-defined timeframe. It provides dynamic line plotting, area fills, and background coloring to represent trend alignment between the current chart and the selected timeframe.
Features and Functionalities
Tracks Bullish Highs and Bearish Lows:
The script identifies:
Bullish High: The highest price reached after a bullish (green) candle.
Bearish Low: The lowest price reached after a bearish (red) candle.
It dynamically updates these levels based on the price movements.
Line Plotting:
Current Chart Lines:
The Plotted Bullish High line (green/red) indicates the last bullish high.
The Lowest Low line (green/red) indicates the last bearish low.
Selected Timeframe Lines:
A separate set of lines is plotted for the user-defined timeframe (e.g., daily, weekly):
A Bullish High Line for the selected timeframe (lighter green).
A Lowest Low Line for the selected timeframe (lighter red).
Dynamic Area Fills:
The area between the Plotted Bullish High and Lowest Low is filled:
Green Fill: When both lines are green (indicating a bullish alignment).
Red Fill: When both lines are red (indicating a bearish alignment).
For the selected timeframe:
The area between the timeframe-specific Bullish High and Lowest Low is similarly filled with lighter colors.
Background Color Based on Timeframe Alignment:
The background color represents the trend alignment on the selected timeframe:
Green Background: When the timeframe’s Bullish High is rising and Lowest Low is rising (bullish trend).
Red Background: When the timeframe’s Bullish High is falling and Lowest Low is falling (bearish trend).
What It’s For
This indicator is designed for traders who want to:
Visualize Trends Across Timeframes:
It helps identify when the current chart’s trend aligns with a higher timeframe trend (e.g., daily, weekly).
Useful for multi-timeframe analysis.
Spot Bullish and Bearish Trends:
The color-coded lines and fills clearly show the dominant trend on both the current chart and the selected timeframe.
Plan Trades Based on Trend Alignment:
When the current chart and selected timeframe show the same trend:
Both lines and fills turn green (bullish).
Both lines and fills turn red (bearish).
This alignment is a potential signal for entering long or short trades.
Identify Reversals and Divergences:
Divergence between the current chart and timeframe trends (e.g., green on one, red on the other) may indicate trend weakening or reversal.
Visual Elements
Lines:
Solid lines (current chart): Represent the Plotted Bullish High and Lowest Low.
Dashed/lighter lines (selected timeframe): Represent the timeframe-specific Bullish High and Lowest Low.
Fills:
Green/Red fills highlight trend zones:
On the current chart (darker).
On the selected timeframe (lighter).
Background:
The entire chart background turns green or red based on the selected timeframe’s trend alignment.
Summary
This indicator is ideal for traders who want a clear visual representation of price trends and multi-timeframe alignment. It simplifies trend-following strategies by providing:
Easy-to-interpret fills and background colors.
Clear bullish and bearish zones.
Multi-timeframe trend confirmation.
Super CCI By Baljit AujlaThe indicator you've shared is a custom CCI (Commodity Channel Index) with multiple types of Moving Averages (MA) and Divergence Detection. It is designed to help traders identify trends and reversals by combining the CCI with various MAs and detecting different types of divergences between the price and the CCI.
Key Components of the Indicator:
CCI (Commodity Channel Index):
The CCI is an oscillator that measures the deviation of the price from its average price over a specific period. It helps identify overbought and oversold conditions and the strength of a trend.
The CCI is calculated by subtracting a moving average (SMA) from the price and dividing by the average deviation from the SMA. The CCI values fluctuate above and below a zero centerline.
Multiple Moving Averages (MA):
The indicator allows you to choose from a variety of moving averages to smooth the CCI line and identify trend direction or support/resistance levels. The available types of MAs include:
SMA (Simple Moving Average)
EMA (Exponential Moving Average)
WMA (Weighted Moving Average)
HMA (Hull Moving Average)
RMA (Running Moving Average)
SMMA (Smoothed Moving Average)
TEMA (Triple Exponential Moving Average)
DEMA (Double Exponential Moving Average)
VWMA (Volume-Weighted Moving Average)
ZLEMA (Zero-Lag Exponential Moving Average)
You can select the type of MA to use with a specified length to help identify the trend direction or smooth out the CCI.
Divergence Detection:
The indicator includes a divergence detection mechanism to identify potential trend reversals. Divergences occur when the price and an oscillator like the CCI move in opposite directions, signaling a potential change in price momentum.
Four types of divergences are detected:
Bullish Divergence: Occurs when the price makes a lower low, but the CCI makes a higher low. This indicates a potential reversal to the upside.
Bearish Divergence: Occurs when the price makes a higher high, but the CCI makes a lower high. This indicates a potential reversal to the downside.
Hidden Bullish Divergence: Occurs when the price makes a higher low, but the CCI makes a lower low. This suggests a continuation of the uptrend.
Hidden Bearish Divergence: Occurs when the price makes a lower high, but the CCI makes a higher high. This suggests a continuation of the downtrend.
Each type of divergence is marked on the chart with arrows and labels to alert traders to potential trading opportunities. The labels include the divergence type (e.g., "Bull Div" for Bullish Divergence) and have customizable text colors.
Visual Representation:
The CCI and its associated moving average are plotted on the indicator panel below the price chart. The CCI is plotted as a line, and its color changes depending on whether it is above or below the moving average:
Green when the CCI is above the MA (indicating bullish momentum).
Red when the CCI is below the MA (indicating bearish momentum).
Horizontal lines are drawn at specific levels to help identify key CCI thresholds:
200 and -200 levels indicate extreme overbought or oversold conditions.
75 and -75 levels represent less extreme levels of overbought or oversold conditions.
The 0 level acts as a neutral or baseline level.
A background color fill between the 75 and -75 levels helps highlight the neutral zone.
Customization Options:
CCI Length: You can customize the length of the CCI, which determines the period over which the CCI is calculated.
MA Length: The length of the moving average applied to the CCI can also be adjusted.
MA Type: Choose from a variety of moving averages (SMA, EMA, WMA, etc.) to smooth the CCI.
Divergence Detection: The indicator automatically detects the four types of divergences (bullish, bearish, hidden bullish, hidden bearish) and visually marks them on the chart.
How to Use the Indicator:
Trend Identification: When the CCI is above the selected moving average, it suggests bullish momentum. When the CCI is below the moving average, it suggests bearish momentum.
Overbought/Oversold Conditions: The CCI values above 100 or below -100 indicate overbought and oversold conditions, respectively.
Divergence Analysis: The detection of bullish or bearish divergences can signal potential trend reversals. Hidden divergences may suggest trend continuation.
Trading Signals: You can use the divergence markers (arrows and labels) as potential buy or sell signals, depending on whether the divergence is bullish or bearish.
Practical Application:
This indicator is useful for traders who want to:
Combine the CCI with different moving averages for trend-following strategies.
Identify overbought and oversold conditions using the CCI.
Use divergence detection to anticipate potential trend reversals or continuations.
Have a highly customizable tool for various trading strategies, including trend trading, reversal trading, and divergence-based trading.
Overall, this is a comprehensive tool that combines multiple technical analysis techniques (CCI, moving averages, and divergence) in a single indicator, providing traders with a robust way to analyze price action and spot potential trading opportunities.
RS Cycles [QuantVue]The RS Cycles indicator is a technical analysis tool that expands upon traditional relative strength (RS) by incorporating Beta-based adjustments to provide deeper insights into a stock's performance relative to a benchmark index. It identifies and visualizes positive and negative performance cycles, helping traders analyze trends and make informed decisions.
Key Concepts:
Traditional Relative Strength (RS):
Definition: A popular method to compare the performance of a stock against a benchmark index (e.g., S&P 500).
Calculation: The traditional RS line is derived as the ratio of the stock's closing price to the benchmark's closing price.
RS=Stock Price/Benchmark Price
Usage: This straightforward comparison helps traders spot periods of outperformance or underperformance relative to the market or a specific sector.
Beta-Adjusted Relative Strength (Beta RS):
Concept: Traditional RS assumes equal volatility between the stock and benchmark, but Beta RS accounts for the stock's sensitivity to market movements.
Calculation:
Beta measures the stock's return relative to the benchmark's return, adjusted by their respective volatilities.
Alpha is then computed to reflect the stock's performance above or below what Beta predicts:
Alpha=Stock Return−(Benchmark Return×β)
Significance: Beta RS highlights whether a stock outperforms the benchmark beyond what its Beta would suggest, providing a more nuanced view of relative strength.
RS Cycles:
The indicator identifies positive cycles when conditions suggest sustained outperformance:
Short-term EMA (3) > Mid-term EMA (10) > Long-term EMA (50).
The EMAs are rising, indicating positive momentum.
RS line shows upward movement over a 3-period window.
EMA(21) > 0 confirms a broader uptrend.
Negative cycles are marked when the opposite conditions are met:
Short-term EMA (3) < Mid-term EMA (10) < Long-term EMA (50).
The EMAs are falling, indicating negative momentum.
RS line shows downward movement over a 3-period window.
EMA(21) < 0 confirms a broader downtrend.
This indicator combines the simplicity of traditional RS with the analytical depth of Beta RS, making highlighting true relative strength and weakness cycles.
Awesome_Accelerator_Zone OscillatorExplanation and Usage Guide for AO_AC_ZONE Oscillator
Indicator Overview
The **AO_AC_ZONE** oscillator is based on the concepts introduced by **Bill Williams** in his book *New Trading Dimensions*. This indicator combines the **Awesome Oscillator (AO)**, **Accelerator Oscillator (AC)**, and a custom **Zone Oscillator**, visualizing them together in a clear, color-coded format.
The Zone Oscillator is derived from the relationship between AO and AC, indicating the market's dominant momentum state (bullish, bearish, or neutral). It also integrates real-time candle coloring to visually align price bars with the Zone's momentum.
---
**Components**
1. **Awesome Oscillator (AO)**:
- AO measures the difference between a 5-period and 34-period Simple Moving Average (SMA) applied to the midpoints of candles.
- It reflects market momentum, where:
- Green bars = increasing momentum
- Red bars = decreasing momentum
2. **Accelerator Oscillator (AC)**:
- AC is calculated as the difference between AO and its 5-period SMA.
- It indicates the acceleration or deceleration of market momentum.
- Fuchsia bars = increasing momentum
- Purple bars = decreasing momentum
3. **Zone Oscillator**:
- The Zone combines AO and AC states:
- **Green Zone**: Both AO and AC are positive (bullish momentum).
- **Red Zone**: Both AO and AC are negative (bearish momentum).
- **Gray Zone**: AO and AC have differing signs (neutral/uncertain momentum).
- Candle colors dynamically match the Zone’s state for enhanced visual clarity.
---
**How to Use the Indicator**
**1. Interpreting the Oscillators**
- **AO**: Use it to detect momentum direction and changes. Pay attention to shifts in bar color:
- **Increasing AO (Aqua)**: Bullish momentum gaining strength.
- **Decreasing AO (Navy)**: Bullish momentum weakening or bearish momentum strengthening.
- **AC**: Provides early signals of momentum shifts.
- If AC changes color ahead of AO, it signals potential trend reversals or accelerations.
**2. Using the Zone Oscillator**
- **Green Zone**:
- Both AO and AC are positive.
- Indicates a strong bullish trend. Look for buying opportunities in line with the trend.
- **Red Zone**:
- Both AO and AC are negative.
- Signals strong bearish momentum. Look for shorting opportunities.
- **Gray Zone**:
- AO and AC are in conflict.
- Represents uncertainty; avoid trading or wait for a clear signal.
---
**Real-Time Application**
**Candle Coloring**
- The indicator modifies candle colors to match the Zone Oscillator's state:
- **Green Candles**: Strong bullish momentum.
- **Red Candles**: Strong bearish momentum.
- **Gray Candles**: Neutral momentum.
**Recommended Strategy (Based on New Trading Dimensions)**:
1. **Identify the Zone**:
- Focus on Green Zones for long entries and Red Zones for short entries.
2. **Look for AO/AC Confirmation**:
- Enter trades in the direction of both AO and AC when they align with the Zone.
- For exits, monitor when AO and AC conflict (Gray Zone).
3. **Use in Combination**:
- Combine this oscillator with fractals or trend indicators to confirm signals.
---
**Benefits**
- Visualizes momentum strength, acceleration, and alignment in one chart.
- Simplifies decision-making by integrating price action with oscillator dynamics.
- Supports faster trade identification and execution by highlighting bullish, bearish, and neutral zones.
---
**Disclaimer**
This indicator is a tool to assist in market analysis. Always incorporate proper risk management and avoid trading during uncertain conditions (Gray Zones). For optimal results, use this oscillator in conjunction with other analysis methods like support/resistance, volume analysis, and trend-following systems.
IV Rank/Percentile with Williams VIX FixDisplay IV Rank / IV Percentile
This indicator is based on William's VixFix, which replicates the VIX—a measure of the implied volatility of the S&P 500 Index (SPX). The key advantage of the VixFix is that it can be applied to any security, not just the SPX.
IV Rank is calculated by identifying the highest and lowest implied volatility (IV) values over a selected number of past periods. It then determines where the current IV lies as a percentage between these two extremes. For example, if over the past five periods the highest IV was 30%, the lowest was 10%, and the current IV is 20%, the IV Rank would be 50%, since 20% is halfway between 10% and 30%.
IV Percentile, on the other hand, considers all past IV values—not just the highest and lowest—and calculates the percentage of these values that are below the current IV. For instance, if the past five IV values were 30%, 10%, 11%, 15%, and 17%, and the current IV is 20%, the IV Rank remains at 50%. However, the IV Percentile is 80% because 4 out of the 5 past values (80%) are below the current IV of 20%.
Real-Time Custom Candle Range Color Indicator
The script allows the user to input a custom range value (default set to 100 points) through the userDefinedRange variable. This value determines the minimum range required for a candle to change color.
Calculating Candle Range:
The script calculates the range of each candle by subtracting the low from the high price.
Determining Bullish or Bearish Candles:
It checks whether the close price is higher than the open price to determine if a candle is bullish (isBullish variable).
Coloring Candles:
Based on the custom range input, the script changes the color of the candles:
If the candle's range is greater than or equal to the custom range and it is bullish, the candle color is set to blue (bullishColor).
If the range condition is met and the candle is bearish, the color is set to orange (bearishColor).
If the range condition is not met, the color is set to na (not applicable).
Plotting Colored Candles:
The plotcandle function is used to plot candles with colors based on the custom range and bullish/bearish conditions. The candles will have a higher z-order to be displayed in front of default candles.
Displaying High and Low Price Points:
Triangular shapes are plotted at the high and low price levels using the plotshape function, with colors representing bullish (blue) and bearish (orange) conditions.
In trading, this indicator can help traders visually identify candles that meet a specific range criteria, potentially signaling strength or weakness in price movements. By customizing the range parameter, traders can adapt the indicator to different market conditions and trading strategies. It can be used in conjunction with other technical analysis tools to make informed trading decisions based on candlestick patterns and price movements.