Volatility Momentum Breakout StrategyDescription:
Overview:
The Volatility Momentum Breakout Strategy is designed to capture significant price moves by combining a volatility breakout approach with trend and momentum filters. This strategy dynamically calculates breakout levels based on market volatility and uses these levels along with trend and momentum conditions to identify trade opportunities.
How It Works:
1. Volatility Breakout:
• Methodology:
The strategy computes the highest high and lowest low over a defined lookback period (excluding the current bar to avoid look-ahead bias). A multiple of the Average True Range (ATR) is then added to (or subtracted from) these levels to form dynamic breakout thresholds.
• Purpose:
This method helps capture significant price movements (breakouts) while ensuring that only past data is used, thereby maintaining realistic signal generation.
2. Trend Filtering:
• Methodology:
A short-term Exponential Moving Average (EMA) is applied to determine the prevailing trend.
• Purpose:
Long trades are considered only when the current price is above the EMA, indicating an uptrend, while short trades are taken only when the price is below the EMA, indicating a downtrend.
3. Momentum Confirmation:
• Methodology:
The Relative Strength Index (RSI) is used to gauge market momentum.
• Purpose:
For long entries, the RSI must be above a mid-level (e.g., above 50) to confirm upward momentum, and for short entries, it must be below a similar threshold. This helps filter out signals during overextended conditions.
Entry Conditions:
• Long Entry:
A long position is triggered when the current closing price exceeds the calculated long breakout level, the price is above the short-term EMA, and the RSI confirms momentum (e.g., above 50).
• Short Entry:
A short position is triggered when the closing price falls below the calculated short breakout level, the price is below the EMA, and the RSI confirms momentum (e.g., below 50).
Risk Management:
• Position Sizing:
Trades are sized to risk a fixed percentage of account equity (set here to 5% per trade in the code, with each trade’s stop loss defined so that risk is limited to approximately 2% of the entry price).
• Stop Loss & Take Profit:
A stop loss is placed a fixed ATR multiple away from the entry price, and a take profit target is set to achieve a 1:2 risk-reward ratio.
• Realistic Backtesting:
The strategy is backtested using an initial capital of $10,000, with a commission of 0.1% per trade and slippage of 1 tick per bar—parameters chosen to reflect conditions faced by the average trader.
Important Disclaimers:
• No Look-Ahead Bias:
All breakout levels are calculated using only past data (excluding the current bar) to ensure that the strategy does not “peek” into future data.
• Educational Purpose:
This strategy is experimental and provided solely for educational purposes. Past performance is not indicative of future results.
• User Responsibility:
Traders should thoroughly backtest and paper trade the strategy under various market conditions and adjust parameters to fit their own risk tolerance and trading style before live deployment.
Conclusion:
By integrating volatility-based breakout signals with trend and momentum filters, the Volatility Momentum Breakout Strategy offers a unique method to capture significant price moves in a disciplined manner. This publication provides a transparent explanation of the strategy’s components and realistic backtesting parameters, making it a useful tool for educational purposes and further customization by the TradingView community.
دورات
[TehThomas] - Market Structure Shift (MSS)
- Market Structure Shift (MSS) Script Overview
This TradingView script is designed to help traders identify Market Structure Shifts (MSS) and Breaks of Structure (BOS), which are key concepts in ICT (Inner Circle Trader) and Smart Money Concepts (SMC) trading. By detecting significant shifts in price action, the script provides visual cues and alerts to help traders spot potential trend changes and continuation patterns.
How the Script Works
1. Identifying Swing Highs & Lows
The script detects swing highs and swing lows based on a pivot strength setting (default: 3).
A swing high forms when a candle’s high is higher than the highs of a set number of candles on both sides.
A swing low forms when a candle’s low is lower than the lows of the surrounding candles.
2. Market Structure Shift (MSS) Detection
A bullish MSS occurs when price closes above the most recent swing high after previously being in a bearish trend.
A bearish MSS occurs when price closes below the most recent swing low after being in a bullish trend.
This signals a potential trend reversal and is often a key area for liquidity grabs and smart money entry points.
3. Break of Structure (BOS) Detection (Optional - Can be enabled/disabled in settings)
A BOS is detected when price continues in the direction of the trend, confirming a structural break rather than a shift.
Bullish BOS: Price breaks a swing high but does not reverse (confirms trend continuation).
Bearish BOS: Price breaks a swing low but continues downward.
BOS levels help traders confirm trend strength and potential trade continuation setups.
4. Drawing Structure Lines & Labels
The script plots horizontal lines at the detected MSS and BOS levels.
Labels such as "MSS" or "BOS" appear at the breakout points.
Traders can customize the line style, color, and text size for better visibility.
5. Alert System for MSS & BOS
The script includes alert conditions that notify traders when an MSS or BOS occurs.
Alerts can be set for:
Any MSS / Any BOS
Bullish MSS / Bullish BOS
Bearish MSS / Bearish BOS
Settings You Can Change
The script allows for full customization through the following input parameters:
Pivot Strength (pivot_strength)
Default: 4
Adjusts how many candles must be considered to form a valid swing high or low.
Higher values result in stronger structure points, while lower values detect short-term movements.
Color Settings
Highs Color (highs) → Default: Blue (for bullish structure)
Lows Color (lows) → Default: Red (for bearish structure)
Toggle Display Options
Show BOS (show_bos) → Enables/disables BOS detection.
Show MSS (show_mss) → Enables/disables MSS detection.
Line & Label Customization
BOS Line Style (bos_style) → Options: Solid, Dashed, Dotted
MSS Line Style (mss_style) → Options: Solid, Dashed, Dotted
BOS & MSS Line Width → Adjustable from 1 to 4 pixels
BOS & MSS Text Size → Options: Tiny, Small, Normal, Large, Huge
BOS & MSS Text Position → Options: Left, Center, Right
Why This Script is Useful
✔ Detects Key Market Structure Changes
MSS and BOS are critical for identifying trend reversals and trend continuations.
Helps traders avoid false breakouts by distinguishing between structural shifts and simple breakouts.
✔ Enhances Smart Money Trading Strategies
MSS often aligns with liquidity grabs before price reverses.
BOS confirms continuation trades in strong trends.
Works well with Fair Value Gaps (FVGs), Order Blocks (OBs), and Liquidity Zones.
✔ Customizable Alerts & Visuals
Traders can enable alerts for MSS and BOS to receive notifications when price shifts.
Adjustable styling ensures clarity across different trading setups.
✔ Works on Any Asset & Timeframe
Suitable for Forex, Crypto, Stocks, and Indices.
Can be used on lower timeframes (scalping) or higher timeframes (swing trading).
How to Use the Market Structure Shift Concept in Trading
1️⃣ Identify Market Conditions
Apply the script and check if price is forming Higher Highs (HH), Higher Lows (HL), Lower Highs (LH), or Lower Lows (LL).
Determine if the market is trending or ranging.
2️⃣ Watch for MSS (Reversal Signals)
Bullish MSS: Price closes above a key swing high → potential bullish reversal.
Bearish MSS: Price closes below a swing low → potential bearish reversal.
3️⃣ Confirm BOS (Trend Continuation Signals)
Bullish BOS: Price continues breaking highs, confirming an uptrend.
Bearish BOS: Price continues breaking lows, confirming a downtrend.
4️⃣ Combine with Other ICT & SMC Concepts
Look for Order Blocks (OBs) and Fair Value Gaps (FVGs) near MSS/BOS levels for better trade entries.
Wait for liquidity grabs before entering trades (avoid stop hunts).
Use higher timeframe MSS/BOS zones as key support & resistance areas.
Final Thoughts
This script is a must-have tool for traders using ICT & SMC trading strategies. It helps identify trend shifts, liquidity grabs, and continuation moves by marking Market Structure Shifts (MSS) and Breaks of Structure (BOS) on the chart.
Kalman FilterKalman Filter Indicator Description
This indicator applies a Kalman Filter to smooth the selected price series (default is the close) and help reveal the underlying trend by filtering out market noise. The filter is based on a recursive algorithm consisting of two main steps:
Prediction Step:
The filter predicts the next state using the last estimated value and increases the uncertainty (error covariance) by adding the process noise variance (Q). This step assumes that the price follows a random walk, where the last known estimate is the best guess for the next value.
Update Step:
The filter computes the Kalman Gain, which determines the weight given to the new measurement (price) versus the prediction. It then updates the state estimate by combining the prediction with the measurement error (using the measurement noise variance, R). The error covariance is also updated accordingly.
Key Features:
Customizable Input:
Source: Choose any price series (default is the closing price) for filtering.
Measurement Noise Variance (R): Controls the sensitivity to new measurements (default is 0.1). A higher R makes the filter less responsive.
Process Noise Variance (Q): Controls the assumed level of inherent price variability (default is 0.01). A higher Q allows the filter to adapt more quickly to changes.
Visual Trend Indication:
The filtered trend line is plotted directly on the chart:
When enabled, the line is colored green when trending upward and red when trending downward.
If color option is disabled, the line appears in blue.
This indicator is ideal for traders looking to smooth price data and identify trends more clearly by reducing the impact of short-term volatility.
HTF Candle Range Box (Fixed to HTF Bars)### **Higher Timeframe Candle Range Box (HTF Box Indicator)**
This indicator visually highlights the price range of the most recently closed higher-timeframe (HTF) candle, directly on a lower-timeframe chart. It dynamically adjusts based on the user-selected HTF setting (e.g., 15-minute, 1-hour) and ensures that the box is displayed only on the bars that correspond to that specific HTF candle’s duration.
For instance, if a trader is on a **1-minute chart** with the **HTF set to 15 minutes**, the indicator will draw a box spanning exactly 15 one-minute candles, corresponding to the previous 15-minute HTF candle. The box updates only when a new HTF candle completes, ensuring that it does not change mid-formation.
---
### **How It Works:**
1. **Retrieves Higher Timeframe Data**
The script uses TradingView’s `request.security` function to pull **high, low, open, and close** values from the **previously completed HTF candle** (using ` ` to avoid repainting). It also fetches the **high and low of the candle before that** (using ` `) for comparison.
2. **Determines Breakout Behavior**
It compares the **last closed HTF candle** to the **one before it** to determine whether:
- It **broke above** the previous high.
- It **broke below** the previous low.
- It **broke both** the high and low.
- It **stayed within the previous candle’s range** (no breakout).
3. **Classifies the Candle & Assigns Color**
- **Green (Bullish)**
- Closes above the previous candle’s high.
- Breaks below the previous candle’s low but closes back inside the previous range **if it opened above** the previous high.
- **Red (Bearish)**
- Closes below the previous candle’s low.
- Breaks above the previous candle’s high but closes back inside the previous range **if it opened below** the previous low.
- **Orange (Neutral/Indecisive)**
- Stays within the previous candle’s range.
- Breaks both the high and low but closes inside the previous range without a clear bias.
4. **Box Placement on the Lower Timeframe**
- The script tracks the **bar index** where each HTF candle starts on the lower timeframe (e.g., every 15 bars on a 1-minute chart if HTF = 15 minutes).
- It **only displays the box on those bars**, ensuring that the range is accurately reflected for that time period.
- The box **resets and updates** only when a new HTF candle completes.
---
### **Key Features & Advantages:**
✅ **Clear Higher Timeframe Context:**
- The indicator provides a structured way to analyze HTF price action while trading in a lower timeframe.
- It helps traders identify **HTF support and resistance zones**, potential **breakouts**, and **failed breakouts**.
✅ **Fixed Box Display (No Mid-Candle Repainting):**
- The box is drawn **only after the HTF candle closes**, avoiding misleading fluctuations.
- Unlike other indicators that update live, this one ensures the trader is looking at **confirmed data** only.
✅ **Flexible Timeframe Selection:**
- The user can set **any HTF resolution** (e.g., 5min, 15min, 1hr, 4hr), making it adaptable for different strategies.
✅ **Dynamic Color Coding for Quick Analysis:**
- The **color of the box reflects the market sentiment**, making it easier to spot trends, reversals, and fake-outs.
✅ **No Clutter – Only Applies to the Relevant Bars:**
- Instead of spanning across the whole chart, the range box is **only visible on the bars belonging to the last HTF period**, keeping the chart clean and focused.
---
### **Example Use Case:**
💡 Imagine a trader is scalping on the **1-minute chart** but wants to factor in **HTF 15-minute structure** to avoid getting caught in bad trades. With this indicator:
- They can see whether the last **15-minute candle** was bullish, bearish, or indecisive.
- If it was **bullish (green)**, they may look for **buying opportunities** at lower timeframes.
- If it was **bearish (red)**, they might anticipate **a potential pullback or continuation down**.
- If the **HTF candle failed to break out**, they know the market is **ranging**, avoiding unnecessary trades.
---
### **Final Thoughts:**
This indicator is a **powerful addition for traders who combine multiple timeframes** in their analysis. It provides a **clean and structured way to track HTF price movements** without cluttering the chart or requiring constant manual switching between timeframes. Whether used for **intraday trading, swing trading, or scalping**, it adds an extra layer of confirmation for trade entries and exits.
🔹 **Best for traders who:**
- Want **HTF structure awareness while trading lower timeframes**.
- Need **confirmation of breakouts, failed breakouts, or indecision zones**.
- Prefer a **non-repainting tool that only updates after confirmed HTF closes**.
Let me know if you want any adjustments or additional features! 🚀
BIAS PRO - Zones + Liquidity + SP&RS [AlgoRich]This multifunction indicator is used to identify key areas on the chart, liquidity levels, and support/resistance zones (SP&RS). Its design is aimed at highlighting price pivots (swings) by drawing zones (boxes and lines) based on these pivots, while also displaying information about trading sessions and levels of analysis across different timeframes.
1. Configuration and Input Parameters
Swing Parameters (Bars Right-Left):
Two inputs are defined to adjust the number of bars on the right and left used to detect pivots (swings). This allows the determination of high and low pivot points.
Display Options:
You can choose to show or hide boxes, lines, and labels (bubbles). There is also an option to extend the zones until they are “filled” (confirmed), and you can opt to hide those zones once filled.
Appearance:
Visual parameters are defined, such as the option to display high and low pivots, colors for lines, labels, and boxes (for both bullish and bearish conditions), line styles (solid, dotted, dashed), and other aesthetic details (box width, label size, text alignment).
Lookback and Time Range:
The “lookback” and “daysBack” variables determine whether the analysis is limited to data from a certain number of days, helping to filter out older historical information.
2. Calculation of Pivots (Swings) and Zone Detection
Price Pivots:
Using the pivot functions (ta.pivothigh and ta.pivotlow), the script identifies swing high and low points based on the configured swing size (bars left and right).
If a swing high is detected, its bar index is stored and the corresponding signal is activated.
Similarly, a swing low is detected and marked.
Drawing Zones:
When a swing (high or low) is detected and the time range condition is met (inRange), the script draws:
Boxes: These visually represent the area around the pivot level. The configuration (type and width) is adjustable.
Lines: A horizontal line is drawn from the pivot point to the current bar, using the defined style and color.
Boxes and lines are drawn for both high pivots (showhighs) and low pivots (showlows).
Additionally, these zones are updated and extended dynamically as new bars appear, and zones that are “filled” (when the price exceeds the zone level) are removed.
Labels and Markers:
If enabled, the script displays circle markers (using plotshape) at the swing points.
3. Operational Zone (Sessions)
Customizable Sessions:
The script allows defining up to three operational sessions with distinct time ranges and colors.
For example, Session 1, Session 2, and Session 3 have configurable time ranges and colors (with adjustable opacity).
It checks if the current time falls within any of these sessions and, if so, applies a background color (bgcolor) to the chart with the configured session color.
Timezone Adjustment:
You can configure a UTC offset or use the exchange’s timezone to correctly adjust the session times.
4. Additional Levels and Analysis Groups
Groups of Levels (Levels 1, 2, 3, and 4):
Several groups are defined that allow data requests from different timeframes (e.g., 60 minutes, 240 minutes, daily, or weekly) and configure their parameters (length, line style, color).
For each group, the script uses a function that requests non-repainting data and calculates pivot levels based on ta.pivothigh/ta.pivotlow.
These levels are drawn on the chart with lines and “shadow” lines to reinforce the visualization of key pivot points. Labels are added with a slight offset to indicate the pivot value in the corresponding timeframe.
5. Maintenance and Management of Drawn Elements
Dynamic Update and Deletion:
The script maintains arrays to store the drawn boxes and lines. As new elements are added and the array reaches a maximum size (e.g., 500 elements), the oldest elements are deleted to avoid overloading the chart.
Extension and Hiding Conditions:
Conditions are checked to extend or delete zones based on whether the price has “filled” the area (i.e., if the current price has surpassed the zone level). There is also an option to hide zones once they are filled.
6. Session (Operational Zone) and Levels for Multiple Timeframes
Session Settings:
In addition to the pivot zones, the indicator also defines operational sessions with adjustable time ranges and colors, shading the background of the chart during those sessions.
Additional Level Groups:
The indicator allows grouping of analysis levels by timeframe, which can be useful for multi-timeframe analysis. Parameters such as length, style, and color are configurable for each group.
Summary:
The "BIAS PRO - Zones + Liquidity + SP&RS " is an all-in-one indicator that combines the detection of price pivots (swings) with the visual representation of key zones on the chart. With options to customize appearance, manage operational sessions, and group levels across different timeframes, this script is designed to help traders identify areas of high liquidity, potential breakouts, or reversals, thus optimizing decision-making based on market structure.
This explanation covers the main functionalities and workflow of the script, making it easier to understand without needing to examine the code in detail.
Auto Last Earnings AVWAP
This script provides an automated approach to tracking critical post-earnings price levels. You can add it to a chart and then flip through your watchlist to see the anchored AVWAPs without the need to do it manually one by one.
Core Features:
Automatically detects earnings dates and anchors VWAP calculations without manual input
Calculates volume-weighted average price specifically from the last earnings release
Identifies and visualizes significant earnings gaps between reporting periods
Volume-Based Signal Detection:
Monitors VWAP crosses with volume confirmation (requires 1.5x normal volume)
Labels high-volume breakouts with clear directional signals
Uses a 6-bar adaptive volume baseline to filter out noise
Practical Applications:
AVWAP anchored at earnings offers a great price support level that should be considered when deciding to buy/sell the stock. This script eliminates manual VWAP anchoring and reduces chart management time
Key Differentiators:
First note: coding VWAP anchoring in pine is more challenging that one would think. The source code is open to help other users and hopefully inspire different applications.
No need to manually anchor the VWAP
Draws earnings gap from earnings to earnings (if auto mode)
Detects breakouts through the AVWAP line
PullBack_Level_HunterThis script creates an "Auto Fibonacci" indicator that automatically plots selected Fibonacci retracement levels on a chart, based on a defined lookback period. Users can choose from various Fibonacci levels (0.236, 0.382, 0.5, 0.618, or 0.786) via a dropdown input, allowing for quick adjustments to analysis.
**Key Features:**
1. **Fibonacci Level Selection:** Users can select from multiple Fibonacci levels (0.236, 0.382, 0.5, 0.618, and 0.786) for analysis.
2. **Lookback Period:** The script allows users to define a lookback period to determine the highest high and the lowest low for plotting Fibonacci levels.
3. **Fibonacci Level Calculation:** The Fibonacci levels are calculated using two functions:
- `fib_level`: Calculates the Fibonacci level based on the highest high and lowest low of the lookback period.
- `fib_level_from_current`: Calculates the Fibonacci level from the current candle’s high.
4. **Plotting:** The script plots the selected Fibonacci level on the chart, using a red line for the general Fibonacci level and a blue line for the level calculated from the current high.
5. **Dynamic Visualization:** The Fibonacci levels are drawn as step lines to clearly visualize price levels based on historical data and current price action.
This tool is ideal for traders who wish to quickly assess key Fibonacci levels for potential support or resistance within a customizable lookback period.
CCI Buy and Sell Signals with 20/30 EMACCI Buy and Sell Signals with EMA and ATR Stop Loss/Take Profit
This indicator is designed to identify buy and sell signals based on a combination of the Commodity Channel Index (CCI) and Exponential Moving Averages (EMA). It also includes an optional ATR-based stop loss and take profit system, which is useful for traders who want to manage their trades with dynamic risk levels.
Features:
CCI Buy and Sell Signals:
Buy Signal: A buy signal is triggered when the CCI crosses up through -100 (from an oversold condition), the 20-period EMA is above the 30-period EMA, and the price is above the 200-period EMA. This suggests that the market is entering an upward trend.
Sell Signal: A sell signal is triggered when the CCI crosses down through +100 (from an overbought condition), the 20-period EMA is below the 30-period EMA, and the price is below the 200-period EMA. This suggests that the market is entering a downward trend.
Exponential Moving Averages (EMA):
The script plots three EMAs:
20-period EMA (Green): Used to identify short-term trends.
30-period EMA (Red): Used to capture medium-term trends.
200-period EMA (Orange): A long-term trend filter, with the price above it generally indicating bullish conditions and below it indicating bearish conditions.
ATR-Based Stop Loss and Take Profit:
Optional Feature: The ATR (Average True Range) indicator can be used to set stop loss and take profit levels based on market volatility.
Stop Loss: Set at a multiple of the ATR below the entry price for long positions and above the entry price for short positions.
Take Profit: Set at a multiple of the ATR above the entry price for long positions and below the entry price for short positions.
Customizable: You can adjust the ATR length, Stop Loss Multiplier, and Take Profit Multiplier through the settings.
Dots: The stop loss and take profit levels are plotted as dots on the chart when the ATR feature is enabled.
Alert Conditions:
Buy Signal Alert: Triggered when a buy signal occurs based on CCI crossing up -100 and other conditions being met.
Sell Signal Alert: Triggered when a sell signal occurs based on CCI crossing down +100 and other conditions being met.
Any Signal Alert: This is a combined alert that triggers for either a buy or sell signal. It helps you stay updated on both types of signals simultaneously.
How to Use:
The indicator will plot buy and sell arrows on the chart, giving clear entry points for trades based on CCI and EMA conditions.
The ATR stop loss and take profit dots (when enabled) provide automatic risk management levels, adjusting dynamically with market volatility.
Traders can customize the ATR settings to fine-tune their stop loss and take profit levels, making this strategy adaptable to different trading styles and market conditions.
Daily Bubble Risk AdjustmentThis script calculates the ratio of the asset's closing price to its 20-week moving average (20W MA) and visualizes it as a color-coded line chart. The script also includes a customizable moving average (default: 111-day MA) to help smooth the ratio trend.
It identifies overbought and oversold conditions relative to the 20W MA, making it a valuable tool for long-term trend analysis.
Grids lines"Líneas de Grid para Análisis Técnico"
Este indicador dibuja líneas de grid (rejilla) en el gráfico de precios, lo que puede ayudar a visualizar zonas de soporte, resistencia y niveles de interés en un rango de precios determinado.
Características:
Precio Mínimo y Máximo: Configura los precios entre los cuales se dibujarán las líneas de grid.
Número de Grids: Establece cuántas líneas de grid quieres ver en el gráfico.
Color y Grosor de las Líneas: Personaliza los colores y el grosor de las líneas de grid, incluyendo la primera y la última línea.
Estilo de las Líneas: Puedes elegir entre líneas discontinuas (Dotted) o sólidas (Solid), para personalizar aún más tu visualización.
Ticker Específico: Si lo deseas, puedes elegir un ticker específico para dibujar las líneas solo cuando el gráfico esté mostrando ese activo. De lo contrario, las líneas se dibujarán en el gráfico actual.
Parámetros:
Precio Mínimo: El precio más bajo para el rango del grid (por ejemplo: 0.82).
Precio Máximo: El precio más alto para el rango del grid (por ejemplo: 1.24).
Número de Grids: Define cuántas líneas quieres entre el precio mínimo y el máximo (por ejemplo: 30).
Estilo de Línea: Elige entre Dotted (líneas discontinuas) o Solid (líneas sólidas).
Ticker: Si deseas dibujar las líneas solo para un ticker específico, ingresa el símbolo del ticker (por ejemplo, ADAUSDT). Si dejas este campo vacío, las líneas se dibujarán en el gráfico actual.
Ejemplo de Uso:
Si estás analizando el par ADAUSDT, puedes escribir ADAUSDT en el campo del ticker para que las líneas solo se dibujen cuando este par esté visible. Si dejas el campo vacío, las líneas se dibujarán en cualquier ticker que tengas en el gráfico.
Descripción en Inglés:
"Grid Lines for Technical Analysis"
This indicator draws grid lines on the price chart, helping to visualize support, resistance, and key levels within a specific price range.
Features:
Min and Max Price: Set the price range for the grid lines to be drawn.
Number of Grids: Choose how many grid lines you want to display on the chart.
Line Color and Thickness: Customize the color and thickness of the grid lines, including the first and last line.
Line Style: Choose between Dotted (dashed lines) or Solid (solid lines) to further customize your view.
Specific Ticker: If desired, you can specify a ticker for the grid lines to only be drawn when that asset is shown. Otherwise, the lines will be drawn on the current chart.
Parameters:
Min Price: The lowest price for the grid range (for example, 0.82).
Max Price: The highest price for the grid range (for example, 1.24).
Number of Grids: Defines how many lines you want between the minimum and maximum price (for example, 30).
Line Style: Choose between Dotted or Solid.
Ticker: To draw the lines only for a specific ticker, enter the symbol of the ticker (for example, ADAUSDT). If left blank, the lines will be drawn on the current ticker.
Usage Example:
If you're analyzing the pair ADAUSDT, you can enter ADAUSDT in the ticker field to draw the lines only when that pair is visible. If you leave the field blank, the lines will be drawn for any ticker currently on the chart.
High-Probability IndicatorExplanation of the Code
Trend Filter (EMA):
A 50-period Exponential Moving Average (EMA) is used to determine the overall trend.
trendUp is true when the price is above the EMA.
trendDown is true when the price is below the EMA.
Momentum Filter (RSI):
A 14-period RSI is used to identify overbought and oversold conditions.
oversold is true when RSI ≤ 30.
overbought is true when RSI ≥ 70.
Volatility Filter (ATR):
A 14-period Average True Range (ATR) is used to measure volatility.
ATR is multiplied by a user-defined multiplier (default: 2.0) to set a volatility threshold.
Ensures trades are only taken during periods of sufficient volatility.
Entry Conditions:
Long Entry: Price is above the EMA (uptrend), RSI is oversold, and the candle range exceeds the ATR threshold.
Short Entry: Price is below the EMA (downtrend), RSI is overbought, and the candle range exceeds the ATR threshold.
Exit Conditions:
Take Profit: A fixed percentage above/below the entry price.
Stop Loss: A fixed percentage below/above the entry price.
Visualization:
The EMA is plotted on the chart.
Background colors highlight uptrends and downtrends.
Buy and sell signals are displayed as labels on the chart.
Alerts:
Alerts are triggered for buy and sell signals.
How to Use the Indicator
Trend Filter:
Only take trades in the direction of the trend (e.g., long in an uptrend, short in a downtrend).
Momentum Filter:
Look for oversold conditions in an uptrend for long entries.
Look for overbought conditions in a downtrend for short entries.
Volatility Filter:
Ensure the candle range exceeds the ATR threshold to avoid low-volatility trades.
Risk Management:
Use the built-in take profit and stop loss levels to manage risk.
Optimization Tips
Backtesting:
Test the indicator on multiple timeframes and assets to evaluate its performance.
Adjust the input parameters (e.g., EMA length, RSI length, ATR multiplier) to optimize for specific markets.
Combination with Other Strategies:
Add additional filters, such as volume analysis or support/resistance levels, to improve accuracy.
Risk Management:
Use proper position sizing and risk-reward ratios to maximize profitability.
Disclaimer
No indicator can guarantee an 85% win ratio due to the inherent unpredictability of financial markets. This script is provided for educational purposes only. Always conduct thorough backtesting and paper trading before using any strategy in live trading.
Let me know if you need further assistance or enhancements!
[COG] WeatherForecaster🌤️ Just like a weather forecast that adjusts as new data emerges, this TMA Pivot Points Forecaster adapts to evolving market conditions!
Description:
This indicator combines the power of a Triple Moving Average (TMA) with pivot point analysis to identify potential market turning points and trend directions. Like a meteorologist using various atmospheric data to predict weather patterns, this tool analyzes price action through multiple lenses to forecast potential market movements.
Key Features:
- Dynamic TMA Line: Acts as our "atmospheric pressure system," showing the underlying market direction
- Adaptive Pivot Points: Like weather stations, these pivots identify key market levels where the "climate" might change
- Smart Entry Signals: ☀️ and 🌧️ icons appear when conditions align for potential trades
- Timeframe-Adaptive: Automatically adjusts sensitivity across different timeframes
- Customizable Visuals: Adjust colors and styles to match your trading environment
Settings Include:
✓ TMA Length and Slope Sensitivity
✓ Pivot Point Parameters
✓ Visual Customization Options
✓ Toggle Entry Signals
✓ Toggle Pivot Lines
Note: Like weather forecasts that update with new data, this indicator recalculates as market conditions evolve. Past signals may adjust as more price action develops. Always use proper risk management and combine with other analysis tools.
Usage Guide:
The indicator works best when used as part of a complete trading system. Here's how to interpret the signals:
📈 Bullish Conditions:
- TMA Line turns green: Indicates upward momentum
- "Buy above 🌋" level appears: Potential resistance turned support level
- ☀️ Signal: Indicates favorable buying conditions
📉 Bearish Conditions:
- TMA Line turns red: Indicates downward momentum
- "Sell below 🌋" level appears: Potential support turned resistance level
- 🌧️ Signal: Indicates favorable selling conditions
⏺️ Ranging Conditions:
- TMA Line turns yellow: Market in consolidation
- 💤 Signal: Suggests waiting for clearer direction
Best Practices:
1. Higher timeframes (4H, Daily) tend to produce more reliable signals
2. Use the pivot lines as potential entry/exit reference points
3. Adjust the TMA length based on your trading style:
• Shorter lengths (20-30) for more active trading
• Longer lengths (50-60) for trend following
Settings Explained:
TMA Settings:
- TMA Length: Determines the smoothing period (default: 30)
- Slope Threshold: Controls trend sensitivity (default: 0.015)
Pivot Settings:
- Left/Right Bars: Controls pivot point calculation
- Line Length: Adjusts the visual length of pivot lines
- Line Style & Colors: Customize the visual appearance
Disclaimer:
Past performance does not guarantee future results. This indicator, like any technical tool, provides possibilities rather than certainties. Please test thoroughly on your preferred timeframes and markets before using with real capital.
MF TimeWaves Predictor: Find future Top and Bottom PivotsThe script allows to predict future pivot tops and bottoms "dates" by studying the chart.
For it, it detects the past pivots and project new ones on the future
It might be useful for swing trading
You might want to enable the "Automatically modify settings" options if you want to use my default settings for different timeframes
Note: It does not offers any prediction for future prices, just dates
Enjoy!
High Volume Time (HVT) Auto-DisplayThis Indicator displays the upcoming HVT for the NasDaq on a table. The HVT is also displayed on the chart in real-time in order to help accentuate the best times to trade and a clear picture for the daily directional move. This times were found manually and bear as much significance as I bring it to have. These are not guaranteed times for the market to move, but rather High Probability Times based on my own backtesting on NQ.
Average Price in Time PeriodsThis Pine Script calculates and displays average prices for two specific time ranges during a trading day: from 09:00 to 22:30 and from 22:30 to 09:00. It updates the average prices by summing the closing prices in each time frame and then plots them as green and red lines, respectively. The script also displays black lines outside these specific time ranges to prevent "gaps" in the chart during off-peak hours. The displayed lines are dynamically adjusted based on the current time, with the green line for 09:00-22:30 and the red line for 22:30-09:00.
Custom Time K-barCustom Time K-bar Indicator
This custom indicator highlights specific times on the chart, helping traders identify key moments based on user-defined time intervals. The script is designed to highlight two distinct times with different colors, which can be customized to suit the trader's needs.
Features:
Custom Time Inputs: Set two specific times in hours and minutes (e.g., 09:00 and 22:30).
Highlighting on Chart: The chart background changes color when the current time matches the defined times. Green for the first time and red for the second time.
Dynamic Labels: Labels display the exact time at the lowest and highest points of the corresponding candles, showing the user-defined times in a clear and visible format.
Timezone Adjustment: The indicator is adjusted for the GMT+8 timezone.
Customization:
Easily adjust the two key times and customize the colors for highlighting.
The script allows for easy tracking of key time events, which can be crucial for strategies that rely on specific timings during market hours.
This indicator is ideal for traders who want to track and visualize important times dynamically on the chart. Whether you're focusing on specific market events or just want to see certain time intervals highlighted, this script can help streamline your analysis.
Relative Strength Index With Range ZoneRSI (Relative Strength Index) with 45-55 Range Zone
1. Introduction and Historical Background
The Relative Strength Index (RSI) is a momentum indicator developed in 1978 by J. Welles Wilder Jr. It measures the speed and magnitude of price changes to assess overbought and oversold conditions of an asset. This widely used oscillator ranges between 0 and 100.
Historically, the RSI was mainly used to detect trend reversals by identifying extreme levels: above 70 (overbought) and below 30 (oversold). However, its application has evolved, and new approaches refine its interpretation, such as adding a 45-55 neutral zone to identify consolidation (range) periods.
2. RSI Calculation
The RSI is calculated using the following formula:
RSI=100−(1001+RS)RSI=100−(1+RS100)
Where:
RS=Average gain over N periodsAverage loss over N periodsRS=Average loss over N periodsAverage gain over N periods
• RS (Relative Strength) is the ratio between the average gains and the average losses over N periods (typically 14 periods).
• Gains and losses are calculated based on daily price variations.
Example calculation with a 14-day period:
1. Compute daily gains and losses.
2. Take an exponential or simple moving average of these values over 14 days.
3. Apply the formula to get the RSI value.
3. Classic RSI Usage
The RSI is typically interpreted as follows:
• RSI > 70: Overbought → Possible correction or bearish reversal.
• RSI < 30: Oversold → Possible rebound or bullish reversal.
• RSI between 50 and 70: Bullish momentum.
• RSI between 30 and 50: Bearish momentum.
4. Adding the 45-55 Zone to Identify Range Phases
Adding a neutral zone between 45 and 55 helps identify consolidation periods, when price moves sideways without a strong trend.
• RSI between 45 and 55: The market is in a range, meaning neither buyers nor sellers dominate.
• RSI breaking out of this zone:
o Above 55: Indicates the start of a bullish trend.
o Below 45: Indicates the start of a bearish trend.
This zone is particularly useful for:
• Avoiding false signals by waiting for trend confirmation.
• Identifying ranging markets, favoring range trading strategies (buying at support, selling at resistance).
• Filtering trend-based entries, waiting for the RSI to exit the 45-55 zone.
5. Trading Strategies Using RSI with the 45-55 Range Zone
1. Range Trading:
• When the RSI oscillates between 45 and 55, it signals a lack of strong trend.
• Strategy:
o Identify a support and resistance level.
o Buy near support when the RSI touches 45.
o Sell near resistance when the RSI touches 55.
2. Breakout Trading:
• If the RSI exits the 45-55 zone:
o Above 55 → Buy (start of a bullish trend).
o Below 45 → Sell (start of a bearish trend).
• This breakout can be used as a confirmed entry signal.
3. Confirmation with Divergences:
• A bullish divergence (price making lower lows while RSI makes higher lows) is more relevant if the RSI moves above 55.
• A bearish divergence (price making higher highs while RSI makes lower highs) is stronger if the RSI drops below 45.
6. Conclusion
The RSI is a powerful tool for analyzing price momentum. Adding a 45-55 zone enhances its usage by clearly distinguishing:
• Consolidation phases (range markets).
• Trend beginnings when RSI breaks out of this range.
This approach improves RSI reliability by filtering out false signals and allowing traders to adapt their strategy based on market conditions.
Daily COC Strategy with SHERLOCK WAVESThis indicator implements a unique trading strategy known as the "Daily COC (Candle Over Candle) Strategy" enhanced with "SHERLOCK WAVES" for pattern recognition. It's designed for traders looking to capitalize on specific candlestick formations with a negative risk-reward ratio, with the aim of achieving a high win rate (over 70%) through numerous trading opportunities, despite each trade having a higher risk relative to the reward.
Key Features:
Pattern Recognition: Identifies a setup based on three consecutive candles - a red candle followed by a shooting star, then an entry candle that does not break below the shooting star's low.
Negative Risk/Reward Trade Selection: Focuses on entries where the potential stop loss is greater than the take profit, banking on a high win rate to offset the individual trade's negative risk-reward ratio.
Visual Signals:
Green Label: Marks potential entry points at the high of the candle before the entry.
Green Dot: Indicates a winning trade closure.
Red Dot: Signals a losing trade closure.
Blue Circle: Warns when the current candle is within 2% of breaking above the previous candle's high, suggesting a potential setup is developing.
Green Circle: Plots the take profit level.
Red Circle: Plots the stop loss level.
Dynamic Statistics: A live updating label showing the number of trades, wins, losses, open trades, current account balance, and win percentage.
Customizable Parameters:
Risk % per Trade: Adjust the percentage of your account balance you're willing to risk on each trade.
Initial Account Balance: Set your starting balance for tracking performance.
Start Date for Strategy: Define when the strategy should start calculating from, allowing for backtesting.
Alerts:
An alert condition is set for when a potential trade setup is developing, helping traders prepare for entries.
Usage Tips:
This strategy is predicated on the idea that a high win rate can compensate for the negative risk-reward ratio of individual trades. It might not suit all market conditions or traders' risk profiles.
Use this strategy in conjunction with other analysis methods to validate trade setups.
Note: Always backtest thoroughly before applying to live markets. Consider this tool as part of a broader trading strategy, not a standalone solution. Monitor your win rate and adjust your risk management accordingly to ensure the strategy remains profitable over time.
This description now correctly explains the purpose behind the negative risk-reward ratio in the context of your trading strategy.
Global M2 Index Percentage### **Global M2 Index Percentage**
**Description:**
The **Global M2 Index Percentage** is a custom indicator designed to track and visualize the global money supply (M2) in a normalized percentage format. It aggregates M2 data from major economies (e.g., the US, EU, China, Japan, and the UK) and adjusts for exchange rates to provide a comprehensive view of global liquidity. This indicator helps traders and investors understand the broader macroeconomic environment, identify trends in money supply, and make informed decisions based on global liquidity conditions.
---
### **How It Works:**
1. **Data Aggregation**:
- The indicator collects M2 data from key economies and adjusts it using exchange rates to calculate a global M2 value.
- The formula for global M2 is:
\
2. **Normalization**:
- The global M2 value is normalized into a percentage (0% to 100%) based on its range over a user-defined period (default: 13 weeks).
- The formula for normalization is:
\
3. **Visualization**:
- The indicator plots the M2 Index as a line chart.
- Key reference levels are highlighted:
- **10% (Red Line)**: Oversold level (low liquidity).
- **50% (Black Line)**: Neutral level.
- **80% (Green Line)**: Overbought level (high liquidity).
---
### **How to Use the Indicator:**
#### **1. Understanding the M2 Index:**
- **Below 10%**: Indicates extremely low liquidity, which may signal economic contraction or tight monetary policy.
- **Above 80%**: Indicates high liquidity, which may signal loose monetary policy or potential inflationary pressures.
- **Between 10% and 80%**: Represents a neutral to moderate liquidity environment.
#### **2. Trading Strategies:**
- **Long-Term Investing**:
- Use the M2 Index to assess global liquidity trends.
- **High M2 Index (e.g., >80%)**: Consider investing in risk assets (stocks, commodities) as liquidity supports growth.
- **Low M2 Index (e.g., <10%)**: Shift to defensive assets (bonds, gold) as liquidity tightens.
- **Short-Term Trading**:
- Combine the M2 Index with technical indicators (e.g., RSI, MACD) for timing entries and exits.
- **M2 Index Rising + RSI Oversold**: Potential buying opportunity.
- **M2 Index Falling + RSI Overbought**: Potential selling opportunity.
#### **3. Macroeconomic Analysis**:
- Use the M2 Index to monitor the impact of central bank policies (e.g., quantitative easing, rate hikes).
- Correlate the M2 Index with inflation data (CPI, PPI) to anticipate inflationary or deflationary trends.
---
### **Key Features:**
- **Customizable Timeframe**: Adjust the lookback period (e.g., 13 weeks, 26 weeks) to suit your trading style.
- **Multi-Economy Data**: Aggregates M2 data from the US, EU, China, Japan, and the UK for a global perspective.
- **Normalized Output**: Converts raw M2 data into an easy-to-interpret percentage format.
- **Reference Levels**: Includes key levels (10%, 50%, 80%) for quick analysis.
---
### **Example Use Case:**
- **Scenario**: The M2 Index rises from 49% to 62% over two weeks.
- **Interpretation**: Global liquidity is increasing, potentially due to central bank stimulus.
- **Action**:
- **Long-Term**: Increase exposure to equities and commodities.
- **Short-Term**: Look for buying opportunities in oversold assets (e.g., RSI < 30).
---
### **Why Use the Global M2 Index Percentage?**
- **Macro Insights**: Understand the broader economic environment and its impact on financial markets.
- **Risk Management**: Identify periods of high or low liquidity to adjust your portfolio accordingly.
- **Enhanced Timing**: Combine with technical analysis for better entry and exit points.
---
### **Conclusion:**
The **Global M2 Index Percentage** is a powerful tool for traders and investors seeking to incorporate macroeconomic data into their strategies. By tracking global liquidity trends, this indicator helps you make informed decisions, whether you're trading short-term or planning long-term investments. Add it to your TradingView charts today and gain a deeper understanding of the global money supply!
---
**Disclaimer**: This indicator is for informational purposes only and should not be considered financial advice. Always conduct your own research and consult with a professional before making investment decisions.
RSI Crossover dipali parikhThis script generates buy and sell signals based on the crossover of the Relative Strength Index (RSI) and the RSI-based Exponential Moving Average (EMA). It also includes an additional condition for both buy and sell signals that the RSI-based EMA must be either above or below 50.
Key Features:
Buy Signal: Triggered when:
The RSI crosses above the RSI-based EMA.
The RSI-based EMA is above 50.
A green "BUY" label will appear below the bar when the buy condition is met.
Sell Signal: Triggered when:
The RSI crosses below the RSI-based EMA.
The RSI-based EMA is below 50.
A red "SELL" label will appear above the bar when the sell condition is met.
Customizable Inputs:
RSI Length: Adjust the period for calculating the RSI (default is 14).
RSI-based EMA Length: Adjust the period for calculating the RSI-based EMA (default is 9).
RSI Threshold: Adjust the threshold (default is 50) for when the RSI-based EMA must be above or below.
Visuals:
The RSI is plotted as a blue line.
The RSI-based EMA is plotted as an orange line.
Buy and sell signals are indicated by green "BUY" and red "SELL" labels.
Alerts:
Alerts can be set for both buy and sell conditions to notify you when either condition is met.
How to Use:
Use this script to identify potential buy and sell opportunities based on the behavior of the RSI relative to its EMA.
The buy condition indicates when the RSI is strengthening above its EMA, and the sell condition signals when the RSI is weakening below its EMA.
Strategy Use:
Ideal for traders looking to leverage RSI momentum for entering and exiting positions.
The RSI-based EMA filter helps smooth out price fluctuations, focusing on stronger signals.
This script is designed for both discretionary and algorithmic traders, offering a simple yet effective method for spotting trend reversals and continuation opportunities using RSI.
KRI For Loop | QuantumResearchIntroducing Rocheur’s KRI For Loop Indicator
The KRI For Loop indicator is an advanced trend-following tool that enhances the traditional Kairi Relative Index (KRI) with a for-loop scoring mechanism. The Kairi Relative Index (KRI) measures the percentage deviation of price from its smoothed moving average, helping traders identify market trends and reversals. By incorporating a for-loop calculation, this version refines trend detection, making it a powerful tool for traders seeking precise entry and exit points.
Understanding the KRI For Loop
The Kairi Relative Index (KRI) is a momentum-based indicator that calculates how far the current price deviates from its moving average, expressed as a percentage. It is widely used to identify overbought and oversold conditions, as well as potential trend reversals.
In this enhanced version, a for-loop scoring mechanism systematically evaluates KRI values within a defined range to determine trend strength:
KRI Calculation: The formula computes the percentage difference between price and an Exponential Moving Average (EMA) of a user-defined length.
For-Loop Scoring: A dynamic scoring system assesses the strength of KRI values across a range (default: -20 to 20), helping to refine market trend analysis.
Threshold-Based Signal Generation:
Long Signal: Triggered when the for-loop score surpasses the long threshold (default: 8).
Short Signal: Triggered when the score falls below the short threshold (default: -5).
Visual Representation
The KRI For Loop indicator provides a clear, color-coded trend analysis:
Green Bars: Indicate bullish conditions when the score surpasses the long threshold, signaling a potential buy opportunity.
Red Bars: Indicate bearish conditions when the score drops below the short threshold, suggesting a sell opportunity.
Gray Bars: Show neutral conditions when the score remains within the defined range.
KRI Bands: Three horizontal bands help visualize market structure:
Upper Band: Represents the bullish threshold.
Middle Band: Zero line for neutral conditions.
Lower Band: Represents the bearish threshold.
Background Fill: A shaded area between the bands highlights trend intensity.
Customization & Parameters
The KRI For Loop indicator offers multiple user-configurable settings for flexibility:
KRI Length: Default set to 27, determines the EMA smoothing period.
Source Price: Selectable input price for calculations (default: close).
Scoring Range (a, b): Defines the range of KRI values assessed in the for-loop (default: -20 to 20).
Long & Short Thresholds:
Long Threshold: Default set to 8, determines when bullish conditions are strong enough for a buy signal.
Short Threshold: Default set to -5, identifies bearish conditions for sell signals.
Color Modes: Choose from eight distinct color schemes to personalize the indicator’s appearance.
Trading Applications
This indicator is highly adaptable and can be applied to various trading strategies, including:
Momentum Trading: Evaluates trend strength based on KRI deviation and for-loop scoring.
Trend Following: Helps traders stay in profitable trends by identifying strong bullish and bearish conditions.
Reversal Detection: The crossing of key KRI thresholds can signal potential market reversals.
Risk Management: Clearly defined entry and exit rules help traders manage risk effectively.
Final Note
Rocheur’s KRI For Loop indicator combines the power of the Kairi Relative Index (KRI) with an advanced for-loop scoring method to deliver a refined market trend analysis. This structured approach offers traders a dynamic and visually intuitive tool for detecting momentum shifts and trend reversals. As always, backtesting and strategic adjustments are essential to fully optimize this indicator for real-world trading.
5am C.R.T.Here’s a rewritten description for your **Custom Time Frame OHLC Indicator** that complies with **TradingView's House Rules** and focuses on the core functionality of the indicator: drawing the **Open, High, Low, Close (OHLC)** for a custom time frame and providing alerts when the range is broken. The description is concise, clear, and adheres to TradingView's guidelines.
---
### **Custom Time Frame OHLC Indicator with Range Break Alerts**
This indicator is designed to help traders identify key price levels by drawing the **Open, High, Low, and Close (OHLC)** for a **custom time frame**. It also provides **alerts** when the price breaks above the high or below the low of the defined range. This tool is ideal for traders who rely on specific time-based ranges for their trading strategies.
---
#### **Key Features**
1. **Custom Time Frame OHLC:**
- Draws the **Open, High, Low, and Close (OHLC)** levels for a user-defined time frame (e.g., 5AM, 9AM, or any custom time).
- The OHLC levels are displayed as horizontal lines on the chart, making it easy to visualize the range.
2. **Range Break Alerts:**
- Sends **alerts** when the price breaks above the high or below the low of the defined range.
- Alerts can be customized to notify traders via email, SMS, or TradingView's notification system.
3. **Flexible Time Frame:**
- Traders can set the **custom time frame** to match their preferred trading session or strategy (e.g., 5AM for the 5AM CR Model or any other time).
4. **Clean and Simple Visualization:**
- The OHLC levels are displayed as clear horizontal lines, ensuring the chart remains uncluttered and easy to interpret.
---
#### **How to Use the Indicator**
1. **Set the Custom Time Frame:**
- Input the desired time (e.g., 5:00 AM) in the indicator settings.
- The indicator will automatically draw the **Open, High, Low, and Close (OHLC)** levels for that specific time frame.
2. **Monitor the Range:**
- Use the OHLC levels as reference points for potential support, resistance, or breakout zones.
- The high and low of the range act as key levels for breakout or reversal strategies.
3. **Receive Alerts:**
- When the price breaks above the high or below the low of the range, the indicator will trigger an alert.
- Traders can use these alerts to take action based on their trading strategy.
---
#### **Customizable Parameters**
- **Custom Time:** Set the specific time for the OHLC levels (e.g., 5:00 AM, 9:00 AM, etc.).
- **Alert Settings:** Enable or disable alerts for range breaks (high or low).
- **Line Colors:** Customize the colors of the OHLC lines for better visualization.
---
#### **Why This Indicator is Useful**
- **Simplifies Range Identification:** Automatically draws the OHLC levels for any custom time frame, saving traders time and effort.
- **Alerts for Breakouts:** Provides real-time alerts when the price breaks the range, helping traders act quickly on potential trading opportunities.
- **Flexible and Customizable:** Works with any time frame and can be tailored to fit various trading strategies.
---
#### **Limitations**
- **Time-Sensitive:** The indicator is most useful when the custom time frame aligns with key market sessions or trading strategies.
- **No Predictive Power:** The indicator does not predict future price movements. It simply identifies the OHLC levels and alerts when the range is broken.
- **Manual Confirmation:** Traders should use additional analysis (e.g., trend, volume, or other indicators) to confirm trading decisions.
---
#### **Compliance with TradingView Rules**
- **English Title and Description:** The title and description are in English, with no all-caps or special characters.
- **Original and Useful:** The indicator is original and adds value to the TradingView community by simplifying the process of identifying OHLC levels and range breaks.
- **No Misleading Claims:** The description clearly states the indicator's purpose, limitations, and how it should be used.
- **No Lookahead Bias:** The script does not use `request.security()` with lookahead to access future data.
---
### **Example Chart Setup**
- **Clean Chart:** The indicator is published with a clean chart, showing the OHLC levels for the custom time frame (e.g., 5:00 AM).
- **Symbol/Timeframe:** The chart includes complete symbol and timeframe information for clarity.
---
### **Conclusion**
The **Custom Time Frame OHLC Indicator with Range Break Alerts** is a simple yet powerful tool for traders who rely on specific time-based ranges in their trading strategies. By automating the process of drawing OHLC levels and providing alerts for range breaks, this indicator helps traders stay informed and act quickly on potential trading opportunities.
---
This description is concise, compliant with TradingView's rules, and clearly explains the functionality and purpose of the indicator. It avoids making unrealistic claims and focuses on the practical use of the tool.
Overnight vs Intra-day Performance█ STRATEGY OVERVIEW
The "Overnight vs Intra-day Performance" indicator quantifies price behaviour differences between trading hours and overnight periods. It calculates cumulative returns, compound growth rates, and visualizes performance components across user-defined time windows. Designed for analytical use, it helps identify whether returns are primarily generated during market hours or overnight sessions.
█ USAGE
Use this indicator on Stocks and ETFs to visualise and compare intra-day vs overnight performance
█ KEY FEATURES
Return Segmentation : Separates total returns into overnight (close-to-open) and intraday (open-to-close) components
Growth Tracking : Shows simple cumulative returns and compound annual growth rates (CAGR)
█ VISUALIZATION SYSTEM
1. Time-Series
Overnight Returns (Red)
Intraday Returns (Blue)
Total Returns (White)
2. Summary Table
Displays CAGR
3. Price Chart Labels
Floating annotations showing absolute returns and CAGR
Color-coded to match plot series
█ PURPOSE
Quantify market behaviour disparities between active trading sessions and overnight positioning
Provide institutional-grade attribution analysis for returns generation
Enable tactical adjustment of trading schedules based on historical performance patterns
Serve as foundational research for session-specific trading strategies
█ IDEAL USERS
1. Portfolio Managers
Analyse overnight risk exposure across holdings
Optimize execution timing based on return distributions
2. Quantitative Researchers
Study market microstructure through time-segmented returns
Develop alpha models leveraging session-specific anomalies
3. Market Microstructure Analysts
Identify liquidity patterns in overnight vs daytime sessions
Research ETF premium/discount mechanics
4. Day Traders
Align trading hours with highest probability return windows
Avoid overnight gaps through informed position sizing