Bull Bear Candles with Volume ProfileUser Guide for Bull Bear Candles Indicator with Keltner Channels
Author: NellyN
Introduction
This indicator helps identify potential bullish and bearish trends in the market by analyzing buying and selling volume over two configurable timeframes. It calculates the percentage of buying and selling volume and displays the current market condition based on two moving averages for 2 periods.
Key Features
• Volume Analysis : Calculates Buy and Sell Volume for two configurable timeframes (e.g., 5 min, 15 min, 15 min. and 1 hour, etc.) and displays them as percentages.
• Moving Averages : Uses one Moving Average (MA) for two different time periods to identify trends (uptrend when shorter-term MA is above longer-term MA). You can also choose other Moving Average types like SMA, EMA, WMA, RMA, VWMA, or HMA.
• Colored Candles : Candles are colored green for bullish conditions, red for bearish conditions, and gray for neutral conditions.
• Market Condition Labels : Displays labels in table-view indicating the current market condition based on Buy and Sell Volume (Very Bullish, Very Bearish, Bullish/Bearish Retracement, Chop).
• Alerts: Generates alerts for potential buy and sell signals based on indicator conditions (Note: Enable alerts in the indicator settings).
• Visual Signals: Provides visual signals through colored candles and market condition labels in addition to alerts.
Input Parameters
• Source: Close price (default) or Heikin Ashi
• Timeframe: Select the timeframe for price and volume data used in the indicator (e.g., Daily, Hourly).
• Colored Candles On: Enable (True) or disable (False) coloring candles based on market conditions.
• Enable Alerts: Enable (True) or disable (False) alerts for buy/sell signals.
• Length of MA: Sets the length for the MAs used in trend identification (minimum 1).
• Lookback Period Vol. 1 & 2: Define the timeframes used to calculate buying and selling volume and the MA calculation (e.g., 5 min, 15 min).
Understanding the Outputs
• Cloud Fill: The area between two MAs is filled with a color that reflects the trend (green for uptrend, red for downtrend).
• Table: Shows Buy Volume, Sell Volume, Buy Percentage, Sell Percentage, and the current Market Condition Labels. (If you decide to see them uncomment them from the code simply removing the // in front of the code)
• Colored Candles and Market Condition Labels: Look for green candles and bullish labels for potential buying opportunities, and vice versa for red candles and bearish labels.
Bullish green label appears when short-term MA is above long-term MA AND Buy Volume percentage is greater than 50%.
Red cross for exiting long entry appears when we have bearish volume OR bearish crossover of the MA for the 2 periods.
Bearish red label appears when short-term MA is below long-term MA AND Buy Volume percentage is less than 50%.
Green cross for exiting short entry appears when we have bullish volume OR bullish crossover of the MA for the 2 periods.
• Bullish/Bearish Retracement: The moving averages indicate a potential trend reversal, while the Buy Volume percentage suggests a continuation of the prior trend. The candle color may be green, red, or gray depending on the current price position relative to the moving averages.
• Chop (Gray Candle): The moving averages are flat and the Buy Volume percentage is not significantly above or below 50%.
• Buy/Sell Alerts: The indicator generates alerts based on specific conditions, but these should be used in conjunction with other trading strategies and careful risk management.
Important Notes
• This indicator is for informational purposes only and should not be considered financial advice. Back-test the indicator with historical data to understand its performance before using it for live trading.
• Combine this indicator with other technical analysis tools.
Волатильность
Price Channel with SupertrendOverview
This Pine Script creates an indicator named "Price Channel with Supertrend" that overlays on the main chart. It combines the Price Channel and Supertrend indicators, and includes various customization options for colors and bar conditions.
Key Components
Inputs:
length: Length for the Price Channel.
channel: Boolean to enable/disable the Price Channel.
Various color inputs for customization.
Bar Conditions:
Identifies different types of bars (e.g., inside bars, outside bars, up days, down days) and sets colors accordingly.
Price Channel:
Calculates the upper and lower bounds of the Price Channel using the highest high and lowest low over the specified length.
Plots the Price Channel if enabled.
Supertrend:
Uses ATR (Average True Range) to calculate the Supertrend.
Plots the Supertrend line with color changes based on the trend direction.
Bar Coloring:
Colors bars based on conditions like outside bars and Supertrend direction.
Buy and Sell Signals:
Generates buy and sell signals based on crossovers and crossunders of the closing price with the Supertrend line.
Plots labels for these signals on the chart.
Plotting
Price Channel: Plots the upper and lower bounds.
Supertrend: Plots the Supertrend line with color changes.
ATR: Uses ATR for Supertrend calculation.
Bar Colors: Colors bars based on conditions.
Signals: Plots buy and sell signals with labels.
ORB Screener with Trailing SLThis is an extension to our already published script ORB with ATR Trailing SL indicator
Many people requested to add screener to the existing indicator but since it's slowing down the performance heavily, we decided to add this as a separate screener.
Note: This screener does NOT plot the chart and so you want to have both plotting and screener, use both scripts together.
Overview:
The ORB Screener is a TradingView indicator designed to assist traders in identifying breakout opportunities based on the Opening Range Breakout (ORB) strategy. It features multi-symbol screening, customizable session timeframes, and a detailed table for quick visual reference and stock scanning.
The ORB Screener utilizes the ORB strategy to calculate breakout levels for multiple symbols. It identifies the high and low during a specified session (e.g., first 5 minutes after market open) and provides insights on whether the price is above the high (bullish), below the low (bearish), or between the range (neutral).
Additionally, the script calculates and displays the RSI values for each symbol, aiding traders in assessing momentum alongside breakout status.
Note: One can add up to 40 symbols for screening the stocks.
Key Features and Inputs:
ORB Session Time: Define a specific timeframe (e.g., "0915-0920") during which the ORB high and low are calculated. This serves as the foundation for identifying breakouts.
Multi-Symbol Screening: Screen up to 40 symbols at once, enabling you to monitor multiple opportunities without switching charts.
Breakout Validation:
Select from two methods for confirming a breakout: Close (based on closing prices) or Touch (based on intraday highs/lows).
Breakout Status Indicators:
Above High: Indicates a current bullish breakout when the price exceeds the ORB high.
Below Low: Indicates a current bearish breakout when the price falls below the ORB low.
Between Range: Indicates no breakout (price remains within the range).
RSI Integration : Calculates the RSI for each symbol to help traders evaluate momentum alongside breakout signals.
Customizable Table Display:
Position: Place the data table at the top, middle, or bottom of the chart and align it left, center, or right.
Size: Choose from multiple table size options for optimal visibility (Auto, Huge, Large, Normal, Small, Tiny).
Visual Feedback:
Green Background: Indicates a breakout happened at least once above the ORB high.
Red Background: Indicates a breakout happened at least once below the ORB low.
Gray Background: Indicates price is within the ORB range.
Zone de Consolidation **"Consolidation Zone"** indicator:
---
Indicator Name:
Consolidation Zone
---
Description :
This indicator is designed to identify and highlight price consolidation periods on a chart. A consolidation zone is defined as a period where price movement remains confined within a narrow range over a specified time period. The tool visualizes these zones by plotting the boundaries of the consolidation (highs and lows) and optionally adds a background highlight for clearer identification.
---
**User Parameters**:
1. **Consolidation Period** (`length`):
- Determines the number of periods used to calculate the highest and lowest prices.
- Default: 20.
- Minimum: 1.
2. **Range Threshold (%)** (`range_threshold`):
- Sets the maximum percentage variation between the high and low for a range to be considered a consolidation.
- Default: 1.0% (indicating a tight price movement).
- Minimum: 0.1%.
---
**How It Works**:
1. **Calculation of Highs and Lows**:
- The indicator identifies the highest and lowest values within the range defined by the `length` parameter.
2. **Percentage Range Calculation**:
- The difference between the high and low is expressed as a percentage of the low price.
3. **Consolidation Check**:
- If the percentage range is less than or equal to the user-defined threshold (`range_threshold`), the period is identified as a consolidation zone.
4. **Visualization**:
- **Lines**:
- A green line is plotted at the highest price during consolidation.
- A red line is plotted at the lowest price during consolidation.
- **Background Highlight (Optional)**:
- The zone is highlighted with a transparent blue background when prices are in a consolidation phase.
---
**Purpose**:
- Identify low-volatility zones where prices stabilize before a potential directional movement.
- Help traders spot breakout opportunities or range trading setups.
- Provide a clear visual indication of consolidation periods.
---
**Usage Example**:
- On a 1-hour chart, set a period of 20 candles with a 1% threshold to identify narrow consolidations before potential breakouts.
- On a daily chart, use a longer period (e.g., 50) to detect longer-term consolidation zones.
---
This indicator is intuitive and customizable, making it ideal for traders looking to identify quiet market phases before significant movements.
Supertrend and TRAMA This indicator combines the Supertrend and a simple price plot for visual analysis. It includes:
Supertrend Indicator: Displays potential trend reversals by plotting uptrend and downtrend lines, helping traders identify bullish or bearish trends.
Price Plot: Shows the closing price of the asset for better visual correlation with the Supertrend signals.
Alerts: Configurable alerts for changes in trend direction (uptrend to downtrend, downtrend to uptrend, or general trend change).
This indicator is intended for use in identifying entry and exit points based on market trends.
Bayesian Price Projection Model [Pinescriptlabs]📊 Dynamic Price Projection Algorithm 📈
This algorithm combines **statistical calculations**, **technical analysis**, and **Bayesian theory** to forecast a future price while providing **uncertainty ranges** that represent upper and lower bounds. The calculations are designed to adjust projections by considering market **trends**, **volatility**, and the historical probabilities of reaching new highs or lows.
Here’s how it works:
🚀 Future Price Projection
A dynamic calculation estimates the future price based on three key elements:
1. **Trend**: Defines whether the market is predisposed to move up or down.
2. **Volatility**: Quantifies the magnitude of the expected change based on historical fluctuations.
3. **Time Factor**: Uses the logarithm of the projected period (`proyeccion_dias`) to adjust how time impacts the estimate.
🧠 **Bayesian Probabilistic Adjustment**
- Conditional probabilities are calculated using **Bayes' formula**:
\
This models future events using conditional information:
- **Probability of reaching a new all-time high** if the price is trending upward.
- **Probability of reaching a new all-time low** if the price is trending downward.
- These probabilities refine the future price estimate by considering:
- **Higher volatility** increases the likelihood of hitting extreme levels (highs/lows).
- **Market trends** influence the expected price movement direction.
🌟 **Volatility Calculation**
- Volatility is measured using the **ATR (Average True Range)** indicator with a 14-period window. This reflects the average amplitude of price fluctuations.
- To express volatility as a percentage, the ATR is normalized by dividing it by the closing price and multiplying it by 200.
- Volatility is then categorized into descriptive levels (e.g., **Very Low**, **Low**, **Moderate**, etc.) for better interpretation.
---
🎯 **Deviation Limits (Upper and Lower)**
- The upper and lower limits form a **projected range** around the estimated future price, providing a framework for uncertainty.
- These limits are calculated by adjusting the ATR using:
- A user-defined **multiplier** (`factor_desviacion`).
- **Bayesian probabilities** calculated earlier.
- The **square root of the projected period** (`proyeccion_dias`), incorporating the principle that uncertainty grows over time.
🔍 **Interpreting the Model**
This can be seen as a **dynamic probabilistic model** that:
- Combines **technical analysis** (trends and ATR).
- Refines probabilities using **Bayesian theory**.
- Provides a **visual projection range** to help you understand potential future price movements and associated uncertainties.
⚡ Whether you're analyzing **volatile markets** or confirming **bullish/bearish scenarios**, this tool equips you with a robust, data-driven approach! 🚀
Español :
📊 Algoritmo de Proyección de Precio Dinámico 📈
Este algoritmo combina **cálculos estadísticos**, **análisis técnico** y **la teoría de Bayes** para proyectar un precio futuro, junto con rangos de **incertidumbre** que representan los límites superior e inferior. Los cálculos están diseñados para ajustar las proyecciones considerando la **tendencia del mercado**, **volatilidad** y las probabilidades históricas de alcanzar nuevos máximos o mínimos.
Aquí se explica su funcionamiento:
🚀 **Proyección de Precio Futuro**
Se realiza un cálculo dinámico del precio futuro estimado basado en tres elementos clave:
1. **Tendencia**: Define si el mercado tiene predisposición a subir o bajar.
2. **Volatilidad**: Determina la magnitud del cambio esperado en función de las fluctuaciones históricas.
3. **Factor de Tiempo**: Usa el logaritmo del período proyectado (`proyeccion_dias`) para ajustar cómo el tiempo afecta la estimación.
🧠 **Ajuste Probabilístico con la Teoría de Bayes**
- Se calculan probabilidades condicionales mediante la fórmula de **Bayes**:
\
Esto permite modelar eventos futuros considerando información condicional:
- **Probabilidad de alcanzar un nuevo máximo histórico** si el precio sube.
- **Probabilidad de alcanzar un nuevo mínimo histórico** si el precio baja.
- Estas probabilidades ajustan la estimación del precio futuro considerando:
- **Mayor volatilidad** aumenta la probabilidad de alcanzar niveles extremos (máximos/mínimos).
- **La tendencia del mercado** afecta la dirección esperada del movimiento del precio.
🌟 **Cálculo de Volatilidad**
- La volatilidad se mide usando el indicador **ATR (Average True Range)** con un período de 14 velas. Este indicador refleja la amplitud promedio de las fluctuaciones del precio.
- Para obtener un valor porcentual, el ATR se normaliza dividiéndolo por el precio de cierre y multiplicándolo por 200.
- Además, se clasifica esta volatilidad en categorías descriptivas (e.g., **Muy Baja**, **Baja**, **Moderada**, etc.) para facilitar su interpretación.
🎯 **Límites de Desviación (Superior e Inferior)**
- Los límites superior e inferior representan un **rango proyectado** en torno al precio futuro estimado, proporcionando un marco para la incertidumbre.
- Estos límites se calculan ajustando el ATR según:
- Un **multiplicador** definido por el usuario (`factor_desviacion`).
- Las **probabilidades condicionales** calculadas previamente.
- La **raíz cuadrada del período proyectado** (`proyeccion_dias`), lo que incorpora el principio de que la incertidumbre aumenta con el tiempo.
---
🔍 **Interpretación del Modelo**
Este modelo se puede interpretar como un **modelo probabilístico dinámico** que:
- Integra **análisis técnico** (tendencias y ATR).
- Ajusta probabilidades utilizando **la teoría de Bayes**.
- Proporciona un **rango de proyección visual** para ayudarte a entender los posibles movimientos futuros del precio y su incertidumbre.
⚡ Ya sea que estés analizando **mercados volátiles** o confirmando **escenarios alcistas/bajistas**, ¡esta herramienta te ofrece un enfoque robusto y basado en datos! 🚀
crypto signals 80% win smoothmoves10180 percent win rate this works on many different pairs for crypto and forex possible
JoeFlow - True Trade Price, Trend, Volume, RSI, TSV, MA, MACDJoeFlow Comprehensive Tool
The JoeFlow Comprehensive Tool is a versatile trading indicator designed to empower traders with a dynamic framework for analyzing market trends and making informed decisions. It combines key components like the True Trade Price (TTP), short- and long-term trend analysis, volume confirmation, RSI divergence detection, and Time Segmented Volume (TSV) into a single, customizable tool.
With the added flexibility to adjust parameters, toggle visibility, and set custom colors for each component, JoeFlow allows users to tailor the indicator to their unique strategies. It also integrates two fully adjustable moving averages and a MACD signal line, making it a comprehensive solution for identifying trends, confirming signals, and optimizing trade entries and exits.
Built for precision and ease of use, JoeFlow is an essential tool for traders looking to combine price, volume, and momentum data into actionable insights—all displayed seamlessly on the price chart. Whether you're a beginner or an experienced trader, JoeFlow offers the versatility and clarity to elevate your trading strategy.
VaR & Returns [%]Value At Risk for an Asset.
In this script it is computed the parametric equally weighted and EWMA Parametric VaR.
Also, plotting the VaR in positive and negative values along with the asset returns can provide a good insight on when the returns are greater in module to the VaR calculated.
Any suggestions and corrections are welcome.
52WHL, VSTOP, 3EMAIt is combine of 3 ema, vstop and 52 week high low already available on trading view
ADR%>5, MA10>MA20The indicator gives a green background whenever the Average Daily Range (ADR) is higher than 5% and the Moving Average 10 is above the Moving Average 20. The combination of volatility and trend helps identifying periods of long momentum.
Bull/Bear (by gfmdp)Este script combina los cruces de las medias móviles con las Bandas de Bollinger para crear una estrategia de trading que busca minimizar señales falsas.
Explicación:
Bandas de Bollinger: Se calculan con una media móvil simple (SMA) y dos desviaciones estándar (multiplicador ajustable). Las bandas actúan como zonas de soporte y resistencia.
Medias Móviles Exponenciales (EMA): Se usan dos EMAs de 9 y 21 períodos para identificar los cruces. La señal de compra se genera cuando la EMA corta hacia arriba a la otra EMA, y la señal de venta cuando la EMA corta hacia abajo.
Filtrado de Señales: Las señales de compra solo se activan si el precio está por encima de la media de las Bandas de Bollinger, y las señales de venta solo si el precio está por debajo de esa media. Esto ayuda a filtrar las señales falsas.
Señales de compra: Se mostrarán con el ícono 🐮 (cabeza de toro) debajo de la vela.
Señales de venta: Se mostrarán con el ícono 🐻 (oso) encima de la vela.
ROC + ATR StrategyThis indicator detects buying and selling points based on the Rate of Change (RoC) - a measurement that determines the distance in price between the current point, and a point a certain amount of periods previous. It intends to capitalise on the psychological movement of price after a significant drop in value, taking the stance that when price drops dramatically, buyers will step in and the price will rise.
As a default, the indicator is set to detect when an instrument's current RoC is -3.5% or lower than the RoC of the price 14 candles ago.
To enter a position, the RoC must be -3.5% or lower, and the most current candle must be higher than the previous.
The exit is determined through multiples of the ATR. The profit target is by default set to x1.0 the ATR, whilst the stop loss is set to 2.5x the ATR. These are the values I found the best success with.
This strategy works best on the one minute time frame by adapting the threshold of the ATR. For example, should you wish to use this on a macro timeframe, such as the daily timeframe, I would recommend setting the RoC threshold to -20.0%, instead of -3.5%.
I have tested the strategy extensively on the SP100, looking at the one-minute timeframe for each stock between 18th November 2019 and 18th November 2024. If you are interested in the results, here is a Google Sheet with the data I acquired using TradingView's 'Deep Backtest' system:
docs.google.com
Power Of 3 ICT 01 [TradingFinder] AMD ICT & SMC Accumulations🔵 Introduction
The ICT Power of 3 (PO3) strategy, developed by Michael J. Huddleston, known as the Inner Circle Trader, is a structured approach to analyzing daily market activity. This strategy divides the trading day into three distinct phases: Accumulation, Manipulation, and Distribution.
Each phase represents a unique market behavior influenced by institutional traders, offering a clear framework for retail traders to align their strategies with market movements.
Accumulation (19:00 - 01:00 EST) takes place during low-volatility hours, as institutional traders accumulate orders. Manipulation (01:00 - 07:00 EST) involves false breakouts and liquidity traps designed to mislead retail traders. Finally, Distribution (07:00 - 13:00 EST) represents the active phase where significant market movements occur as institutions distribute their positions in line with the broader trend.
This indicator is built upon the Power of 3 principles to provide traders with a practical and visual tool for identifying these key phases. By using clear color coding and precise time zones, the indicator highlights critical price levels, such as highs and lows, helping traders to better understand market dynamics and make more informed trading decisions.
Incorporating the ICT AMD setup into daily analysis enables traders to anticipate market behavior, spot high-probability trade setups, and gain deeper insights into institutional trading strategies. With its focus on time-based price action, this indicator simplifies complex market structures, offering an effective tool for traders of all levels.
🔵 How to Use
The ICT Power of 3 (PO3) indicator is designed to help traders analyze daily market movements by visually identifying the three key phases: Accumulation, Manipulation, and Distribution.
Here's how traders can effectively use the indicator :
🟣 Accumulation Phase (19:00 - 01:00 EST)
Purpose : Identify the range-bound activity where institutional players accumulate orders.
Trading Insight : Avoid placing trades during this phase, as price movements are typically limited. Instead, use this time to prepare for the potential direction of the market in the next phases.
🟣 Manipulation Phase (01:00 - 07:00 EST)
Purpose : Spot false breakouts and liquidity traps that mislead retail traders.
Trading Insight : Observe the market for price spikes beyond key support or resistance levels. These moves often reverse quickly, offering high-probability entry points in the opposite direction of the initial breakout.
🟣 Distribution Phase (07:00 - 13:00 EST)
Purpose : Detect the main price movement of the day, driven by institutional distribution.
Trading Insight : Enter trades in the direction of the trend established during this phase. Look for confirmations such as breakouts or strong directional moves that align with broader market sentiment
🔵 Settings
Show or Hide Phases :mDecide whether to display Accumulation, Manipulation, or Distribution.
Adjust the session times for each phase :
Accumulation: 1900-0100 EST
Manipulation: 0100-0700 EST
Distribution: 0700-1300 EST
Modify Visualization : Customize how the indicator looks by changing settings like colors and transparency.
🔵 Conclusion
The ICT Power of 3 (PO3) indicator is a powerful tool for traders seeking to understand and leverage market structure based on time and price dynamics. By visually highlighting the three key phases—Accumulation, Manipulation, and Distribution—this indicator simplifies the complex movements of institutional trading strategies.
With its customizable settings and clear representation of market behavior, the indicator is suitable for traders at all levels, helping them anticipate market trends and make more informed decisions.
Whether you're identifying entry points in the Accumulation phase, navigating false moves during Manipulation, or capitalizing on trends in the Distribution phase, this tool provides valuable insights to enhance your trading performance.
By integrating this indicator into your analysis, you can better align your strategies with institutional movements and improve your overall trading outcomes.
Naji's Price Change DetectorThis indicator detects when the price goes up or down by a customizable % and time. This allows the user to detect large changes in the market in order to try to catch the reversal.
This does not detect the reversal, you need to decide when to enter the trade yourself.
Key Features:
Customizable Settings:
Percent Change Threshold: You can change this in the settings panel (default = 4%).
Number of Bars to Check: Adjustable between 1 and any desired number of bars (default = 5).
Dynamic Calculation:
The script calculates the price change for every bar within the specified range.
Alerts:
Alerts are customized to reflect the chosen settings and will trigger only once per bar close.
Background Highlights:
Green: A price increase exceeding the threshold was detected.
Red: A price decrease exceeding the threshold was detected.
Advanced Pivot Manipulation SuperTrend - Consolidation ZoneHere’s the description translated into English for your TradingView publication:
---
Advanced Pivot Manipulation SuperTrend - Consolidation Zone
Description :
This advanced indicator combines multiple technical tools to provide a comprehensive analysis of trends, key levels, and consolidation zones. Ideal for traders seeking to spot opportunities while avoiding the traps of flat markets, it helps you better understand market dynamics and improve your trading decisions.
Key Features:
1.
Dynamic SuperTrend with Pivot Points:
- An enhanced SuperTrend algorithm based on pivot points for more precise trend tracking.
- Thresholds (Up/Dn) are dynamically adjusted using ATR (Average True Range) for improved volatility adaptation.
2. Consolidation Zones:
- Automatically identifies periods when the market moves within a narrow range (1% by default).
- Consolidation zones are visually highlighted to help avoid risky trades.
3. Dynamic Support and Resistance:
- Automatically calculates support and resistance levels based on a rolling period (configurable).
- These levels serve as key references for potential breakouts or trend reversals.
4. Advanced Detection Tools:
- Includes a volume multiplier and shadow-to-body ratio to signal unusual or potentially manipulated moves (e.g., spoofing).
5. Intuitive Visuals:
- SuperTrend lines are color-coded to indicate bullish (green) or bearish (red) trends.
- Semi-transparent lines mark support and resistance levels, and red backgrounds indicate consolidation zones.
Customizable Parameters:
- Pivot Point Period: Adjust the period for detecting pivot highs and lows.
- ATR Factor and Period: Control the sensitivity of the SuperTrend indicator.
- Lookback Period for S/R: Define the duration for calculating support and resistance levels.
- Volume Multiplier and Shadow/Body Ratio: Configure thresholds for detecting high volumes or anomalies in candlestick patterns.
How to Use:
- Easily identify dominant trends using the SuperTrend.
- Spot consolidation zones to avoid inefficient trades or prepare breakout strategies.
- Use support and resistance levels as reference points for placing orders or adjusting risk management.
Target Audience:
- Intraday and swing traders.
- Anyone looking for a comprehensive and customizable indicator to effectively analyze volatile markets.
---
Notes:
The indicator is fully customizable to suit your needs and strategies. Feel free to experiment with the parameters to maximize its effectiveness according to your trading style.
Keywords: SuperTrend, Support and Resistance, Consolidation, Pivot Points, Trends, ATR, Advanced Trading.
---
This description highlights the indicator’s strengths and is designed to appeal to the TradingView community.
Volatility % (Standard Deviation of Returns)This script takes closing prices of candles to measure the Standard Deviation (σ) which is then used to calculate the volatility by taking the stdev of the last 30 candles and multiplying it by the root of the trading days in a year, month and week. It then multiplies that number by 100 to show a percentage.
Default settings are annual volatility (252 candles, red), monthly volatility (30 candles, blue) and weekly volatility (5 candles, green) if you use daily candles. It is open source so you can increase the number of candles with which the stdev is calculated, and change the number of the root that multiplies the stdev.
ATR and Volume AnalysisHi!
I would like to present an indicator that's meant to measure ratio of Volatility to Volume.
Basically it measures 2 moving averages (14 and 100 period) of ATR and Volume and then compares them. The output is ATR14 / Vol14
Color scheme
Red: Volume and ATR is both below 14 period
Green: Both are above
Yellow: Volume up, volatility down
Purple: Volume down, volatility up
Then there are two lines - 1 and 1.5
That is, in my opinion, the most optimal state to trade, because 1 means that there is some volatility and it's confirmed by volume. Above 1,5 you could see it as overbought (or oversold) zone. If it's above this line, we could expect a retracement since the volatility is not backed by volume. Above 2 it's quite critical and I would suggest closing trades.
(You can use it across all timeframes. In fact it's better if you do so. Longer timeframes are good for spotting tradeable markets while shorter timeframes show overbought / oversold zones)
I have also added option to choose between 4 different moving averages, but in my opinion RMA works the best.
Feel free to share some feedback, I would really appreciate it.
Sincerely,
Beefmaster
Conditional Value at Risk (CVaR)This Pine Script implements the Conditional Value at Risk (CVaR), a risk metric that evaluates the potential losses in a financial portfolio beyond a certain confidence level, incorporating both the Value at Risk (VaR) and the expected loss given that the VaR threshold has been breached.
Key Features:
Input Parameters:
length: Defines the observation period in days (default is 252, typically used to represent the number of trading days in a year).
confidence: Specifies the confidence interval for calculating VaR and CVaR, with values between 0.5 and 0.99 (default is 0.95, indicating a 95% confidence level).
Logarithmic Returns Calculation: The script computes the logarithmic returns based on the daily closing prices, a common method to measure financial asset returns, given by:
Log Return=ln(PtPt−1)
Log Return=ln(Pt−1Pt)
where PtPt is the price at time tt, and Pt−1Pt−1 is the price at the previous time point.
VaR Calculation: Value at Risk (VaR) is estimated as the percentile of the returns array corresponding to the given confidence interval. This represents the maximum loss expected over a given time horizon under normal market conditions at the specified confidence level.
CVaR Calculation: The Conditional VaR (CVaR) is calculated as the average of the returns that fall below the VaR threshold. This represents the expected loss given that the loss has exceeded the VaR threshold.
Visualization: The script plots two key risk measures:
VaR: The maximum potential loss at the specified confidence level.
CVaR: The average of the losses beyond the VaR threshold.
The script also includes a neutral line at zero to help visualize the losses and their magnitude.
Source and Scientific Background:
The concept of Value at Risk (VaR) was popularized by J.P. Morgan in the 1990s, and it has since become a widely-used tool for risk management (Jorion, 2007). Conditional Value at Risk (CVaR), also known as Expected Shortfall, addresses the limitation of VaR by considering the severity of losses beyond the VaR threshold (Rockafellar & Uryasev, 2002). CVaR provides a more comprehensive risk measure, especially in extreme tail risk scenarios.
References:
Jorion, P. (2007). Value at Risk: The New Benchmark for Managing Financial Risk. McGraw-Hill Education.
Rockafellar, R.T., & Uryasev, S. (2002). Conditional Value-at-Risk for General Loss Distributions. Journal of Banking & Finance, 26(7), 1443–1471.
Candle Spread
Candle Spread is an indicator that helps traders measure the range of price movement within each candle over a specified time period. It calculates the range of the candle between the High and Low (High - Low) and displays it in a separate window below the chart as columns.
Key Features:
Colored Bars: The bars are colored based on the candle's direction:
Bullish Candle: Bars are Green.
Bearish Candle: Bars are Red.
Moving Average: The indicator includes a 30-period Simple Moving Average (SMA), which represents the overall average range of the candles.
Helps Identify Market Volatility: This indicator helps traders identify wide-range candles (signaling high volatility in the market), which could indicate a surge in momentum or potential trend reversals.
followerFollower Indicator
This custom Follower Indicator is designed to track market trends and generate buy/sell signals based on price movements and adaptive moving averages. The indicator adjusts dynamically to market conditions using an Exponential Moving Average (EMA) and a smoothed average of the high-low range over the last 20 bars.
Key Features:
Adaptive Trend Following: The indicator uses an EMA of the close price along with a dynamically adjusted range (high-low) to create an adaptive trend-following line.
Buy and Sell Signals: Buy signals are generated when the EMA crosses above the follower line, while sell signals occur when the follower line crosses above the EMA.
Dynamic Color Coding: The indicator line changes color based on the relationship between the price and the follower line. It turns blue when the price is above the follower line and red when the price is below.
Customizable Parameters: Users can adjust the range multiplier (oran) and the EMA period (uzunluk) to fine-tune the indicator to different market conditions.
How to Use:
Buy Signal: A buy signal is triggered when the EMA crosses above the follower line.
Sell Signal: A sell signal is triggered when the follower line crosses above the EMA.
Notes:
This indicator is intended to help identify market trends and potential entry/exit points based on price behavior and momentum.
It is recommended to use this indicator in conjunction with other technical analysis tools and risk management strategies.
Feel free to adjust the parameters based on your trading style and preferences. Happy trading!
Honest Volatility Grid [Honestcowboy]The Honest Volatility Grid is an attempt at creating a robust grid trading strategy but without standard levels.
Normal grid systems use price levels like 1.01;1.02;1.03;1.04... and place an order at each of these levels. In this program instead we create a grid using keltner channels using a long term moving average.
🟦 IS THIS EVEN USEFUL?
The idea is to have a more fluid style of trading where levels expand and follow price and do not stick to precreated levels. This however also makes each closed trade different instead of using fixed take profit levels. In this strategy a take profit level can even be a loss. It is useful as a strategy because it works in a different way than most strategies, making it a good tool to diversify a portfolio of trading strategies.
🟦 STRATEGY
There are 10 levels below the moving average and 10 above the moving average. For each side of the moving average the strategy uses 1 to 3 orders maximum (3 shorts at top, 3 longs at bottom). For instance you buy at level 2 below moving average and you increase position size when level 6 is reached (a cheaper price) in order to spread risks.
By default the strategy exits all trades when the moving average is reached, this makes it a mean reversion strategy. It is specifically designed for the forex market as these in my experience exhibit a lot of ranging behaviour on all the timeframes below daily.
There is also a stop loss at the outer band by default, in case price moves too far from the mean.
What are the risks?
In case price decides to stay below the moving average and never reaches the outer band one trade can create a very substantial loss, as the bands will keep following price and are not at a fixed level.
Explanation of default parameters
By default the strategy uses a starting capital of 25000$, this is realistic for retail traders.
Lot sizes at each level are set to minimum lot size 0.01, there is no reason for the default to be risky, if you want to risk more or increase equity curve increase the number at your own risk.
Slippage set to 20 points: that's a normal 2 pip slippage you will find on brokers.
Fill limit assumtion 20 points: so it takes 2 pips to confirm a fill, normal forex spread.
Commission is set to 0.00005 per contract: this means that for each contract traded there is a 5$ or whatever base currency pair has as commission. The number is set to 0.00005 because pinescript does not know that 1 contract is 100000 units. So we divide the number by 100000 to get a realistic commission.
The script will also multiply lot size by 100000 because pinescript does not know that lots are 100000 units in forex.
Extra safety limit
Normally the script uses strategy.exit() to exit trades at TP or SL. But because these are created 1 bar after a limit or stop order is filled in pinescript. There are strategy.orders set at the outer boundaries of the script to hedge against that risk. These get deleted bar after the first order is filled. Purely to counteract news bars or huge spikes in price messing up backtest.
🟦 VISUAL GOODIES
I've added a market profile feature to the edge of the grid. This so you can see in which grid zone market has been the most over X bars in the past. Some traders may wish to only turn on the strategy whenever the market profile displays specific characteristics (ranging market for instance).
These simply count how many times a high, low, or close price has been in each zone for X bars in the past. it's these purple boxes at the right side of the chart.
🟦 Script can be fully automated to MT5
There are risk settings in lot sizes or % for alerts and symbol settings provided at the bottom of the indicator. The script will send alert to MT5 broker trying to mimic the execution that happens on tradingview. There are always delays when using a bridge to MT5 broker and there could be errors so be mindful of that. This script sends alerts in format so they can be read by tradingview.to which is a bridge between the platforms.
Use the all alert function calls feature when setting up alerts and make sure you provide the right webhook if you want to use this approach.
Almost every setting in this indicator has a tooltip added to it. So if any setting is not clear hover over the (?) icon on the right of the setting.
Adaptive Kalman Trend Filter (Zeiierman)█ Overview
The Adaptive Kalman Trend Filter indicator is an advanced trend-following tool designed to help traders accurately identify market trends. Utilizing the Kalman Filter—a statistical algorithm rooted in control theory and signal processing—this indicator adapts to changing market conditions, smoothing price data to filter out noise. By focusing on state vector-based calculations, it dynamically adjusts trend and range measurements, making it an excellent tool for both trend-following and range-based trading strategies. The indicator's adaptive nature is enhanced by options for volatility adjustment and three unique Kalman filter models, each tailored for different market conditions.
█ How It Works
The Kalman Filter works by maintaining a model of the market state through matrices that represent state variables, error covariances, and measurement uncertainties. Here’s how each component plays a role in calculating the indicator’s trend:
⚪ State Vector (X): The state vector is a two-dimensional array where each element represents a market property. The first element is an estimate of the true price, while the second element represents the rate of change or trend in that price. This vector is updated iteratively with each new price, maintaining an ongoing estimate of both price and trend direction.
⚪ Covariance Matrix (P): The covariance matrix represents the uncertainty in the state vector’s estimates. It continuously adapts to changing conditions, representing how much error we expect in our trend and price estimates. Lower covariance values suggest higher confidence in the estimates, while higher values indicate less certainty, often due to market volatility.
⚪ Process Noise (Q): The process noise matrix (Q) is used to account for uncertainties in price movements that aren’t explained by historical trends. By allowing some degree of randomness, it enables the Kalman Filter to remain responsive to new data without overreacting to minor fluctuations. This noise is particularly useful in smoothing out price movements in highly volatile markets.
⚪ Measurement Noise (R): Measurement noise is an external input representing the reliability of each new price observation. In this indicator, it is represented by the setting Measurement Noise and determines how much weight is given to each new price point. Higher measurement noise makes the indicator less reactive to recent prices, smoothing the trend further.
⚪ Update Equations:
Prediction: The state vector and covariance matrix are first projected forward using a state transition matrix (F), which includes market estimates based on past data. This gives a “predicted” state before the next actual price is known.
Kalman Gain Calculation: The Kalman gain is calculated by comparing the predicted state with the actual price, balancing between the covariance matrix and measurement noise. This gain determines how much of the observed price should influence the state vector.
Correction: The observed price is then compared to the predicted price, and the state vector is updated using this Kalman gain. The updated covariance matrix reflects any adjustment in uncertainty based on the latest data.
█ Three Kalman Filter Models
Standard Model: Assumes that market fluctuations follow a linear progression without external adjustments. It is best suited for stable markets.
Volume Adjusted Model: Adjusts the filter sensitivity based on trading volume. High-volume periods result in stronger trends, making this model suitable for volume-driven assets.
Parkinson Adjusted Model: Uses the Parkinson estimator, accounting for volatility through high-low price ranges, making it effective in markets with high intraday fluctuations.
These models enable traders to choose a filter that aligns with current market conditions, enhancing trend accuracy and responsiveness.
█ Trend Strength
The Trend Strength provides a visual representation of the current trend's strength as a percentage based on oscillator calculations from the Kalman filter. This table divides trend strength into color-coded segments, helping traders quickly assess whether the market is strongly trending or nearing a reversal point. A high trend strength percentage indicates a robust trend, while a low percentage suggests weakening momentum or consolidation.
█ Trend Range
The Trend Range section evaluates the market's directional movement over a specified lookback period, highlighting areas where price oscillations indicate a trend. This calculation assesses how prices vary within the range, offering an indication of trend stability or the likelihood of reversals. By adjusting the trend range setting, traders can fine-tune the indicator’s sensitivity to longer or shorter trends.
█ Sigma Bands
The Sigma Bands in the indicator are based on statistical standard deviations (sigma levels), which act as dynamic support and resistance zones. These bands are calculated using the Kalman Filter's trend estimates and adjusted for volatility (if enabled). The bands expand and contract according to market volatility, providing a unique visualization of price boundaries. In high-volatility periods, the bands widen, offering better protection against false breakouts. During low volatility, the bands narrow, closely tracking price movements. Traders can use these sigma bands to spot potential entry and exit points, aiming for reversion trades or trend continuation setups.
Trend Based
Volatility Based
█ How to Use
Trend Following:
When the Kalman Filter is green, it signals a bullish trend, and when it’s red, it indicates a bearish trend. The Sigma Cloud provides additional insights into trend strength. In a strong bullish trend, the cloud remains below the Kalman Filter line, while in a strong bearish trend, the cloud stays above it. Expansion and contraction of the Sigma Cloud indicate market momentum changes. Rapid expansion suggests an impulsive move, which could either signal the continuation of the trend or be an early sign of a possible trend reversal.
Mean Reversion: Watch for prices touching the upper or lower sigma bands, which often act as dynamic support and resistance.
Volatility Breakouts: Enable volatility-adjusted sigma bands. During high volatility, watch for price movements that extend beyond the bands as potential breakout signals.
Trend Continuation: When the Kalman Filter line aligns with a high trend strength, it signals a continuation in that direction.
█ Settings
Measurement Noise: Adjusts how sensitive the indicator is to price changes. Higher values smooth out fluctuations but delay reaction, while lower values increase sensitivity to short-term changes.
Kalman Filter Model: Choose between the standard, volume-adjusted, and Parkinson-adjusted models based on market conditions.
Band Sigma: Sets the standard deviation used for calculating the sigma bands, directly affecting the width of the dynamic support and resistance.
Volatility Adjusted Bands: Enables bands to dynamically adapt to volatility, increasing their effectiveness in fluctuating markets.
Trend Strength: Defines the lookback period for trend strength calculation. Shorter periods result in more responsive trend strength readings, while longer periods smooth out the calculation.
Trend Range: Specifies the lookback period for the trend range, affecting the assessment of trend stability over time.
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!