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.
Zyklen
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.
Combined RSI with SMA, ADX/DI, and Stochastic IndicatorHow to Use and Apply the Indicator
This indicator combines the **RSI with SMA**, **ADX/DI**, and **Stochastic Oscillator**, providing multiple perspectives for technical analysis. Here's how you can use and apply it effectively:
1. **RSI with SMA (Relative Strength Index with Simple Moving Average)**
- **Purpose**: Measures momentum and identifies overbought or oversold levels.
- **Features**:
- **RSI (14-period)**: Tracks momentum.
- **SMA (20-period)**: Smooths the RSI for trend clarity.
- **Visual Enhancements**:
- Dashed lines at user-defined levels (default: 55 and 45).
- Highlighted zones: Above 55 (green), below 45 (red).
- Fill between RSI and SMA to indicate convergence/divergence.
- **Usage**:
- **Overbought/Oversold**: Look for RSI crossing above 70 (overbought) or below 30 (oversold).
- **Trend Strength**: If RSI stays consistently above 50 (bullish) or below 50 (bearish).
- **Divergence**: When RSI and SMA move apart, consider it a potential signal of trend change.
2. **ADX and DI (Average Directional Index with Directional Indicators)**
- **Purpose**: Measures trend strength and direction.
- **Features**:
- **ADX (14-period)**: Shows trend strength (higher values indicate stronger trends).
- **+DI and -DI**: Represent bullish and bearish directional movements.
- **Color Coding**:
- **Green**: Bullish trend.
- **Red**: Bearish trend.
- **Orange**: Weak/no trend (when ADX is below the "range" level).
- **Dynamic Fill**: Highlights areas based on whether +DI > -DI or vice versa.
- **Usage**:
- **Strong Trend**: When ADX > 30, trend is strong.
- **Bullish/Bearish Bias**: Compare +DI and -DI:
- **+DI > -DI**: Bullish bias.
- **-DI > +DI**: Bearish bias.
- **Caution Zone**: If ADX < 15, avoid trading as the market lacks direction.
### 3. **Stochastic Oscillator**
- **Purpose**: Identifies overbought and oversold conditions.
- **Features**:
- Tracks %K (fast line) and %D (signal line) for crossovers.
- Highlights overbought (>80) and oversold (<20) regions.
- Fills between %K and %D for easy visualization of crossovers.
- **Usage**:
- **Overbought/Oversold**: Look for price reversals when %K crosses %D in these regions.
- **Entry Signals**:
- Buy: %K crosses above %D in the oversold region (<20).
- Sell: %K crosses below %D in the overbought region (>80).
- **Confirm Trends**: Combine with ADX or RSI to validate signals.
General Application:
1. **Setup**: Add this script to your chart in TradingView.
2. **Interpretation**:
- Use **RSI with SMA** to identify momentum and potential trend reversals.
- Confirm trend strength and direction with **ADX/DI**.
- Refine entries/exits with **Stochastic Oscillator**.
3. **Alerts**:
- Enable alerts for buy/sell signals in ADX/DI to avoid missing key moves.
4. **Risk Management**:
- Avoid trading during low ADX periods (<15) as the market lacks direction.
- Combine signals with support/resistance levels or price patterns for better accuracy.
By integrating these indicators, this script allows for a comprehensive market analysis to enhance your decision-making.
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
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
Real-Time Data Error Check _byMDKTests back if there was missing data/bar with respect to selected timeframe and source.
Experienced red data (no-real time data is available) so i come up with the idea.
Regards.
i.redd.it
Crypto Neo - Blockchain Momentum (BTC Settings)The Crypto Neo - Blockchain Momentum indicator analyzes Bitcoin’s on-chain activity to gauge bullish or bearish trends. It combines multiple on-chain metrics and applies different moving average strategies to assess Bitcoin’s momentum.
This indicator is designed to track key blockchain data sources, such as:
Hash Rate
Active Addresses
Transactions per Second
New Addresses
Trader Behavior
Long-Term Holders (Cruisers)
Money Flow In/Out
Large Transactions Count
It processes these inputs using various Moving Average (MA) types, including SMA, EMA, DMA, to generate a Bullish Momentum Score, which is visually displayed on the chart.
How to Use:
Select MA Type – Choose between SMA, EMA, MIXMA, or DMA to determine how moving averages are applied.
Set MA Lengths – Adjust MA1 Length and MA2 Length to define short-term vs. long-term trend comparison.
Customize Data Sources – Select different on-chain metrics for the indicator to analyze.
Interpret the Bullish Momentum Score:
🟢 Green (Strong Bullish Momentum) – Bullish on-chain signals dominate.
🟡 Yellow (Moderate Bullish Momentum) – Weak bullish trend forming.
⚪ White (Neutral) – No clear trend.
🟠 Orange (Moderate Bearish Momentum) – Weak bearish signals emerging.
🔴 Red (Strong Bearish Momentum) – Bearish on-chain signals dominate.
Important Notes
This indicator does not generate trading signals but helps interpret blockchain trends for informed decision-making.
Since it relies on daily on-chain data, it is best used on the 1D timeframe for accurate readings.
Real-time calculations may vary slightly due to different bar update behaviors.
This indicator is very useful to confirm market turns early. Here are a few an example setups:
1. Back in 2019 on chain metrics started trending up after the market had dumped signaling a very good opportunity to buy.
2. During the 2021 bull market. When the market was forming a top, the on chain metrics started trending down indicating a risk to the downside.
Multi-Timeframe RSI Grid Strategy with ArrowsKey Features of the Strategy
Multi-Timeframe RSI Analysis:
The strategy calculates RSI values for three different timeframes:
The current chart's timeframe.
Two higher timeframes (configurable via higher_tf1 and higher_tf2 inputs).
It uses these RSI values to identify overbought (sell) and oversold (buy) conditions.
Grid Trading System:
The strategy uses a grid-based approach to scale into trades. It adds positions at predefined intervals (grid_space) based on the ATR (Average True Range) and a grid multiplication factor (grid_factor).
The grid system allows for pyramiding (adding to positions) up to a maximum number of grid levels (max_grid).
Daily Profit Target:
The strategy has a daily profit target (daily_target). Once the target is reached, it closes all open positions and stops trading for the day.
Drawdown Protection:
If the open drawdown exceeds 2% of the account equity, the strategy closes all positions to limit losses.
Reverse Signals:
If the RSI conditions reverse (e.g., from buy to sell or vice versa), the strategy closes all open positions and resets the grid.
Visualization:
The script plots buy and sell signals as arrows on the chart.
It also plots the RSI values for the current and higher timeframes, along with overbought and oversold levels.
How It Works
Inputs:
The user can configure parameters like RSI length, overbought/oversold levels, higher timeframes, grid spacing, lot size multiplier, maximum grid levels, daily profit target, and ATR length.
RSI Calculation:
The RSI is calculated for the current timeframe and the two higher timeframes using ta.rsi().
Grid System:
The grid system uses the ATR to determine the spacing between grid levels (grid_space).
When the price moves in the desired direction, the strategy adds positions at intervals of grid_space, increasing the lot size by a multiplier (lot_multiplier) for each new grid level.
Entry Conditions:
A buy signal is generated when the RSI is below the oversold level on all three timeframes.
A sell signal is generated when the RSI is above the overbought level on all three timeframes.
Position Management:
The strategy scales into positions using the grid system.
It closes all positions if the daily profit target is reached or if a reverse signal is detected.
Visualization:
Buy and sell signals are plotted as arrows on the chart.
RSI values for all timeframes are plotted, along with overbought and oversold levels.
Example Scenario
Suppose the current RSI is below 30 (oversold), and the RSI on the 60-minute and 240-minute charts is also below 30. This triggers a buy signal.
The strategy enters a long position with a base lot size.
If the price moves against the position by grid_space, the strategy adds another long position with a larger lot size (scaled by lot_multiplier).
This process continues until the maximum grid level (max_grid) is reached or the daily profit target is achieved.
Key Variables
grid_level: Tracks the current grid level (number of positions added).
last_entry_price: Tracks the price of the last entry.
base_size: The base lot size for the initial position.
daily_profit_target: The daily profit target in percentage terms.
target_reached: A flag to indicate whether the daily profit target has been achieved.
Potential Use Cases
This strategy is suitable for traders who want to combine RSI-based signals with a grid trading approach to capitalize on mean-reverting price movements.
It can be used in trending or ranging markets, depending on the RSI settings and grid parameters.
Limitations
The grid trading system can lead to significant drawdowns if the market moves strongly against the initial position.
The strategy relies heavily on RSI, which may produce false signals in strongly trending markets.
The daily profit target may limit potential gains in highly volatile markets.
Customization
You can adjust the input parameters (e.g., RSI length, overbought/oversold levels, grid spacing, lot multiplier) to suit your trading style and market conditions.
You can also modify the drawdown protection threshold or add additional filters (e.g., volume, moving averages) to improve the strategy's performance.
In summary, this script is a sophisticated trading strategy that combines RSI-based signals with a grid trading system to manage entries, exits, and position sizing. It includes features like daily profit targets, drawdown protection, and multi-timeframe analysis to enhance its robustnes
21DMTSHere's a test Pine Script that looks for the 21 ema to be rising or falling. Just really testing out if I can link a chart with a strategy.
Automatic Fibonacci retracement based on the highest high and loThe chart is fractal, meaning that what happens can always be broken down into smaller portions.
This is often seen in various AR (Algorithmic Rules) concepts, such as breakers, order blocks, etc., where the price reacts.
I’ve visualized this behavior with this indicator.
This indicator takes the highest high and the lowest low from the past 5 weeks, excluding the current week.
The lowest low will represent 0%, and the highest high will represent 100% (green lines).
It then divides this range into 25%, 50%, 75%, and 100% levels (red and blue lines).
The indicator works on all charts and all timeframes, automatically adjusting when you switch charts or timeframes. No manual input is required.
Additionally, above 100%, it will create levels at 125%, 150%, 175%, and 200%, while below 0%, it will create levels at -25%, -50%, -75%, and -100%.
Your chart will now be divided into these 25% levels, allowing you to observe how the price either respects or breaks through them.
Again, this isn’t something “groundbreaking,” but simply a visual aid to identify levels where the price finds support/resistance or breaks through.
It helps me gain a broader perspective and determine whether my trade is moving in the right direction or if I should remain cautious.
[COG]MTF RZP Heatmap MTF RZP Heatmap (Range Zone Pulse)
What It Does
This indicator creates three visual heatmaps that show how current price movement compares to the average range of different timeframes. It helps traders:
Identify when price moves are overextended
Compare momentum across different timeframes
Spot potential reversal points
Understand the relative strength of price movements
How It Works
Range Calculation:
For each selected timeframe, it calculates an average range based on the specified number of periods
The range is measured from high to low for each period
A moving average of these ranges creates a dynamic "normal" range for that timeframe
Position Calculation:
Measures how far price has moved from the period's opening price
Compares this movement to the average range
Converts the movement into a percentage (-100% to +100%)
Visual Display:
Shows three vertical heatmaps, one for each timeframe
Colors graduate from bearish (typically red) to bullish (typically green)
A dot indicator shows the current position within each range
Percentage labels show exact movement relative to average range
Trading Applications
Trend Trading:
Multiple timeframes aligned in the same color suggest strong trend
Use larger timeframes (Daily/Weekly) for trend direction
Use smaller timeframes (4H/1H) for entry timing
Mean Reversion:
Extreme readings (near +100% or -100%) suggest overextended moves
Look for divergences between timeframes
Use when shorter timeframes show extremes but larger timeframes don't
Volatility Trading:
Compare current moves to average ranges
Identify when markets are more volatile than usual
Adjust position sizes based on range expansion/contraction
Multi-Timeframe Analysis:
Compare price action across different time horizons
Identify conflicting signals between timeframes
Use for timeframe alignment in trading decisions
Best Practices for Usage
Timeframe Selection:
Set the first timeframe to your trading timeframe
Set the second timeframe to your trend timeframe
Set the third timeframe to your entry timeframe
Range Period Settings:
Default is 5 periods
Increase for more stable readings
Decrease for more responsive readings
Color Interpretation:
Darker colors indicate stronger moves
Look for alignment across timeframes
Watch for extremes in any timeframe
Trading Setups:
Wait for alignment in multiple timeframes
Use extreme readings for counter-trend trades
Combine with other indicators for confirmation
[Daily] CRT with OHLC Reference Here’s a breakdown of Daily CRT:
1. What is Daily CRT?
Daily CRT focuses on the price action of daily candles, treating them as ranges that can be broken or manipulated.
The theory suggests that certain candles on the daily chart form ranges that act as key levels for price expansion or reversal.
These ranges are not just simple support and resistance levels but are tied to the concept of liquidity draws, where price is likely to move towards areas where liquidity is concentrated (e.g., highs, lows, or key levels).
2. Key Components of Daily CRT
Ranging Candle: The first candle in the CRT setup establishes the range. This candle’s high and low become the key levels to watch.
Manipulation Candle: The second candle often manipulates the range by either breaking it or testing it. This is where turtle soup (false breakouts) can occur.
Distribution Candle: The third candle is where the price either confirms the breakout or reverses, leading to a potential expansion in the opposite direction.
3. How to Use Daily CRT
Identify the Range: On the daily chart, identify a candle that forms a clear range (high and low). This is your Ranging Candle.
Watch for Manipulation: The next candle (Manipulation Candle) will often test or break the range. If it breaks the range but then reverses back inside, it’s a turtle soup (false breakout), indicating a potential reversal.
Trade the Distribution: The third candle (Distribution Candle) is where you look for confirmation. If the price breaks the range and continues in the same direction, it’s a true breakout. If it reverses, it’s a false breakout, and you can trade the reversal.
4. Daily CRT and Key Levels
Daily CRT works best when combined with higher timeframe key levels (e.g., weekly or monthly highs/lows, order blocks, fair value gaps, etc.).
The daily candle ranges often align with these key levels, providing confluence for potential reversals or expansions.
5. Time Alignment in Daily CRT
Time is a critical factor in CRT. The PDF emphasizes that the highest probability CRT setups occur at specific times of the day or week.
For example, the purge (breakout or reversal) of a daily CRT often happens during key trading sessions (e.g., London open, New York open).
6. Practical Steps for Daily CRT
Determine the Draw on Liquidity: Use higher timeframe analysis (weekly or monthly) to identify where price is likely to move (e.g., towards a key level or liquidity pool).
Identify the Daily Range: On the daily chart, mark the high and low of the ranging candle.
Watch for Manipulation: Observe the next candle to see if it breaks the range or tests it. Look for signs of turtle soup (false breakouts).
Trade the Distribution: Once the third candle confirms the direction (either breakout or reversal), enter the trade with proper risk management.
7. Example of Daily CRT
Ranging Candle: On Monday, a daily candle forms a range between 1.1000 (low) and 1.1100 (high).
Manipulation Candle: On Tuesday, the price breaks below 1.1000 but then reverses back above it, forming a turtle soup (false breakout).
Distribution Candle: On Wednesday, the price confirms the reversal by breaking above 1.1100, signaling a potential bullish expansion.
8. Integration with Other Concepts
Daily CRT should not be used in isolation. It works best when combined with other ICT concepts like:
Market Profiles: Understanding whether the market is in a ranging, expansion, or reversal phase.
Orderflow: Identifying bullish or bearish orderflow to confirm the direction of the CRT.
Key Levels: Using higher timeframe key levels to add confluence to the CRT setup.
Time: Aligning the CRT with key times (e.g., London open, New York open) for higher probability setups.
9. Risk Management in Daily CRT
Always use proper risk management when trading CRT setups. The PDF suggests risking no more than 0.5% of your account per trade.
Use stop-losses and position sizing to protect your capital, especially since CRT setups can involve false breakouts (turtle soups).
10. Summary
Daily CRT is a powerful tool for identifying key levels and potential price expansions or reversals on the daily chart.
It involves analyzing three key candles: the Ranging Candle, the Manipulation Candle, and the Distribution Candle.
The theory is most effective when combined with higher timeframe key levels, market profiles, orderflow, and proper time alignment.
By mastering Daily CRT, you can improve your ability to predict market movements and frame high-probability trades.
Moon Phases by Shailesh DesaiTrading Strategy Based on Lunar Phases
This custom trading indicator leverages the power of lunar cycles to provide unique market insights based on the four primary moon phases: New Moon, First Quarter, Full Moon, and Third Quarter. By aligning your trades with the natural rhythm of the moon, this strategy offers a different perspective to trading and can help enhance decision-making based on the cyclical nature of the market.
Key Features:
1. Moon Phase Identification:
o The indicator automatically identifies the current moon phase based on the user's selected timeframe and marks it on the chart.
o Each phase is visualized with a specific symbol and color to help traders easily recognize the current moon phase:
New Moon/Waxing Moon: Represented by a circle (colored as per user input).
First Quarter: Represented by a cross (colored as per user input).
Full Moon/Waning Moon: Represented by a circle (colored as per user input).
Third Quarter: Represented by a cross (colored as per user input).
2. Automatic Moon Phase Transition Detection:
o The indicator tracks and highlights when a phase change occurs. This feature ensures you are always aware of when the market moves from one phase to another.
o Moon phase changes are only visualized on the first bar of each new phase to avoid cluttering the chart.
3. Background Color Indicators:
o The background color dynamically changes according to the current moon phase, helping to reinforce the phase context for the trader. This feature makes it easy to see at a glance which phase the market is in.
4. Customizable Appearance:
o Customize the color of each moon phase to suit your preferences. Adjust the colors for the New Moon, First Quarter, Full Moon, and Third Quarter to align with your visual strategy.
5. Avoids Unsupported Timeframes:
o This indicator does not support monthly timeframes, ensuring that it operates smoothly only on timeframes that are compatible with the lunar cycle.
How to Use:
• The moon phases are thought to have an influence on human behavior and the market's psychology, making this indicator useful for traders who wish to integrate lunar cycles into their strategy.
• Traders can use the phase changes as an indicator of potential market momentum or reversal points. For example:
o New Moon may indicate the beginning of a new cycle, signaling a potential upward or downward move.
o Full Moon might suggest a peak or significant shift in market direction.
o First Quarter and Third Quarter phases may represent moments of consolidation or decision points.
Ideal for:
• Traders interested in cycle-based strategies or looking to experiment with new approaches.
• Those who believe in the influence of natural forces, including moon phases, on market movements.
• Technical analysts who want to add another layer of insights to their chart analysis.
Important Notes:
• The indicator uses precise astronomical calculations to identify the correct phase, ensuring accuracy.
• It’s important to understand that moon phase-based trading is not a standalone strategy but should ideally be combined with other technical analysis tools for maximum effectiveness.
Yearly Profit BackgroundDescription:
The Yearly Profit Background indicator is a powerful tool designed to help traders quickly visualize the profitability of each calendar year on their charts. By analyzing the annual performance of an asset, this indicator colors the background of each completed year green if the year was profitable (close > open) or red if it resulted in a loss (close < open). This visual representation allows traders to identify long-term trends and historical performance at a glance.
Key Features:
Annual Profit Calculation: Automatically calculates the yearly performance based on the opening price of January 1st and the closing price of December 31st.
Visual Background Coloring: Highlights each completed year with a green (profit) or red (loss) background, making it easy to spot trends.
Customizable Transparency: The background colors are set at 90% transparency, ensuring they don’t obstruct your chart analysis.
Optional Price Plots: Displays the annual opening (blue line) and closing (orange line) prices for additional context.
How to Use:
Add the indicator to your chart.
Observe the background colors for each completed year:
Green: The year was profitable.
Red: The year resulted in a loss.
Use the optional price plots to analyze annual opening and closing levels.
Ideal For:
Long-term investors analyzing historical performance.
Traders looking to identify multi-year trends.
Anyone interested in visualizing annual market cycles.
Why Use This Indicator?
Understanding the annual performance of an asset is crucial for making informed trading decisions. The Yearly Profit Background indicator simplifies this process by providing a clear, visual representation of yearly profitability, helping you spot patterns and trends that might otherwise go unnoticed.
AllDay Session TimesIndicator: Custom Session Times
This indicator is designed to assist traders by visualizing specific trading session times on the TradingView platform. It highlights two important trading sessions: the Day Session and the Evening Session, providing a visual aid that helps traders navigate the markets with greater accuracy.
Day Session Time Range:
Starts: 10:55 UTC+2
Ends: 13:30 UTC+2
Evening Session Time Range:
Starts: 16:55 UTC+2
Ends: 18:30 UTC+2
How It Works:
Colors and Backgrounds: This indicator uses background colors to differentiate the sessions. The green background appears during the Day Session, while the blue background indicates the Evening Session.
Lines: Session time ranges are also marked with clear lines on the chart, making it easier to identify the specific session periods.
Time Zone: The time zone is set to UTC+2 (Europe/Helsinki), but it can easily be adjusted to match your local time zone.
Why Use This Indicator?
This indicator is especially useful for traders who focus on specific market sessions. For example:
The Day Session might be when the market is more active, and trends are clearer.
The Evening Session could be a good time to observe market adjustments based on the events of the day and find potential trading opportunities.
By visualizing these specific time frames, the indicator helps reduce distractions and enables a more focused approach to trading.
Use Cases:
This indicator is ideal for:
Day traders and swing traders who want to focus on certain market sessions.
Technical analysts who prefer to visualize market behavior within specific time frames.
Strategy optimization and a more precise assessment of market conditions.
Features:
Visual session markers that help traders focus on key trading periods.
Easy customization of time zone and session time ranges.
Background colors and lines that improve chart readability and session tracking.
Made By AllDayEsa
Auto Wyckoff Schematic [by DanielM]This indicator is designed to automatically detect essential components of Wyckoff schematics. This tool aims to capture the critical phases of liquidity transfer from weak to strong hands, occurring before a trend reversal. While the Wyckoff method is a comprehensive and a very nuanced approach, every Wyckoff schematic is unique, making it impractical to implement all its components without undermining the detection of the pattern. Consequently, this script focuses on the essential elements critical to identifying these schematics effectively.
Key Features:
Swing Detection Sensitivity:
The sensitivity of swing detection is adjustable through the input parameter. This parameter controls the number of past bars analyzed to determine swing highs and lows, allowing users to fine-tune detection based on market volatility and timeframes.
Pattern Detection Logic:
Accumulation Schematic:
Detects consecutive lower swing lows, representing phases like Selling Climax (SC) and Spring, which often precede a trend reversal upward. After the final low is identified, a higher high is detected to confirm the upward trend initiation.
Labeled Key Points:
SC: Selling Climax, marking the beginning of the accumulation zone.
ST: Secondary Test during the schematic.
ST(b): Secondary Test in phase B.
Spring: The lowest point in the schematic, signaling a final liquidity grab.
SOS: Sign of Strength, confirming a bullish breakout.
The schematic is outlined visually with a rectangle to highlight the price range.
Distribution Schematic:
Detects consecutive higher swing highs, which indicate phases such as Buying Climax (BC) and UTAD, often leading to a bearish reversal. After the final high, a lower low is detected to confirm the downward trend initiation.
Labeled Key Points:
BC: Buying Climax, marking the beginning of the distribution zone.
ST: Secondary Test during the schematic.
UT: Upthrust.
UTAD: Upthrust After Distribution, signaling the final upward liquidity grab before a bearish trend.
SOW: Sign of Weakness, confirming a bearish breakout.
The schematic is visually outlined with a rectangle to highlight the price range.
Notes:
Simplification for Practicality: Due to the inherent complexity and variability of Wyckoff schematics, the indicator focuses only on the most essential features—liquidity transfer and key reversal signals.
Limitations: The tool does not account for all components of Wyckoff's method (e.g., minor phases or nuanced volume analysis) to maintain clarity and usability.
Unique Behavior: Every Wyckoff schematic is different, and this tool is designed to provide a simplified, generalized approach to detecting these unique patterns.
Time LinesWe can count time using a calendar
OR we can use our price charts
Here we are counting how much time has passed and it is expressed as a diagonal line on our time/price chart
Set the tool to any starting date, and it will begin to count
Set the "End Time" wherever you would like, the table in the right corner will give you the time between the two dates for the active options you've set
The table for now is only visible on a black or dark background colour
I might update at some point, but I like how simple the script is right now
This tool will probably generate some questions, I can't be sure I have an answer; but not a big deal - play around!
Buy/Sell Break and RetestThis script is a Pine Script indicator for TradingView titled **"Buy/Sell Break and Retest"**. Here's a description of its functionality:
### Purpose:
The script identifies potential **buy** and **sell entry levels** based on break-and-retest patterns in the market. It works by analyzing higher timeframe data (e.g., 1-hour) and marking entries on a lower timeframe (e.g., 1-minute).
### Key Features:
1. **Configurable Timeframes**:
- `Analysis Timeframe`: Used for identifying break-and-retest signals (default: 1-hour).
- `Entry Timeframe`: Used for marking and plotting entries (default: 1-minute).
2. **Buy and Sell Signals**:
- A **sell entry** is triggered when a bearish candle (close < open) is identified in the analysis timeframe.
- A **buy entry** is triggered when a bullish candle (close > open) is identified in the analysis timeframe.
3. **Retest Logic**:
- For sell signals: The retest is validated when the price breaks below the identified sell level.
- For buy signals: The retest is validated when the price breaks above the identified buy level.
4. **Visual Indicators**:
- Entry levels are marked with labels:
- **Buy Entry**: Green labels are placed at bullish candle opens.
- **Sell Entry**: Red labels are placed at bearish candle closes.
- Plots the levels for easy reference:
- **Sell Level**: Displayed as red circles on the chart.
- **Buy Level**: Displayed as green circles on the chart.
5. **Dynamic Updates**:
- Levels are cleared when invalidated by the price action.
### Use Case:
This indicator helps traders spot break-and-retest opportunities by:
- Allowing higher timeframe analysis to determine trend direction and key levels.
- Providing actionable buy and sell entry points on lower timeframes for precision.
Let me know if you'd like further clarification or improvements!