Hourly 20 EMA on 5m ChartThis indicator shows the hourly 20ema on any current time frame that is open on your charts
Indicadores y estrategias
Volume-MACD-RSI Integrated StrategyDescription:
This script integrates three well-known technical analysis tools—Volume, MACD, and RSI—into a single signal meant to help traders identify potential turning points under strong market conditions.
Concept Overview:
Volume Filter: We compare the current bar’s volume to a 20-period volume average and require it to exceed a specified multiplier. This ensures that signals occur only during periods of heightened market participation. The logic is that moves on low volume are less reliable, so we wait for increased activity to confirm potential trend changes.
MACD Momentum Shift:
We incorporate MACD crossovers to determine when momentum is changing direction. MACD is a popular momentum indicator that identifies shifts in trend by comparing short-term and long-term EMAs. A bullish crossover (MACD line crossing above the signal line) may suggest upward momentum is building, while a bearish crossunder can indicate momentum turning downward.
RSI Market Condition Check:
RSI helps us identify overbought or oversold conditions. By requiring that RSI be oversold on buy signals and overbought on sell signals, we attempt to pinpoint entries where price could be at an extreme. The idea is to position entries or exits at junctures where price may be due for a reversal.
How the Script Works Together:
Volume Confirmation: No signals fire unless there’s strong volume. This reduces false positives.
MACD Momentum Check: Once volume confirms market interest, MACD crossover events serve as a trigger to initiate consideration of a trade signal.
RSI Condition: Finally, RSI determines whether the market is at an extreme. This final layer helps ensure we only act on signals that have both momentum shift and a price at an extreme level, potentially increasing the reliability of signals.
Intended Use:
This script can help highlight potential reversal points or trend shifts during active market periods.
Traders can use these signals as a starting point for deeper analysis. For instance, a “BUY” arrow may prompt a trader to investigate the market context, confirm with other methods, or look for patterns that further support a long entry.
The script is best used on markets with reliable volume data, such as stocks or futures, and can be experimented with across different timeframes. Adjusting the RSI thresholds, MACD parameters, and volume multiplier can help tailor it to specific instruments or trading styles.
Chart Setup:
When adding this script to your chart, it should be the only indicator present, so you can clearly see the red “BUY” arrows and green “SELL” arrows at the candle closes where signals occur.
The chart should be kept clean and uncluttered for clarity. No other indicators are necessary since the logic is already integrated into this single script.
Sangana beta tableIdeal to use this indicator in Monthly timeframe.
This indicator shows three values on a table.
First column is stocks list from a particular sector(sector selection from settings)
Second column is beta of stock. Beta can be used to check how correlated(multiplied by how volatile) the stock is with respect to market S&P500 or Nifty500.
Third column is average percentage of a stock price movement in a month from low price to high price. This is just calculated on the price. If one enters at the low of that monthly candle and exits at the high of that monthly candle, they can expect to gain that much percentage on an average that is shown in this column.
How to use this indicator : Bigger returns on a stock is expected if it swings good amount of percentage from low to high on a regular basis. Either short term or long term, investing in the stocks which high average percentage from low to high, yields better returns. However downside also gives bigger losses if stock is going down. Stay in high volatile stocks, if one is sure of upside movement.
Sorting of beta column or percentage column can be chosen on settings. Sorting is always down high to low.
This indicator is tracks stocks in S&P500 or Nifty500.
Bitcoin All-Time High (ATH) Alert with Cooldown₿ Bitcoin All-Time High (ATH) Alert with Cooldown 🚀👩🚀
🔍 What it does:
This indicator tracks new all-time highs (ATHs) and alerts you when Bitcoin (or any asset) reaches a fresh ATH, while avoiding alert spam with a customizable cooldown period.
✨ Key Features
✅ Alerts for New ATHs: Never miss when Bitcoin makes history!
✅ Cooldown Period: Prevents multiple alerts within a short timeframe (customizable in settings).
✅ ATH Line on Chart: A clear, visual line marking the all-time high price.
✅ Manual Reset Option: Reset the ATH for testing or specific chart conditions.
⚙️ How to Use
Add the Indicator: Apply it to your chart like any other indicator. Ideally on a small time frame, the cooldown is 20 bars by default (adjustable) which gives 20 minutes on the 1 min chart.
Customize Settings:
- Cooldown Period (bars): Set the number of bars to wait before triggering another alert (e.g., 20 bars).
- Show All-Time High Line: Toggle to display or hide the ATH line visually.
- Reset All-Time High: Use this to manually reset the ATH to the current bar's high.
Create an Alert:
Open the "Alerts" menu.
Select the condition: "New All-Time High" .
Choose a trigger type:
Once Per Bar: For immediate alerts when a new ATH occurs.
Once Per Bar Close: To confirm the ATH at the end of each bar.
🛠️ Who is it for?
Traders and HODLers who want to stay on top of price action.
Anyone looking for clean and efficient ATH tracking with no redundant alerts
🚀 Never miss a new ATH again. Stay ahead of the market!
Options Series - Anchored VWAP Ribbon➤ AVWAP On different chart symbols:
⭐ Overview and Key Features:
Anchored VWAP Calculation:
The script implements the Anchored Volume Weighted Average Price (AVWAP), a tool used by professional traders to identify key price levels weighted by volume, starting from a specific timestamp (anchor point).
Bullish and Bearish Analysis:
It determines the dominance of bullish or bearish momentum based on the relationship between the close price and AVWAP levels across multiple time points.
Dynamic Visualization:
The background of the chart changes color based on overall bullish or bearish sentiment, making it easier to interpret market trends.
Multi-Time Anchors:
By defining multiple anchor points (e.g., 09:15, 09:20), the script calculates a series of AVWAP values for fine-grained intraday analysis.
Customizable Inputs:
Users can select the source price (e.g., hlc3), date, and time for AVWAP calculation.
⭐ How It Works and Functionality:
AVWAP Logic:
Uses the timestamp() function to establish a reference (anchor point).
Calculates the cumulative weighted price (price * volume) and cumulative volume from this anchor point.
The ratio of these sums gives the AVWAP, which updates dynamically with new bars.
Bullish and Bearish Signals:
Binary flags (1 or 0) are set for each time point depending on whether the closing price is above or below the AVWAP for that time.
Aggregates these flags into AVWAP_bull and AVWAP_bear to represent the overall market sentiment.
Decision Logic:
Determines final market conditions (bullish or bearish dominance) based on aggregated scores.
Visual feedback (background and bar colors) is applied accordingly.
⭐ Visualizations and User Experience:
Background Colors:
Green or red background highlights the overall sentiment (bullish or bearish), providing a quick market overview.
Bar Coloring:
Bars are color-coded based on bullish, bearish, or neutral conditions, making it easier to identify trends directly on the chart.
AVWAP Levels:
The calculated AVWAP values are plotted as colored lines for each anchor point, giving precise intraday levels of significance.
Bright colors (fluorescent green/red) are used for additional clarity when the close price is above or below these levels.
🎨 Settings and Customization:
Anchor Point:
Fully customizable anchor points allow users to set specific dates and times (e.g., 09:15 on December 13, 2024) for AVWAP calculations.
Source Price:
Users can choose from hlc3, close, or any other price source to calculate the AVWAP, tailoring the indicator to their strategy.
Visual Appearance:
The transparency, colors, and line styles are adjustable, enabling users to customize the chart to match their trading preferences.
Dynamic Signals:
The script accommodates numerous AVWAP levels, providing flexibility for scalpers and swing traders alike.
⭐ Uniqueness of the Concept:
Precise Intraday Analysis:
Unlike static VWAP, this script allows anchoring to specific times during the day, offering granular insights into market behavior.
Cumulative Sentiment Approach:
Aggregates signals across multiple time intervals, providing a comprehensive view of intraday momentum rather than a single-point reference.
Blending AVWAP with Visual Feedback:
Combines traditional AVWAP calculations with visually impactful features like background shading and bar coloring to enhance decision-making.
Scalability:
Supports adding multiple additional anchor points and customization for broader applicability in different market conditions.
🚀 Conclusion:
The Anchored VWAP Ribbon script is a powerful tool for traders seeking to analyze price behavior relative to volume-weighted levels anchored at specific times. It provides a visually intuitive way to assess intraday market sentiment, combining traditional technical indicators with customizable visualization features. The script’s flexibility makes it suitable for a variety of trading styles, from scalping to swing trading, while its unique cumulative sentiment logic sets it apart from conventional VWAP tools.
Titan Wings 3 (by Oberlunar)Titan Wings 3: Volatility and Trend Dynamics Tool
Description:
Titan Wings 3 is a comprehensive indicator designed to help traders navigate complex market conditions by integrating volatility analysis, advanced moving averages, and dynamic signal generation. This script is not a simple combination of public domain tools; it is a carefully engineered system that merges statistical insights with market structure analysis to deliver actionable signals.
Core Functionality:
The indicator uses log returns to calculate volatility, which is then conditioned by price behavior relative to multiple moving averages. Volatility bands are dynamically adjusted based on percentile ranks, standard deviations, and ATR values to provide traders with precise zones of market activity. These bands are visualized on the chart, highlighting areas of potential breakout or reversal.
Titan Wings 3 features three types of moving averages—Exponential (EMA), Simple (SMA), and Hull (HMA)—giving users flexibility to align the tool with their trading strategies. The script evaluates price action relative to these averages, identifying critical zones where market sentiment shifts.
In addition to trend-following metrics, the script dynamically generates labels to signal key trading opportunities. These signals are derived from normalized distance calculations between the price and selected moving averages, combined with a proprietary methodology for filtering noise and amplifying significant trends.
Why Titan Wings 3 Stands Out:
Originality: Titan Wings 3 is not a generic mashup of indicators. Its unique normalization technique for distance metrics, percentile-based volatility thresholds, and the use of Hull Moving Averages make it a sophisticated tool for identifying high-probability trades.
Actionable Insights: The script provides real-time labels and visual cues for both long and short opportunities, allowing traders to act decisively during key moments of price action.
Adaptability: The customizable parameters for moving average types, percentile thresholds, and volatility multipliers ensure that the tool can adapt to various market conditions and trading styles.
How It Works:
Volatility Bands: Percentile-based calculations and ATR/standard deviation multipliers are used to create adaptive upper and lower bands, highlighting areas of market expansion and contraction.
Dynamic Labels: Signals are generated based on normalized metrics that measure the price's relationship to key moving averages, providing a reliable framework for trend identification.
Visual Overlays: The script fills specific price zones with color-coded areas to indicate bullish or bearish conditions, enhancing the clarity of market structure.
How to Use It:
Adjust the moving average type and parameters to align with your trading style.
Use the volatility bands to identify breakouts or reversals.
Follow the real-time labels to confirm potential trade entries.
Pay attention to the visual overlays to quickly assess market sentiment.
Swing High/Low Pivots Strategy [LV]The Swing High/Low Pivots Strategy was developed as a counter-momentum trading tool.
The strategy is suitable for any market and the default values used in the input settings menu are set for Bitcoin (best on 15min). These values, expressed in minimum ticks (or pips if symbol is Forex) make this tool perfectly adaptable to every symbol and/or timeframe.
Check tooltips in the settings menu for more details about every user input.
STRTEGY ENTRY & EXIT MECHANISMS:
Trades Entry based on the detection of swing highs and lows for short and long entries respectively, validated by:
- Limit orders placed after each new pivot level confirmation
- Moving averages trend filter (if enabled)
- No active trade currently open
Trades Exit when the price reaches take-profit or stop-loss level as defined in the settings menu. A double entry/second take-profit level can be enabled for partial exits, with dynamic stop-loss adjustment for the remaining position.
Enhanced Trade Precision:
By limiting entries to confirmed swing high (HH, LH) or swing low (HL, LL) pivot points, the strategy ensures that trades occur at levels of significant price reversals. This precision reduces the likelihood of entering trades in the midst of a trend or during uncertain price action.
Risk Management Optimization:
The strategy incorporates clearly defined stop-loss (SL) and take-profit (TP) levels derived from the pivot points. This structured approach minimizes potential losses while locking in profits, which is critical for consistent performance in volatile markets.
Trend Filtering for Better Entry:
The use of a configurable moving average filter adds a layer of trend validation. This prevents entering trades against the dominant market trend, increasing the probability of success for each trade.
Avoidance of Noise:
The lookback period (length parameter) confirms pivots only after a set number of bars, effectively filtering out market noise and ensuring that entries are based on reliable, well-defined price movements.
Adaptability Across Markets:
The strategy is versatile and can be applied across different markets (Forex, stocks, crypto) due to its dynamic use of ticks and pips converters. It adapts seamlessly to varying price scales and asset types.
Dual Quantity Entries:
The original and optionnal double-entry mechanism allows traders to capture both short-term and extended profits by scaling out of positions. This adaptive approach caters to varying risk appetites and market conditions.
Clear Visualization:
The plotted pivot points, entry limits, SL, and TP levels provide visual clarity, making it easy for traders to track the strategy's behavior and make informed decisions.
Automated Execution with Alerts:
Integrated alerts for both entries and exits ensure timely actions without the need for constant market monitoring, enhancing efficiency. Configurable alert messages are suitable for API use.
Any feedback, comments, or suggestions for improvement are always welcome.
Hope you enjoy!
TTFX-V1Identify the Swing High & Low on desired timeframes,
Auto fibo level lines of 0.5 & 0.618 will follow the trend,
Ichimoku Cloud will drive you the present trend either bullish or bearish,
Fibonaci retracement will drive you the current support and resistance zone.
Gann Square Root calculation will support to indentify the with help of first 15mints high & low will derive the entire day support and resistance using Gann Square root method.
Sentiment Score Indicator V1.1Sentiment Score Indicator
The Sentiment Score Indicator attempts to gauge market sentiment by analyzing price action relative to Bollinger Bands and multiple Simple Moving Averages (SMAs). The indicator dynamically calculates a sentiment score ranging from -100 (Strong Bearish) to +100 (Strong Bullish) to provide insight into potential market direction and strength.
How the Sentiment Score is Calculated
The sentiment score is derived through a multi-step process that evaluates market conditions:
Bollinger Bands Analysis:
The script assesses the price’s position relative to the upper and lower Bollinger Bands.
When the price approaches or exceeds the upper band, it indicates potential overbought conditions and contributes to a bullish sentiment score.
Conversely, when the price nears or falls below the lower band, it signals potentially oversold conditions, contributing to a bearish sentiment score.
The magnitude of deviation from these bands influences the score, making it sensitive to volatility.
Moving Averages Evaluation:
The script incorporates multiple hardcoded SMAs to identify trends.
If the price is above these SMAs, the score is adjusted upward to reflect more bullish momentum.
If the price is below these SMAs, the score decreases to reflect more bearish momentum.
Each SMA provides a different perspective on short-term and long-term trends and are used in conjunction with determining the overall score at any given time.
Adaptive Scaling:
A scaling factor adjusts the sensitivity of the sentiment score based on market conditions.
This ensures the indicator remains responsive in both high-volatility and low-volatility environments.
Key Features
Dynamic Sentiment Score : Real-time sentiment ranging from Strong Bullish to Strong Bearish.
Combines Bollinger Bands and SMAs to assess overbought/oversold conditions and trend strength.
Color-Coded Labels: Intuitive color coding for quick interpretation of sentiment.
Works effectively on multiple time frames, including monthly, weekly, daily, intraday, and even down to 1-second chart data.
Toggle Option: Users can choose to display the sentiment score only on the last candle to reduce chart clutter.
Sentiment Score Ranges
Score Range Sentiment Color
+75 to +100 Strong Bullish Dark Green 🟩
+50 to +75 Bullish Green 🟩
+25 to +50 Medium Bullish Light Green 🟩
+10 to +25 Slightly Bullish Yellow-Green 🟨
-10 to +10 Neutral Yellow 🟨
-25 to -11 Slightly Bearish Orange-Yellow 🟧
-50 to -26 Medium Bearish Orange 🟧
-75 to -51 Bearish Dark Orange 🟥
-100 to -76 Strong Bearish Dark Red 🟥
How to Use
Add the Indicator to your preferred candlestick chart.
Interpret the Sentiment Labels displayed above or below each candlestick (you can toggle to only show the label on the last candle or all candles), this will be a numerical value accompanied by the range description (as per the above Sentiment Score Ranges).
Use the Color-Coded Scores to quickly gauge sentiment strength and direction.
Combine with Other Tools: For better analysis, use this indicator alongside other forms of technical analysis.
Disclaimer
This tool is for educational purposes only and does not constitute financial advice. Always conduct your own research and practice proper risk management.
[blackcat] L1 BS Line of Defense █ OVERVIEW
The Pine Script provided is an advanced technical indicator designed to generate reliable buy and sell signals by integrating momentum, moving averages, and price level analyses. It employs a custom weighted moving average (WMA) and exponential moving averages (EMAs) to compute key signals known as the "Buy/Sell Signal" and the "Short Line." These signals aim to pinpoint optimal entry and exit points for trades by evaluating their relationship with current market dynamics.
█ FEATURES
Key Components:
• Custom Weighted Moving Average ( WMA ): Provides enhanced flexibility compared to traditional moving averages.
• Exponential Moving Averages ( EMA ): Smooths the defense line and its short-term counterpart to filter out market noise.
• Momentum Indicators: Includes both short-term and long-term momentum adjusted via custom WMA and EMAs.
• Conditional Signal Generation: Signals are triggered based on precise crossovers and price conditions.
Logical Framework:
1 — Input Parameters:
No explicit user-defined inputs; defaults are used for internal calculations.
2 — Custom Functions:
• custom_wma : Calculates a custom WMA.
• calculate_buy_sell_signals : Generates buy and sell signals.
3 — Calculations:
• Momentum and Range Analysis over 9, 34, and 60-bar periods.
• Application of custom WMA and EMAs to smooth and refine data.
• Derivation of the "defense line" and "short_ema_defense."
4 — Plotting:
• Main signal lines ("Buy/Sell Signal" and "Short Line") are visualized.
• A horizontal zero line serves as a reference point.
█ HOW TO USE
To utilize this script effectively:
1 — Add the script to your TradingView chart.
2 — Observe the "Buy/Sell Signal" and "Short Line" relative to the zero line and each other.
3 — Look for crossovers and divergence patterns to identify potential trade opportunities.
4 — Combine the signals with additional technical indicators or fundamental analysis for better accuracy.
█ LIMITATIONS
While the script provides valuable insights, users should consider the following limitations:
• Default settings may not suit all markets or instruments; customization might be necessary.
• False signals can occur during volatile or ranging markets.
• Backtesting and optimization are recommended before live trading.
█ NOTES
For further enhancement and personalization:
• Introduce adjustable input parameters for WMA and EMA lengths and weights.
• Extend the script into a full-fledged trading strategy with entry and exit rules.
• Apply the script across multiple timeframes for comprehensive analysis.
• Incorporate risk management practices such as stop-loss and take-profit levels.
• Explore related Pine Script functions like security() for multi-timeframe analysis and [pine>alertcondition() for automated alerts.
Understanding core concepts like momentum, moving averages, and crossovers will aid in developing similar indicators or refining existing ones.
Daily ATR Levels - Vishal SubandhThe following script visualizes the ATR High and ATR Low levels based on the previous day’s closing price. The Average True Range (ATR) indicates how much a stock is likely to move—upward or downward—on a given day, providing insight into its intraday volatility. Additionally, the script calculates and displays the daily ATR as a percentage, with specific levels marked at 60% and 80%.
These percentage levels are plotted for both the high and low ranges, offering a framework to analyze potential price movements. In the context of a strong trend, prices often extend to the 80% or even 100% ATR level before showing signs of reversal. Such behavior is observed during pronounced uptrends or downtrends. Conversely, during weaker trends, price reversals may occur at the 60% ATR levels.
It is recommended to use this analysis in conjunction with other tools, such as support and resistance levels or demand and supply zones, for a more comprehensive approach to trading.
Dual Zigzag [Trendoscope®]🎲 Dual Zigzag indicator is built on recursive zigzag algorithm. It is very similar to other zigzag indicators published by us and other authors. However, the key point here is, the indicator draws zigzag on both price and any other plot based indicator on separate layouts.
Before we get into the indicator, here are some brief descriptions of the underlying concepts and key terminologies
🎯 Zigzag
Zigzag indicator breaks down price or any input series into a series of Pivot Highs and Pivot Lows alternating between each other. Zigzags though shows pivot high and lows, should not be used for buying at low and selling at high. The main application of zigzag indicator is for the visualisation of market structure and this can be used as basic building block for any pattern recognition algorithms.
🎯 Recursive Zigzag Algorithm
Recursive zigzag algorithm builds zigzag on multiple levels and each level of zigzag is based on the previous level pivots. The level zero zigzag is built on price. However, for level 1, instead of price level 0 zigzag pivots are used. Similarly for level 2, level 1 zigzag pivots are used as base.
🎲 Components Dual Zigzag Indicator
Here are the components of Dual zigzag indicator
Built in Oscillator - Indicator has built in oscillator options for plotting RSI (Relative Strength Index), MFI (Money Flow Index), cci (Commodity Channel Index) , CMO (Chande Momentum Oscillator), COG (Center of Gravity), and ROC (Rate of Change). Apart from the given built in oscillators, users can also use a custom external output as base. The oscillators are not printed on the price pane. But, printed on a separate indicator overlay.
Zigzag On Oscillator - Recursive zigzag is calculated and printed on the oscillator series. Each pivot high and pivot low also prints a label having the retracement ratios, and price levels at those points. Zigzag on the oscillator is also printed on the indicator overlay pane.
Zigzag on Price - Recursive zigzag calculated based on price and printed on the price pane. This is made possible by using force_overlay option present in the drawing objects. At each zigzag pivot levels, the label having price retracement ratios, and oscillator values are printed.
It is called dual zigzag because, the indicator calculates the zigzag on both price and oscillator series of values and prints them separately on different panes on the chart.
🎲 Indicator Settings
Settings include
Theme display settings to get the right colour combination to match the background.
Zigzag settings to be used for zigzag calculation and display
Oscillator settings to chose the oscillator to be used as base for 2nd zigzag
🎲 Applications
Useful in spotting divergences with both indicator and price having their own zigzag to highlight pivots
Spotting patterns in indicators/oscillators and correlate them with the patterns on price
🎲 Using External Input
If users want to use an external indicator such as OBV instead of the built in oscillators, then can do so by using the custom option.
Here is how this can be done.
Step1. Add both Dual Zigzag and the intended indicator (in this case OBV) on the chart. Notice that both OBV and Dual zigzag appear on different panes.
Step2. Edit the indicator settings of Dual zigzag and set custom indicator by selecting "custom" as oscillator name and then by setting the custom external indicator name and input.
Step 3. You would notice that the zigzag in Dual Zigzag indictor pane is already showing the zigzag pivots based on the OBV indicator and the price pivots display obv values at the pivot points. We can leave this as is.
Step 4. As an additional step, you can also merge the OBV pane and the Dual zigzag indicator pane into one by going into OBV settings and moving the indicator to above pane. Merge the scales so that there is no two scales on the same pane and the entire scale appear on the right.
At the end, you should see two panes - one with price and other with OBV and both having their zigzag plotted.
Auto Trend Line (ATL) IndicatorAuto Trend Line (ATL) Indicator
Description:
The Auto Trend Line indicator is an useful tool designed to automatically identify and draw key support and resistance levels on your chart. These levels are calculated based on historical price action, providing traders with a visual guide to potential market turning points. The indicator is highly customizable, allowing users to adjust parameters for history bars, factor values, and range values, ensuring adaptability to various trading strategies and timeframes.
Key Features:
• Automatic Support and Resistance Detection: Uses advanced algorithms to identify significant price levels.
• Customizable Line Styles and Colors: Personalize the appearance of support and resistance lines for clarity.
• Dynamic Updates: Adjusts lines in real-time based on price action.
• Extended Visibility: Draws lines that extend into the future, offering potential zones of interest for upcoming price movements.
Inputs:
• History Bars Count: Controls the range of historical data used in calculations.
• Factor and Range Values: Fine-tune the sensitivity of trend line detection.
• Line Styles and Colors: Choose between solid, dotted, or dashed lines for support and resistance, with customizable colors.
Use Case:
This indicator is ideal for traders who rely on support and resistance levels for decision-making in various markets, including stocks, forex, and cryptocurrencies. By automating the detection of these critical levels, the Auto Trend Line indicator saves time and eliminates subjective bias, empowering traders to focus on their strategies.
Explore the Auto Trend Line indicator to enhance your trading insights!
Developed by iSTAGs
Engulfing & Pin Bar DetectorOverview
The "Engulfing & Pin Bar Detector" script identifies two important candlestick patterns: Engulfing Candles and Pin Bars. These patterns are widely used in technical analysis to signal potential reversals or continuations in the market. The script provides visual signals directly on the chart to help traders make informed decisions.
Features Bullish Engulfing:
The second candle completely engulfs the body and shadows (high and low) of the previous bearish candle.
Signals a potential reversal to the upside.
Marked with a green background and a label below the candle.
Bearish Engulfing:
The second candle completely engulfs the body and shadows (high and low) of the previous bullish candle.
Signals a potential reversal to the downside.
Marked with a red background and a label above the candle.
Bullish Pin Bar:
A candle with a long lower shadow and a small body near the top of the range.
Indicates potential upward price action.
Marked with a blue background and an upward triangle below the candle.
Bearish Pin Bar:
A candle with a long upper shadow and a small body near the bottom of the range.
Indicates potential downward price action.
Marked with an orange background and a downward triangle above the candle.
Customizable Visual Alerts:
Background highlights and shape markers for quick and easy identification of patterns.
How to Use
Add the script to your TradingView chart.
Look for:
Green background: Bullish Engulfing.
Red background: Bearish Engulfing.
Blue background: Bullish Pin Bar.
Orange background: Bearish Pin Bar.
Combine with other indicators or price action techniques for confirmation.
Adjust your entry and exit strategies based on the patterns:
For Bullish Engulfing or Bullish Pin Bar, consider entering long positions or exiting shorts.
For Bearish Engulfing or Bearish Pin Bar, consider entering short positions or exiting longs.
Example Use Cases
Identify potential reversal zones.
Use as confirmation in trend-following or counter-trend strategies.
Enhance your analysis with clear visual signals.
Crypto Market Cap Momentum Analyzer (AiBitcoinTrend)The Crypto Market Cap Momentum Analyzer (AiBitcoinTrend) is a robust tool designed to uncover trading opportunities by blending market cap analysis and momentum dynamics. Inspired by research-backed quantitative strategies, this indicator helps traders identify trend-following and mean-reversion setups in the cryptocurrency market by evaluating recent performance and market cap size.
This indicator classifies cryptocurrencies into market cap quintiles and ranks them based on their 2-week momentum. It then suggests potential trades—whether to go long, anticipate reversals, or simply hold—based on the crypto's market cap group and momentum trends.
👽 How the Indicator Works
👾 Market Cap Classification
The indicator categorizes cryptocurrencies into one of five market cap groups based on user-defined inputs:
Large Cap: Highest market cap tier
Upper Mid Cap: Second highest group
Mid Cap: Middle-tier market caps
Lower Mid Cap: Slightly below the mid-tier
Small Cap: Lowest market cap tier
This classification dynamically adjusts based on the provided market cap data, ensuring that you’re always working with a representative market structure.
👾 Momentum Calculation
By default, the indicator uses a 2-week momentum measure (e.g., a 14-day lookback when set to daily). It compares a cryptocurrency’s current price to its price 14 bars ago, thereby quantifying its short-term performance. Users can adjust the momentum period and rebalance period to capture shorter or longer-term trends depending on their trading style.
👾 Dynamic Ranking and Trade Suggestions
After assigning cryptos to size quintiles, the indicator sorts them by their momentum within each quintile. This two-step process results in:
Long Trade: For smaller market cap groups (Small, Lower Mid, Mid Cap) that have low (bottom-quintile) momentum, anticipating a trend continuation or breakout.
Reversal Trade: For the largest market cap group (Large Cap) that shows low momentum, expecting a mean-reversion back to equilibrium.
Hold: In scenarios where the coin’s momentum doesn’t present a strong contrarian or trend-following signal.
👽 Applications
👾 Trend-Following in Smaller Caps: Identify small or mid-cap cryptos with low momentum that might be poised for a breakout or sustained trend.
👾 Mean-Reversion in Large Caps: Pinpoint large-cap cryptocurrencies experiencing a temporary lull in performance, potentially ripe for a rebound.
👽 Why It Works in Crypto
The cryptocurrency market is heavily driven by retail investor sentiment and volatility. Research shows that:
Small-Cap Cryptos: Tend to experience higher volatility and speculative trends, making them ideal for momentum trades.
Large-Cap Cryptos: Exhibit more predictable behavior, making them suitable for mean-reversion strategies when momentum is low.
This indicator captures these dynamics to give traders a strategic edge in identifying both momentum and reversal opportunities.
👽 Indicator Settings
👾 Rebalance Period: The frequency at which momentum and trade suggestions are recalculated (Daily, Weekly, Monthly).
Shorter Periods (Daily): Fast updates, suitable for short-term trades, but more noise.
Longer Periods (Weekly/Monthly): Smoother signals, ideal for swing trading and more stable trends.
👾 Momentum Period: The lookback period for momentum calculation (default is 14 bars).
Shorter Periods: More responsive but prone to noise.
Longer Periods : Reflects broader trends, reducing sensitivity to short-term fluctuations.
Disclaimer: This information is for entertainment purposes only and does not constitute financial advice. Please consult with a qualified financial advisor before making any investment decisions.
BRT Cluster VolumeTitle and Purpose
BRT Cluster Volume is a powerful market analysis tool designed to identify key support and resistance levels, cluster volumes, and breakout signals. This script is highly beneficial for traders who aim to gain deeper insights into market trends and pinpoint zones of interest for buyers and sellers.
Key Features
1. Support and Resistance Levels:
- The script automatically detects chart extremums by analyzing a specified number of bars on the left and right to form levels. This approach effectively identifies local highs and lows.
- The uniqueness of this implementation lies in its dynamic data processing. For each extremum, the "channel width" is calculated, allowing insignificant levels to be filtered out based on a user-defined minimum width. This method eliminates noise and ensures focus on critical levels.
- Extremum lines can be extended to the right (when enabled), allowing traders to track current price movements relative to historical levels.
2. Cluster Volume:
- The cluster analysis is based on lower timeframe data, providing precise identification of key zones of market participant activity. The script dynamically requests close prices and volumes from lower timeframes, calculates the average volume, and identifies levels where volumes exceed a defined threshold.
- The visualization of cluster volumes is unique: volumes exceeding the threshold are displayed as candles with customizable colors and markers. These indicators help traders identify zones of significant interest.
- Cluster volume is only displayed when it interacts with support or resistance levels, ensuring that the visualization remains precise and relevant for market analysis.
3. Breakout Signals:
- The script evaluates "breakout strength" for each breakout of support or resistance levels by comparing the current price with the level. This helps filter false breakouts and focus on significant price movements.
- Traders can select the source for breakout signals (close price or high/low), offering flexibility for various trading styles and strategies.
- By incorporating the concept of "maximum breakout strength," the script highlights only meaningful breakouts, ignoring minor fluctuations.
4. Integration of Trading Sessions:
- Extremum levels for major trading sessions (Asia, Europe, USA) are identified and labeled on the chart. This allows traders to see when significant price levels were formed during the day.
- The script uses timestamps to automatically detect session times, ensuring accuracy and minimizing manual adjustments.
5. Dynamic Data Updates:
- The script dynamically updates support and resistance levels in real time as new data becomes available. This feature is crucial for traders working in fast-moving markets.
- Outdated information (such as obsolete levels) is automatically removed to keep the chart clean and focused on relevant data.
6. Visualization of Activity Zones:
- Trend direction is visualized using color-coded candles based on cluster volumes. For instance, candles with volumes exceeding the average are highlighted with specific colors, helping traders quickly identify areas of heightened activity.
- The unique aspect of this visualization is that cluster volumes appear only in zones where they interact with breakout levels, providing an intuitive and streamlined presentation of critical data.
Usage
- Support and Resistance: Adjust the "Left Bars" and "Right Bars" settings to determine extremums. Use the "Channel Min Width" setting to filter out insignificant levels.
- Cluster Volume: Customize the analysis period and volume threshold to identify high-activity zones. Enable breakout clusters to see how volumes interact with breakouts.
- Session Extremums: Highlight significant levels for Asia, Europe, and US trading sessions to gain insights into market dynamics across different time zones.
- Breakout Signals: Configure the breakout strength and source (close or high/low) for precise signal detection.
Parameter Details
1. Support & Resistance:
- `Left Bars` / `Right Bars`: Number of bars to consider for determining extremums.
- `# of Lines`: Maximum number of support/resistance lines to display.
- `Channel Min Width`: Minimum channel width to filter insignificant levels.
2. Breakout:
- `Show Breakouts`: Toggle breakout signal display.
- `Max breakout strength`: Maximum strength for valid breakouts.
- `Breakout source`: Data source for breakouts (close or high/low).
3. Cluster Volume:
- `Lookback`: Number of bars to analyze for cluster volumes.
- `Threshold`: Volume threshold (percentage above the average).
- `Cluster Volume Timeframe`: Timeframe for cluster volume analysis.
- `Breakout Cluster`: Display cluster volumes only for breakout-related zones.
4. Visual Settings:
- `Extend extremum lines to the right`: Extend support/resistance lines to the right.
- `Show ASIA/EU/US Session Extremums`: Display extremums for trading sessions.
Features and Benefits
- The script provides flexible parameter customization, allowing it to adapt to different trading styles and timeframes.
- The visualization is designed to be clean and intuitive, ensuring users can easily interpret the data.
- Suitable for all timeframes, making it ideal for both intraday and long-term market analysis.
Limitations
- The script is not suitable for analysis on non-standard chart types (e.g., Heikin Ashi, Renko, Kagi).
- To ensure accurate performance, realistic data for commission and slippage should be used.
Warnings
- The script relies on historical data for calculations, which may cause discrepancies in real-time conditions.
- Users should fully understand the functionality of cluster analysis and breakout signals before using the script in live trading.
This script combines advanced data processing logic, dynamic level adjustments, and unique visualization approaches, making it an indispensable tool for market analysis and trading decision-making.
4-Year Cycles [jpkxyz]Overview of the Script
I wanted to write a script that encompasses the wide-spread macro fund manager investment thesis: "Crypto is simply and expression of macro." A thesis pioneered by the likes of Raoul Pal (EXPAAM) , Andreesen Horowitz (A16Z) , Joe McCann (ASYMETRIC) , Bob Loukas and many more.
Cycle Theory Background:
The 2007-2008 financial crisis transformed central bank monetary policy by introducing:
- Quantitative Easing (QE): Creating money to buy assets and inject liquidity
- Coordinated global monetary interventions
Proactive 4-year economic cycles characterised by:
- Expansionary periods (low rates, money creation)
- Followed by contraction/normalisation
Central banks now deliberately manipulate liquidity, interest rates, and asset prices to control economic cycles, using monetary policy as a precision tool rather than a blunt instrument.
Cycle Characteristics (based on historical cycles):
- A cycle has 4 seasons (Spring, Summer, Fall, Winter)
- Each season with a cycle lasts 365 days
- The Cycle Low happens towards the beginning of the Spring Season of each new cycle
- This is followed by a run up throughout the Spring and Summer Season
- The Cycle High happens towards the end of the Fall Season
- The Winter season is characterised by price corrections until establishing a new floor in the Spring of the next cycle
Key Functionalities
1. Cycle Tracking
- Divides market history into 4-year cycles (Spring, Summer, Fall, Winter)
- Starts tracking cycles from 2011 (first cycle after the 2007 crisis cycle)
- Identifies and marks cycle boundaries
2. Visualization
- Colors background based on current cycle season
- Draws lines connecting:
- Cycle highs and lows
- Inter-cycle price movements
- Adds labels showing:
- Percentage gains/losses between cycles
- Number of days between significant points
3. Customization Options
- Allows users to customize:
- Colors for each season
- Line and label colors
- Label size
- Background opacity
Detailed Mechanism
Cycle Identification
- Uses a modulo calculation to determine the current season in the 4-year cycle
- Preset boundary years include 2015, 2019, 2023, 2027
- Automatically tracks and marks cycle transitions
Price Analysis
- Tracks highest and lowest prices within each cycle
- Calculates percentage changes:
- Intra-cycle (low to high)
- Inter-cycle (previous high to current high/low)
Visualization Techniques
- Background color changes based on current cycle season
- Dashed and solid lines connect significant price points
- Labels provide quantitative insights about price movements
Unique Aspects
1. Predictive Cycle Framework: Provides a structured way to view market movements beyond traditional technical analysis
2. Seasonal Color Coding: Intuitive visual representation of market cycle stages
3. Comprehensive Price Tracking: Captures both intra-cycle and inter-cycle price dynamics
4. Highly Customizable: Users can adjust visual parameters to suit their preferences
Potential Use Cases
- Technical analysis for long-term investors
- Identifying market cycle patterns
- Understanding historical price movement rhythms
- Educational tool for market cycle theory
Limitations/Considerations
- Based on a predefined 4-year cycle model (Liquidity Cycles)
- Historic Cycle Structures are not an indication for future performance
- May not perfectly represent all market behavior
- Requires visual interpretation
This script is particularly interesting for investors who believe in cyclical market theories and want a visual, data-driven representation of market stages.
Mean Reversion IndicatorSMA with Deviation and Z-Score Indicator
Overview:
This indicator combines the Simple Moving Average (SMA) with statistical measures of price deviation to identify potential buy and sell signals based on mean reversion principles. It calculates the Z-Score, which quantifies how far the current price is from its moving average in terms of standard deviations, helping traders spot when an asset might be overbought or oversold.
Key Features:
SMA Calculation: Uses a user-defined period to compute a Simple Moving Average, providing a baseline for price movement.
Z-Score: Measures the number of standard deviations the current price is from the SMA. This is crucial for identifying extreme price movements.
Formula: Z-Score = (Current Price - SMA) / Standard Deviation
Signal Generation:
Buy Signal: Generated when the Z-Score falls below a predefined threshold, suggesting the price is significantly below its mean and potentially undervalued.
Sell Signal: Triggered when the Z-Score exceeds another threshold, indicating the price is significantly above its mean and possibly overvalued.
Visual Indicators:
SMA Line: Plotted in blue on the chart for easy reference.
Z-Score Line: Available but hidden by default, can be shown if needed for deeper analysis.
Buy/Sell Signals: Represented by green up-arrows for buy signals and red down-arrows for sell signals.
Background Color: Changes to green or red subtly to indicate buy or sell zones based on Z-Score thresholds.
Z-Score Label: Provides the numerical Z-Score for each bar, aiding in precise decision-making.
Customizable Parameters:
SMA Length: Adjust the period over which the SMA is calculated.
Lookback Period: Set the number of periods for calculating the standard deviation and Z-Score.
Buy/Sell Z-Scores: Thresholds for generating buy and sell signals can be tailored to your strategy or market conditions. FX:EURUSD FX:EURUSD
Usage Tips:
This indicator is best used in conjunction with other forms of analysis for confirmation. Mean reversion does not always hold in trending markets.
Adjust the Z-Score thresholds based on asset volatility for more or less frequent signals.
Backtest with historical data to optimize settings for your specific trading approach.
Note: While this indicator can help identify potential trading opportunities based on statistical anomalies, it does not guarantee success and should be part of a broader trading strategy that includes risk management and market context understanding.
NSE BSE Option Chain with Greeks [Bluechip Algos]This indicator provides option chain information along with greeks of Delta, Vega, Theta, Gamma and Rho.
Make sure inputs are correctly entered; Symbol, reference spot price of ATM, Expiry date and Distance between strikes
Here’s a brief explanation of the logic used for calculating the Greeks in your Pine Script:
Implied Volatility (IV):
Implied Volatility is found using Black-Scholes formula by comparing the market price of the option to its theoretical price. An iterative process is used to adjust the volatility value until the theoretical price matches the market price, effectively reversing the pricing model to deduce the market’s expectation of volatility.
Delta:
Delta is calculated by estimating the probability of the option expiring in the money. This probability is derived using statistical methods based on price movement expectations. It is computed using the cumulative normal distribution function normDist
Gamma:
Gamma is calculated by evaluating how Delta changes when the underlying price moves slightly, giving a sense of the stability of Delta across different price levels. It is computed based on the derivative of Delta concerning the spot price
Theta:
Theta calculates the time decay of an option's value. It estimates how much the option's price will reduce as it gets closer to expiry, assuming all other factors remain constant. For this, the time left to expiry is broken into daily increments to assess the decay rate.
Vega:
Vega is determined by analyzing how the option's price would react to changes in market volatility. It uses the relationship between volatility and option pricing to measure this sensitivity, helping traders understand the impact of fluctuating volatility levels.
Rho:
Rho is calculated by estimating how much the option's price would change for a small increase in the risk-free interest rate. The calculation involves using Black-Scholes to assess how interest rate changes alter the discounted value of the option's payoff.
All computations depend on parameters like the spot price S, strike price X, time to expiry t, risk-free rate r, and volatility σ.
High Volume BarsThis indicator highlights the highest volume bullish and bearish bars within a specified lookback period. It provides a visual representation of significant volume activity, which can be useful for identifying potential trend reversals or continuations.
Key Features:
Customizable lookback period to find highest volume bars
Lime-colored bars for bullish (up) volume
Fuchsia-colored bars for bearish (down) volume
Filled areas between high and low of highest volume bars
Easy-to-read visual cues for volume analysis
The indicator scans the specified number of previous bars to identify the highest volume bullish and bearish bars. It then colors these bars and draws filled areas to make them stand out on the chart. This can help traders quickly spot areas of significant buying or selling pressure.
Use this indicator to:
Identify potential support and resistance levels
Spot volume-based trend reversals
Confirm breakouts or breakdowns
Enhance your volume analysis in conjunction with price action
Adjust the lookback period to fine-tune the indicator's sensitivity to recent volume activity. A longer lookback period will identify more significant volume events, while a shorter period will be more responsive to recent changes.
Note: This indicator is best used in combination with other technical analysis tools and should not be relied upon solely for making trading decisions.
Quantum ChronoRenko Dynamics Edge - Traditional### **Quantum ChronoRenko Dynamics Edge - Traditional**
**Description:**
The **Quantum ChronoRenko Dynamics Edge - Traditional** is an advanced Renko-based indicator designed for precision trading. It leverages the power of Renko charts to detect price movements, highlight critical trading signals, and dynamically track profit and risk levels. This indicator is built with modern trading strategies in mind, offering robust tools for all traders, from beginners to professionals.
**Key Features:**
1. **Renko-Based Signal Generation**:
- Detects **Buy Signals** when the price closes above the Renko high level.
- Detects **Sell Signals** when the price closes below the Renko low level.
- Ensures signals are non-repainting and confirmed on bar closures.
2. **Take Profit (TP) and Stop Loss (SL) Tracking**:
- Automatically calculates and plots TP and SL levels for every signal.
- Dynamic levels are displayed directly on the chart for better decision-making.
3. **Advanced Signal Management**:
- Prevents duplicate signals within the same Renko range.
- Resets signal conditions when a new Renko range is formed.
4. **Visual Enhancements**:
- Renko high and low levels are plotted with customizable colors and styles.
- TP and SL levels are marked with distinct cross shapes for clarity.
- Optional fill between Renko levels to highlight price ranges.
5. **Real-Time Alerts**:
- Generates alerts for Buy and Sell signals when a candle closes above or below the Renko levels.
- Alerts are designed to help traders react quickly to opportunities.
6. **Comprehensive Statistics**:
- Tracks the number of Buy/Sell signals.
- Calculates the number of TP and SL hits for each signal type.
- Displays detailed percentages and totals in an easy-to-read table.
**Key Benefits**:
- **Non-Repainting Logic**: Ensures stable and reliable signals based on confirmed price movements.
- **Customizability**: Flexible settings for Renko brick size, TP/SL values, and visual enhancements.
- **Professional-Level Insights**: Provides detailed statistics for tracking strategy performance.
**Use Cases**:
- Perfect for intraday and swing traders who rely on Renko charts for clear trend signals.
- Suitable for identifying key breakout opportunities and managing trades with precise TP/SL levels.
Example Usage:
For daily scalping, set the following parameters:
Brick Size: 3
Time Frame: 10 Minutes
This setup provides clean trend signals and dynamic TP/SL tracking for short-term trades.
**Why "Traditional"?**
This version uses the **Traditional Renko method**, ensuring consistent price-based calculations that align with professional trading strategies.
---
**Disclaimer**:
This indicator is a tool to aid trading decisions but does not guarantee profits. Always use proper risk management.
---
CandleCandle: A Comprehensive Pine Script™ Library for Candlestick Analysis
Overview
The Candle library, developed in Pine Script™, provides traders and developers with a robust toolkit for analyzing candlestick data. By offering easy access to fundamental candlestick components like open, high, low, and close prices, along with advanced derived metrics such as body-to-wick ratios, percentage calculations, and volatility analysis, this library enables detailed insights into market behavior.
This library is ideal for creating custom indicators, trading strategies, and backtesting frameworks, making it a powerful resource for any Pine Script™ developer.
Key Features
1. Core Candlestick Data
• Open : Access the opening price of the current candle.
• High : Retrieve the highest price.
• Low : Retrieve the lowest price.
• Close : Access the closing price.
2. Candle Metrics
• Full Size : Calculates the total range of the candle (high - low).
• Body Size : Computes the size of the candle’s body (open - close).
• Wick Size : Provides the combined size of the upper and lower wicks.
3. Wick and Body Ratios
• Upper Wick Size and Lower Wick Size .
• Body-to-Wick Ratio and Wick-to-Body Ratio .
4. Percentage Calculations
• Upper Wick Percentage : The proportion of the upper wick size relative to the full candle size.
• Lower Wick Percentage : The proportion of the lower wick size relative to the full candle size.
• Body Percentage and Wick Percentage relative to the candle’s range.
5. Candle Direction Analysis
• Determines if a candle is "Bullish" or "Bearish" based on its closing and opening prices.
6. Price Metrics
• Average Price : The mean of the open, high, low, and close prices.
• Midpoint Price : The midpoint between the high and low prices.
7. Volatility Measurement
• Calculates the standard deviation of the OHLC prices, providing a volatility metric for the current candle.
Code Architecture
Example Functionality
The library employs a modular structure, exporting various functions that can be used independently or in combination. For instance:
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © DevArjun
//@version=6
indicator("Candle Data", overlay = true)
import DevArjun/Candle/1 as Candle
// Body Size %
bodySize = Candle.BodySize()
// Determining the candle direction
candleDirection = Candle.CandleDirection()
// Calculating the volatility of the current candle
volatility = Candle.Volatility()
// Plotting the metrics (for demonstration)
plot(bodySize, title="Body Size", color=color.blue)
label.new(bar_index, high, candleDirection, style=label.style_circle)
Scalability
The modularity of the Candle library allows seamless integration into more extensive trading systems. Functions can be mixed and matched to suit specific analytical or strategic needs.
Use Cases
Trading Strategies
Developers can use the library to create strategies based on candle properties such as:
• Identifying long-bodied candles (momentum signals).
• Detecting wicks as potential reversal zones.
• Filtering trades based on candle ratios.
Visualization
Plotting components like body size, wick size, and directional labels helps visualize market behavior and identify patterns.
Backtesting
By incorporating volatility and ratio metrics, traders can design and test strategies on historical data, ensuring robust performance before live trading.
Education
This library is a great tool for teaching candlestick analysis and how each component contributes to market behavior.
Portfolio Highlights
Project Objective
To create a Pine Script™ library that simplifies candlestick analysis by providing comprehensive metrics and insights, empowering traders and developers with advanced tools for market analysis.
Development Challenges and Solutions
• Challenge : Achieving high precision in calculating ratios and percentages.
• Solution : Implemented robust mathematical operations and safeguarded against division-by-zero errors.
• Challenge : Ensuring modularity and scalability.
• Solution : Designed functions as independent modules, allowing flexible integration.
Impact
• Efficiency : The library reduces the time required to calculate complex candlestick metrics.
• Versatility : Supports various trading styles, from scalping to swing trading.
• Clarity : Clean code and detailed documentation ensure usability for developers of all levels.
Conclusion
The Candle library exemplifies the power of Pine Script™ in simplifying and enhancing candlestick analysis. By including this project in your portfolio, you showcase your expertise in:
• Financial data analysis.
• Pine Script™ development.
• Creating tools that solve real-world trading challenges.
This project demonstrates both technical proficiency and a keen understanding of market analysis, making it an excellent addition to your professional portfolio.
Library "Candle"
A comprehensive library to access and analyze the basic components of a candlestick, including open, high, low, close prices, and various derived metrics such as full size, body size, wick sizes, ratios, percentages, and additional analysis metrics.
Open()
Open
@description Returns the opening price of the current candle.
Returns: float - The opening price of the current candle.
High()
High
@description Returns the highest price of the current candle.
Returns: float - The highest price of the current candle.
Low()
Low
@description Returns the lowest price of the current candle.
Returns: float - The lowest price of the current candle.
Close()
Close
@description Returns the closing price of the current candle.
Returns: float - The closing price of the current candle.
FullSize()
FullSize
@description Returns the full size (range) of the current candle (high - low).
Returns: float - The full size of the current candle.
BodySize()
BodySize
@description Returns the body size of the current candle (open - close).
Returns: float - The body size of the current candle.
WickSize()
WickSize
@description Returns the size of the wicks of the current candle (full size - body size).
Returns: float - The size of the wicks of the current candle.
UpperWickSize()
UpperWickSize
@description Returns the size of the upper wick of the current candle.
Returns: float - The size of the upper wick of the current candle.
LowerWickSize()
LowerWickSize
@description Returns the size of the lower wick of the current candle.
Returns: float - The size of the lower wick of the current candle.
BodyToWickRatio()
BodyToWickRatio
@description Returns the ratio of the body size to the wick size of the current candle.
Returns: float - The body to wick ratio of the current candle.
UpperWickPercentage()
UpperWickPercentage
@description Returns the percentage of the upper wick size relative to the full size of the current candle.
Returns: float - The percentage of the upper wick size relative to the full size of the current candle.
LowerWickPercentage()
LowerWickPercentage
@description Returns the percentage of the lower wick size relative to the full size of the current candle.
Returns: float - The percentage of the lower wick size relative to the full size of the current candle.
WickToBodyRatio()
WickToBodyRatio
@description Returns the ratio of the wick size to the body size of the current candle.
Returns: float - The wick to body ratio of the current candle.
BodyPercentage()
BodyPercentage
@description Returns the percentage of the body size relative to the full size of the current candle.
Returns: float - The percentage of the body size relative to the full size of the current candle.
WickPercentage()
WickPercentage
@description Returns the percentage of the wick size relative to the full size of the current candle.
Returns: float - The percentage of the wick size relative to the full size of the current candle.
CandleDirection()
CandleDirection
@description Returns the direction of the current candle.
Returns: string - "Bullish" if the candle is bullish, "Bearish" if the candle is bearish.
AveragePrice()
AveragePrice
@description Returns the average price of the current candle (mean of open, high, low, and close).
Returns: float - The average price of the current candle.
MidpointPrice()
MidpointPrice
@description Returns the midpoint price of the current candle (mean of high and low).
Returns: float - The midpoint price of the current candle.
Volatility()
Volatility
@description Returns the standard deviation of the OHLC prices of the current candle.
Returns: float - The volatility of the current candle.
Earnings Gap UpsBased on research conducted by John Pocorobba and Jason Thompson, the Earnings Gap Ups Indicator is designed to identify three types of earnings gaps, key levels, and the "alpha window"—a period when stocks often outperform following a gap. These gaps are frequently observed in high-performing stocks.
What is an Earnings Gap?
An earnings gap occurs when a stock's price makes a significant jump, after the company reports earnings signifying the street (institutions) were caught off guard.
The three different types of gaps are as follows: [/b
PEG (Power Earnings Gap)
Price gain of 10% or more
Volume is greater than 200% above the 50-day average
EPS surprise of at least 20%
Monster Gap
Price gain of 20% or more
Volume is greater than 300% above the 50-day average
No fundamental requirement
Monster Peg
Price Gain of 20% or more
Volume is greater than 300% above the 50-day average
EPS surprise of at least 20%
Key Levels and the Alpha Window
In addition to spotting these gaps, the indicator marks key levels on the chart and extends them through the alpha window, which represents the time period when the stock tends to outperform after the gap.
Key levels include:
High volume close: The closing price on a day with unusually high trading volume
High volume close minus 5%: A potential support level below the high volume close
Gap day high: The highest price reached on the gap day
Gap day low: The lowest price reached on the gap day
By understanding and tracking these gaps and levels, traders can map out a playbook for trading earnings gaps.