3 Candle AlertThis is a test for integration using a webhook. I am publishing it so I can share it. Ultimately, this is what we want to do:
1. Trade Entry Rules:
Wait until at least the 3rd bar of the day (15 minutes after market open) before entering the first trade.
Order of Priority for Entry:
Look for two consecutive volume bars of the same color (the second bar must have higher volume than the first).
Look for a “price push” beyond the high or low of the day (as determined in the first 15 minutes).
2. Trading Direction:
If the volume bars are RED, I take a Long Position.
If the volume bars are GREEN, I take a Short Position.
Indicateurs et stratégies
Quasimodo PatternWhat is a Quasimodo Pattern?
A Quasimodo Pattern is a chart pattern traders look for to predict possible price reversals in the market:
- Bullish Quasimodo: Signals a possible price increase (buying opportunity).
- Bearish Quasimodo: Signals a potential price decrease (selling opportunity).
How the Script Works
1. Bullish Quasimodo:
- Checks if the price pattern shows signs of a potential upward movement:
- The current low price is higher than a previous price point (suggesting fair value gap).
- The previous candle closed higher than it opened (bullish candle).
- The candle before that closed lower than it opened (bearish candle).
2. Bearish Quasimodo:
- Looks for signs of a downward movement:
- The current high price is lower than a previous price point (suggesting fair value gap).
- The previous candle closed lower than it opened (bearish candle).
- The candle before that closed higher than it opened (bullish candle).
Visual Indicators
- Yellow Candles: Indicate a bullish Quasimodo pattern.
- Pink Candles: Indicate a bearish Quasimodo pattern.
Alerts
If a Quasimodo pattern is detected, the script sends an alert:
- The alert says: "A Quasimodo Pattern has appeared!"
Purpose
Traders can use this tool to quickly spot potential trend changes without manually analyzing every chart, saving time and improving decision-making for trades.
It Screams When Crypto BottomsGet ready to ride the crypto rollercoaster with your new favourite tool for catching Bitcoin at its juiciest, most oversold moments.
This isn’t just another boring indicator — it screams when it’s time to load your bags and get ready for the ride back up!
Expect it to scream just once or twice per cycle at the very bottom, so you know exactly when the party starts!
Why You'll Love It:
Crypto-Exclusive Magic: It does not really matter what chart you are on; this indicator only bothers about the original and realised market cap of BTC. We all know the rest will follow.
Big Picture Focus: Designed for daily. No noisy intraday drama — just pure, clear signals.
Screaming Alerts: When the signal hits, it’s like a neon sign screaming, “Crypto Bottomed!"
Think of this indicator as your backstage pass to the crypto world’s most dramatic moments. It’s not subtle — it’s bold, loud, and ready to help you time the market like a pro.
P.S.: Use it only on a daily chart. Don’t even try it on shorter timeframes — it won’t scream, and you’ll miss the show! 🙀
GANN Level (Salil Sir)GANN Level Indicator Description
This Pine Script calculates and plots Gann Levels based on a user-defined price input. It creates horizontal lines at key support and resistance levels derived from the input price, applying Gann's theory of market structure. The levels are dynamically calculated and squared for enhanced precision.
Key Features:
Manual Price Input:
The user inputs a round off of square root of base price (Manual_Input), which serves as the foundation for calculations.
Support and Resistance Levels:
Six resistance levels (R1 to R6) and six support levels (S1 to S6) are calculated by incrementing or decrementing the base price in steps of 0.25.
Squared Levels:
Each level is squared (level^2) to align with Gann's mathematical principles.
Visualization:
All levels, including the base price squared (GANN), are plotted as horizontal dotted lines:
Black Line: Base price squared (Gann Level).
Green Lines: Resistance levels.
Red Lines: Support levels.
Purpose:
The indicator helps traders identify potential support and resistance zones based on Gann's methodology, providing a mathematical framework for decision-making.
Usage:
Adjust the Manual Price in the settings to the desired value.
Observe the plotted levels for key support and resistance zones on the chart.
Use these levels to make informed trading decisions or to validate other indicators.
Rolling Angled Volume Profile [Trendoscope®]🎲 Volume Profile Indicators
🎯Traditional Volume Profile
Volume profile indicators visually represent the distribution of volume across price levels. These indicators typically operate on horizontal price levels, making them effective in identifying supply and demand zones in ranging markets. However, they are less useful in trending markets where price movements follow a slope.
🎯The Need for Angled Volume Profiles
Just as support and resistance levels differ from trendlines, volume profile indicators require an equivalent method to account for volume distribution along a sloped trajectory. This would enable more accurate volume analysis in trending markets.
We identified the need of Angled Volume profile and have already published few indicators that implements the concept.
Angled Volume Profile calculates volume distribution along a slope. Users interact with the indicator by selecting the starting point, after which the volume profile is calculated for the selected trajectory.
Volume Forks is another tool that extends angled volume profile analysis, aligning volume profiles along the trajectory of pitchforks.
🎲 Rolling Volume Profile Indicator
The Rolling Volume Profile offers a new approach to angled volume profile calculations, addressing some limitations of earlier implementations:
🎯 Rolling Calculation
The volume profile is calculated for the last N bars of the instrument
The slope of the profile lines is determined by the closing prices of the starting and ending bars
Profiles are drawn in the direction of price movement between the start and end bars.
🎯 Dynamic Updates
As new bars are added, the calculations are updated, and the profile is redrawn based on the latest data.
This dynamic behavior earns it the name "Rolling Volume Profile."
🎯 Advantages Over Earlier Versions
Unlimited Profile Lines : Unlike previous implementations limited to 500 profile lines, this indicator uses polyline objects, overcoming the restriction.
Live Updates : Previous angled volume profile tools lacked real-time updates when new bars appeared. This limitation is resolved in the Rolling Volume Profile Indicator.
The Rolling Volume Profile provides an efficient and scalable solution for analyzing volume in trending markets.
🎯 Indicator Settings
Simple settings include few customisable options
Xmaster Formula Indicator [TradingFinder] No Repaint Strategies🔵 Introduction
The Xmaster Formula Indicator is a powerful tool for forex trading, combining multiple technical indicators to provide insights into market trends, support and resistance levels, and price reversals. Developed in the early 2010s, it is widely valued for generating reliable buy and sell signals.
Key components include Exponential Moving Averages (EMA) for identifying trends and price momentum, and MACD (Moving Average Convergence Divergence) for analyzing trend strength and direction.
The Stochastic Oscillator and RSI (Relative Strength Index) enhance accuracy by signaling potential price reversals. Additionally, the Parabolic SAR assists in identifying trend reversals and managing risk.
By integrating these tools, the Xmaster Formula Indicator provides a comprehensive view of market conditions, empowering traders to make informed decisions.
🔵 How to Use
The Xmaster Formula Indicator offers two distinct methods for generating signals: Standard Mode and Advance Mode. Each method caters to different trading styles and strategies.
Standard Mode :
In Standard Mode, the indicator uses normalized moving average data to generate buy and sell signals. The difference between the short-term (10-period) and long-term (38-period) EMAs is calculated and normalized to a 0-100 scale.
Buy Signal : When the normalized value crosses above 55, accompanied by the trend line turning green, a buy signal is generated.
Sell Signal : When the normalized value crosses below 45, and the trend line turns red, a sell signal is issued.
This mode is simple, making it ideal for traders looking for straightforward signals without the need for additional confirmations.
Advance Mode :
Advance Mode combines multiple technical indicators to provide more detailed and robust signals.
This method analyzes trends by incorporating :
🟣 MACD
Buy Signal : When the MACD histogram bars are positive.
Sell Signal : When the MACD histogram bars are negative.
🟣 RSI
Buy Signal : When RSI is below 30, indicating oversold conditions.
Sell Signal : When RSI is above 70, suggesting overbought conditions.
🟣 Stochastic Oscillator
Buy Signal : When Stochastic is below 20.
Sell Signal : When Stochastic is above 80.
🟣 Parabolic SAR
Buy Signal : When SAR is below the price.
Sell Signal : When SAR is above the price.
A signal is generated in Advance Mode only when all these indicators align :
Buy Signal : All conditions point to a bullish trend.
Sell Signal : All conditions indicate a bearish trend.
This mode is more comprehensive and suitable for traders who prefer deeper analysis and stronger confirmations before executing trades.
🔵 Settings
Method :
Choose between "Standard" and "Advance" modes to determine how signals are generated. In Standard Mode, signals are based on normalized moving average data, while in Advance Mode, signals rely on the combination of MACD, RSI, Stochastic Oscillator, and Parabolic SAR.
Moving Average Settings :
Short Length : The period for the short-term EMA (default is 10).
Mid Length : The period for the medium-term EMA (default is 20).
Long Length : The period for the long-term EMA (default is 38).
MACD Settings :
Fast Length : The period for the fast EMA in the MACD calculation (default is 12).
Slow Length : The period for the slow EMA in the MACD calculation (default is 26).
Signal Line : The signal line period for MACD (default is 9).
Stochastic Settings :
Length : The period for the Stochastic Oscillator (default is 14).
RSI Settings :
Length : The period for the Relative Strength Index (default is 14).
🔵 Conclusion
The Xmaster Formula Indicator is a versatile and reliable tool for forex traders, offering both simplicity and advanced analysis through its Standard and Advance modes. In Standard Mode, traders benefit from straightforward signals based on normalized moving average data, making it ideal for quick decision-making.
Advance Mode, on the other hand, provides a more detailed analysis by combining multiple indicators like MACD, RSI, Stochastic Oscillator, and Parabolic SAR, delivering stronger confirmations for critical market decisions.
While the Xmaster Formula Indicator offers valuable insights and reliable signals, it is important to use it alongside proper risk management and other analytical methods. By leveraging its capabilities effectively, traders can enhance their trading strategies and achieve better outcomes in the dynamic forex market.
VWAP Fibonacci Bands (Zeiierman)█ Overview
The VWAP Fibonacci Bands is a sophisticated yet user-friendly indicator designed to assist traders in visualizing market trends, volatility, and potential support/resistance levels. Developed by Zeiierman, this tool integrates the MIDAS (Market Interpretation Data Analysis System) methodology with Standard Deviation Bands and user-defined Fibonacci levels to provide a comprehensive market analysis framework.
This indicator is built for traders who want a dynamic and customizable approach to understanding market movements, offering features that adapt to varying market conditions. Whether you're a scalper, swing trader, or long-term investor.
█ How It Works
⚪ Anchor Point System
The indicator begins its calculations based on an anchor point, which can be set to:
A specific date for historical analysis or alignment with significant market events.
A timeframe-based reset, dynamically restarting calculations at the beginning of each selected period (e.g., daily, weekly, or monthly).
This dual-anchor method ensures flexibility, allowing the indicator to align with various trading strategies.
⚪ MIDAS Calculation
The MIDAS calculation is central to this indicator. It uses cumulative price and volume data to compute a volume-weighted average price (VWAP), offering a trendline that reflects the true value weighted by trading activity.
⚪ Standard Deviation Bands
The upper and lower bands are calculated using the standard deviation of price movements around the MIDAS line.
⚪ Fibonacci Levels
User-defined Fibonacci ratios are used to plot additional support and resistance levels between the bands. These levels provide visual cues for potential price reversals or trend continuations.
█ How to Use
⚪ Trend Identification
Uptrend: The price remains above the MIDAS line.
Downtrend: The price stays below the MIDAS line and aligns with the lower bands.
⚪ Support and Resistance
The upper and lower bands act as support and resistance levels.
Fibonacci levels provide intermediate zones for potential price reversals.
⚪ Volatility Analysis
Wider bands indicate periods of high volatility.
Narrower bands suggest low-volatility conditions, often preceding breakouts.
⚪ Overbought/Oversold Conditions
Look for the price beyond the upper or lower bands to identify extreme conditions.
█ Settings
Set Anchor Method
Anchor Method: Choose between Timeframe or Date to define the starting point of calculations.
Anchor Timeframe: For Timeframe mode, specify the interval (e.g., Daily, Weekly).
Anchor Date: For Date mode, set the exact starting date for historical alignment.
Set Std Dev Multiplier
Controls the width of the bands:
Higher values widen the bands, filtering out minor fluctuations.
Lower values tighten the bands for more responsive analysis.
Set Fibonacci Levels
Define custom Fibonacci ratios (e.g., 0.236, 0.382) to plot intermediate levels between the bands.
█ Tips for Fine-Tuning
⚪ For Trend Trading:
Use higher Std Dev Multipliers to focus on long-term trends and avoid noise. Adjust Anchor Timeframe to Weekly or Monthly for broader trend analysis.
⚪ For Reversal Trading:
Tighten the bands with a lower Std Dev Multiplier.
Use shorter anchor timeframes for intraday reversals (e.g., Hourly).
⚪ For Volatile Markets:
Increase the Std Dev Multiplier to accommodate wider price swings.
⚪ For Quiet Markets:
Decrease the Std Dev Multiplier to highlight smaller fluctuations.
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
momentum indicatorThe Rational Quadratic Smoother uses the Rational Quadratic Kernel to create a non-repainting, adaptive smoothing of price data. This method provides a balance between long-term trends and short-term movements by adjusting the weight of distant data points using a kernel function. Traders can use this indicator to:
Smooth price data for better trend identification.
Filter out noise without introducing lag.
Combine it with other indicators for advanced strategies.
Key Features:
Adjustable Lookback Period: Controls the range of data points considered.
Relative Weighting: Fine-tunes the influence of long-term vs. short-term data.
Customizable smoothing to fit different trading styles (scalping, swing trading, etc.).
Multi Timeframe Market Formation [LuxAlgo]The Multi Timeframe Market Formation tool allows traders to analyze up to 6 different timeframes simultaneously to discover their current formation, S/R levels and their degree of synchronization with the current chart timeframe. Multi timeframe analysis made easy.
🔶 USAGE
By default, the tool displays the chart's timeframe formation plus up to 5 other formations on timeframes higher than the one in the chart.
When the chart formation is synchronized with any enabled timeframe formation, the tool displays labels and a trailing channel, it uses a gradient by default, so the more timeframes are synchronized, the more visible the labels and the trailing channel are.
All timeframes enabled in the settings panel must be higher than the chart timeframe, otherwise the tool will display an error message.
🔹 Formations
A formation is a market structure defined by a lower and an upper boundary (also known as support & resistance).
Each formation has a different symbol and color to identify it at a glance.
It helps traders to know the current market behavior and the tool displays up to 5 of them.
BULLISH (green ▲): higher high and higher low
BEARISH (red ▼): lower high and lower low
CONTRACTION (orange ◀): lower high and higher low
EXPANSION (blue ▶): higher high and lower low
SIDEWAYS (yellow ◀): Any that does not fit with the others
🔹 Multi Timeframe Formations
The tool displays up to 6 different timeframe formations, the chart timeframe plus 5 more configurable from the settings panel.
Each of them has an upper and lower limit, a timeframe, a color and an icon.
If a bound level is shared by more than one formation, the timeframes and symbols are displayed on the same line.
These are significant levels shared by different timeframes and traders need to be aware of them.
🔹 Sync With Chart Timeframe
If the current formation on the chart timeframe is in sync with any of the timeframes enabled in the settings panel, the tool will display this on the chart.
The more timeframes are in sync, the more they are visible, providing a clear visual representation of the common market behavior on multiple timeframes at the same time.
🔶 SETTINGS
Formation size: Size of market formations on the chart timeframe
🔹 Timeframes
TF1 to TF5: Activate/deactivate timeframe, set size of market formation and activate/deactivate high and low levels
🔹 Style
Show Labels: Enable/Disable Timeframe Sync Labels
Transparency Gradient: Enable/Disable Transparency Gradient
Show Trailing Channel | Multiplier: Enable/Disable Trailing Channel and set multiplier
Color for each formation
Enhanced SPX and BTC Overlay with EMASPX-BTC Momentum Gauge and EMA Cross Indicator
Thorough Analysis:
• Combined Overlay (Green/Red Line):
o Function: Plots a wide line over the price chart, representing a composite of SPX and BTC dynamics adjusted by volume data.
o Color Coding:
Green: Indicates bullish conditions when the combined value exceeds its 10-period SMA and Bitcoin volume increases.
Red: Signals bearish conditions when the combined value drops below its 10-period SMA and Bitcoin volume decreases.
o Line Characteristics:
Width: Set at 8 for high visibility.
Transparency: 86% for both colors to overlay without obscuring candlesticks.
Scaling: Uses a factor of 0.02446 to amplify movements, making trend changes more noticeable.
• Continuous Bright Red and Green Lines:
o 20-period EMA of Current Ticker (Red):
Purpose: Acts as a medium-term trend indicator, smoothing price data to reflect the asset's general direction over time.
Color: Bright red for easy identification.
Transparency: 60% to keep it visible but not overpowering.
o 5-period EMA of BTC (Green):
Purpose: Provides insights into short-term Bitcoin momentum, capturing rapid changes in market sentiment.
Color: Bright green to distinguish from the red EMA.
Transparency: 30% for high visibility against price movements.
Detailed Analysis of the EMA Cross:
• Crossing Points:
o Bullish Crossover:
Occurs when the 5-period BTC EMA (green) moves above the 20-period EMA of the current ticker (red).
Suggests that Bitcoin's short-term momentum is gaining strength relative to the asset's medium-term trend, potentially signaling an upcoming uptrend or strengthening of an existing one.
o Bearish Crossover:
When the green line falls below the red, it indicates that Bitcoin's immediate momentum is weakening compared to the asset's medium-term trend, which might precede a downtrend or confirm one.
• Early Trade Signals:
o Entry/Exit Points:
These crossovers can guide traders in making timely decisions to enter or exit trades, especially when corroborated by the combined overlay's color.
o Confirmation:
EMA crossovers can confirm trends indicated by the combined overlay. For example, a bullish crossover with a green combined line could validate a buying opportunity.
o Volatility Insights:
The rapid shifts in Bitcoin's 5-period EMA highlight potential volatility spikes, offering an additional layer of market analysis, particularly useful in volatile markets.
• Strategic Use:
o Multi-Market Insight: The script integrates data from both traditional (SPX) and crypto (BTC) markets, allowing for a more comprehensive analysis of market conditions.
o Decision-Making: Provides traders with visual cues for market sentiment, trend direction, and potential reversals, enhancing strategic trading decisions.
o Trend Confirmation: The combination of EMA crossovers and the overlay's color changes offers a multi-faceted approach to trend confirmation or divergence.
In Summary:
• This script merges elements of traditional stock market analysis with cryptocurrency dynamics, utilizing color changes, line thickness, and EMA crossovers to visually communicate market conditions, offering traders a robust tool for analyzing and acting on market movements.
Dominan BreakPlots an arrow what dominan got break. Dominan is a bar which high is higher than high of the next x bars and low is lower than low of the next x bars. So, next x bars are completely in range of that dominan bar.
ATR-Based Suitability CheckerPurpose:
This indicator helps traders identify the most suitable timeframe for trading by comparing fees to market volatility (ATR). Instead of filtering out specific assets or strategies, it focuses on finding optimal trading conditions for the selected timeframe. It is designed to adapt dynamically, ensuring that traders can align their approach with the current market environment.
Key Features:
Dynamic ATR Analysis: Measures volatility using the Average True Range (ATR) and evaluates how fees impact potential profitability across timeframes.
Fee-to-ATR Ratio: Calculates the proportion of fees to ATR, highlighting conditions where fees are too large relative to price movements.
Visual Feedback: **Red Background:** Indicates unsuitable trading conditions where fees dominate. **Green Background:** Highlights suitable conditions for trading efficiency. Markers provide quick visual identification of suitability.
Custom Transparency: Enables users to adjust the background’s transparency for better chart visibility.
How to Use:
Timeframe Optimization: When volatility rises, price movements become larger, making shorter timeframes more suitable for trading. Conversely, during periods of low volatility, longer timeframes are preferable to avoid overtrading within a narrow price range.
Spot & Leverage Trading: For spot trading, this tool identifies conditions where fees (e.g., 0.25%-0.3%) might excessively impact profitability. For instance, if ATR is comparable to fees, the trading environment may not be ideal. In leveraged trading, the indicator helps assess whether the current volatility supports your chosen leverage level, ensuring that leverage does not amplify undue risks.
Efficiency Focus: The indicator emphasizes finding a balance between market conditions and your trading strategy. Not all timeframes need to be "suitable" at all times; instead, it highlights the best opportunities based on current market dynamics. Utilize the suitability ratio across different timeframes to guide and adjust your trading strategies effectively.
Input Parameters:
ATR Length: Defines the period for ATR calculation (default: 14).
Fee Percentage (%): Trading fee as a percentage of the closing price (default: 0.1%).
Unsuitable Threshold (% of 1 ATR): Sets the maximum acceptable fee-to-ATR ratio for suitable conditions (default: 20%).
Background Transparency (0-100): Adjusts the opacity of the background highlight (default: 80).
Who Should Use This:
This tool is ideal for traders seeking to align their strategy with market conditions by finding the most suitable timeframe. It applies to both spot and leveraged markets, helping optimize efficiency while managing fees and volatility.
Notes:
The ATR-Based Suitability Checker is a supplementary tool. Combine it with other forms of analysis for comprehensive decision-making.
Regularly adjust the parameters to match your trading preferences and market conditions.
HTF RangeThis Pine Script indicator, HTF Range , is a tool designed to help traders visualize predefined ranges (highs and lows) and analyze price action within those levels. It's particularly useful for identifying key levels and trends for a set of pre-configured assets, such as cryptocurrencies, stocks, and forex pairs.
Key Features:
1. Predefined Symbol Ranges:
Stores a list of assets (tickers) with corresponding high, low, and trend information in an array.
Automatically matches the current symbol on the chart (syminfo.ticker) to fetch and display relevant range data:
High Range: The upper price level.
Low Range: The lower price level.
Trend: Indicates whether the trend is "up" or "down."
Example tickers: BTCUSDT, ETHUSDT, GBPUSD, NVDA, and more.
2. Range Visualizations:
Extremeties: Draws dashed horizontal lines for the high and low levels.
Half-Level: Marks the midpoint of the range with a dashed yellow line.
Upper and Lower Quarters: Highlights upper and lower portions of the range using shaded boxes with customizable extensions:
3. Configurable Inputs:
Enable/Disable Levels: Toggles for extremeties, half-levels, and quarter-levels.
Table Info: Option to display a table summarizing the range data (symbol, high, low, and trend).
4. Dynamic Calculations:
Automatically calculates the difference between the high and low (diff) for precise range subdivisions.
Dynamically adjusts visuals based on the trend (up or down) for better relevance to the market condition.
5. Table Display:
Provides a detailed summary of the asset's range and trend in the top-right corner of the chart:
Symbol ticker.
High and low levels.
Overall trend direction.
Use Case:
This indicator is ideal for traders who:
Trade multiple assets and want a quick overview of key price ranges.
Analyze price movements relative to predefined support and resistance zones.
Use range-based strategies for trend following, breakout trading, or reversals.
Consistency Rule CalculatorThis script, titled "Consistency Rule Calculator" is designed for use on the TradingView platform. It allows traders to input specific values related to their account, daily highest profit, and a consistency rule (as a decimal).
The script then calculates the "Amount Needed to Withdraw" based on the user's input. This value is calculated using the formula:
Amount Needed to Withdraw = (Daily Highest Profit/Consistency Rule )+ Account Type
Each prop firm has its own consistency rule. Follow their rule, and you will be second to payout!
Additionally, it displays the input values and the calculated amount in a customizable table on the chart. The table is formatted with colors for clarity, and it provides a motivational quote about successful trading. Plus, user can adjust the table's position on the screen.
Volume Weighted Moving Average (TechnoBlooms)The Volume Weighted Moving Average Oscillator (VWMO) is a custom technical indicator designed to measure market momentum while accounting for volume. It helps traders assess whether price movements are supported by strong or weak trading volumes. The VWMO provides insights into potential trends by comparing current momentum with historical averages.
Indicator Overview:
The VWMO is based on a combination of price and volume data, highlighting the relationship between these two components to generate a clear oscillation value. The oscillator displays dynamic insights into market strength, capturing price directionality and volume alignment.
Key Features:
1. Dynamic Visualization of Momentum:
o The oscillator displays positive and negative momentum by analyzing the relationship between price movements and trading volume over a specified period.
o Positive momentum typically represents a bullish market, while negative momentum reflects bearish conditions.
2. Volume-Weighted Analysis:
o Volume is incorporated to give an adjusted price perspective, where price movements on high-volume days have more influence on the resulting oscillator values.
3. Trend Confirmation via EMA:
o An Exponential Moving Average (EMA) of the oscillator is plotted to smooth the raw oscillator values and provide trend confirmation.
o The EMA is essential for identifying whether the oscillator is in an upward or downward trend. It also serves as a support for evaluating when momentum might reverse.
4. Visual Indicators and Color Coding:
o The indicator uses varying color intensities to differentiate between strong and weak momentum.
o Bullish and bearish momentum is visually reflected by colors, offering at-a-glance guidance on potential trade opportunities.
5. Overbought and Oversold Thresholds:
o Horizontal lines at predefined levels (e.g., +100 and -100) help to define overbought and oversold areas, which assist in identifying overextended price movements that may signal reversals.
6. Scalability & Adaptability:
o The indicator allows for adjustment of the period, EMA length, and other key parameters to tailor its usage according to different asset classes or timeframe preferences.
Big Candle Identifier with RSI Divergence and Advanced Stops1. Strategy Objective
The main goal of this strategy is to:
Identify significant price momentum (big candles).
Enter trades at opportune moments based on market signals (candlestick patterns and RSI divergence).
Limit initial risk through a fixed stop loss.
Maximize profits by using a trailing stop that activates only after the trade moves a specified distance in the profitable direction.
2. Components of the Strategy
A. Big Candle Identification
The strategy identifies big candles as indicators of strong momentum.
A big candle is defined as:
The body (absolute difference between close and open) of the current candle (body0) is larger than the bodies of the last five candles.
The candle is:
Bullish Big Candle: If close > open.
Bearish Big Candle: If open > close.
Purpose: Big candles signal potential continuation or reversal of trends, serving as the primary entry trigger.
B. RSI Divergence
Relative Strength Index (RSI): A momentum oscillator used to detect overbought/oversold conditions and divergence.
Fast RSI: A 5-period RSI, which is more sensitive to short-term price movements.
Slow RSI: A 14-period RSI, which smoothens fluctuations over a longer timeframe.
Divergence: The difference between the fast and slow RSIs.
Positive divergence (divergence > 0): Bullish momentum.
Negative divergence (divergence < 0): Bearish momentum.
Visualization: The divergence is plotted on the chart, helping traders confirm momentum shifts.
C. Stop Loss
Initial Stop Loss:
When entering a trade, an immediate stop loss of 200 points is applied.
This stop loss ensures the maximum risk is capped at a predefined level.
Implementation:
Long Trades: Stop loss is set below the entry price at low - 200 points.
Short Trades: Stop loss is set above the entry price at high + 200 points.
Purpose:
Prevents significant losses if the price moves against the trade immediately after entry.
D. Trailing Stop
The trailing stop is a dynamic risk management tool that adjusts with price movements to lock in profits. Here’s how it works:
Activation Condition:
The trailing stop only starts trailing when the trade moves 200 ticks (profit) in the right direction:
Long Position: close - entry_price >= 200 ticks.
Short Position: entry_price - close >= 200 ticks.
Trailing Logic:
Once activated, the trailing stop:
For Long Positions: Trails behind the price by 150 ticks (trail_stop = close - 150 ticks).
For Short Positions: Trails above the price by 150 ticks (trail_stop = close + 150 ticks).
Exit Condition:
The trade exits automatically if the price touches the trailing stop level.
Purpose:
Ensures profits are locked in as the trade progresses while still allowing room for price fluctuations.
E. Trade Entry Logic
Long Entry:
Triggered when a bullish big candle is identified.
Stop loss is set at low - 200 points.
Short Entry:
Triggered when a bearish big candle is identified.
Stop loss is set at high + 200 points.
F. Trade Exit Logic
Trailing Stop: Automatically exits the trade if the price touches the trailing stop level.
Fixed Stop Loss: Exits the trade if the price hits the predefined stop loss level.
G. 21 EMA
The strategy includes a 21-period Exponential Moving Average (EMA), which acts as a trend filter.
EMA helps visualize the overall market direction:
Price above EMA: Indicates an uptrend.
Price below EMA: Indicates a downtrend.
H. Visualization
Big Candle Identification:
The open and close prices of big candles are plotted for easy reference.
Trailing Stop:
Plotted on the chart to visualize its progression during the trade.
Green Line: Indicates the trailing stop for long positions.
Red Line: Indicates the trailing stop for short positions.
RSI Divergence:
Positive divergence is shown in green.
Negative divergence is shown in red.
3. Key Parameters
trail_start_ticks: The number of ticks required before the trailing stop activates (default: 200 ticks).
trail_distance_ticks: The distance between the trailing stop and price once the trailing stop starts (default: 150 ticks).
initial_stop_loss_points: The fixed stop loss in points applied at entry (default: 200 points).
tick_size: Automatically calculates the minimum tick size for the trading instrument.
4. Workflow of the Strategy
Step 1: Entry Signal
The strategy identifies a big candle (bullish or bearish).
If conditions are met, a trade is entered with a fixed stop loss.
Step 2: Initial Risk Management
The trade starts with an initial stop loss of 200 points.
Step 3: Trailing Stop Activation
If the trade moves 200 ticks in the profitable direction:
The trailing stop is activated and follows the price at a distance of 150 ticks.
Step 4: Exit the Trade
The trade is exited if:
The price hits the trailing stop.
The price hits the initial stop loss.
5. Advantages of the Strategy
Risk Management:
The fixed stop loss ensures that losses are capped.
The trailing stop locks in profits after the trade becomes profitable.
Momentum-Based Entries:
The strategy uses big candles as entry triggers, which often indicate strong price momentum.
Divergence Confirmation:
RSI divergence helps validate momentum and avoid false signals.
Dynamic Profit Protection:
The trailing stop adjusts dynamically, allowing the trade to capture larger moves while protecting gains.
6. Ideal Market Conditions
This strategy performs best in:
Trending Markets:
Big candles and momentum signals are more effective in capturing directional moves.
High Volatility:
Larger price swings improve the probability of reaching the trailing stop activation level (200 ticks).
Internals Elite NYSE [Beta]Overview:
This indicator is designed to provide traders with a quick overview of key market internals and metrics in a single, easy-to-read table displayed directly on the chart. It incorporates a variety of metrics that help gauge market sentiment, momentum, and overall market conditions.
The table dynamically updates in real-time and uses color-coding to highlight significant changes or thresholds, allowing traders to quickly interpret the data and make informed trading decisions.
Features:
Market Internals:
TICK: Measures the difference between the number of stocks ticking up versus those ticking down on the NYSE. Green or red background indicates if it crosses a user-defined threshold.
Advance/Decline (ADD): Shows the net number of advancing versus declining stocks on the NYSE. Color-coded to show positive, negative, or neutral conditions.
Volatility Metrics:
VIX Change (%): Displays the percentage change in the Volatility Index (VIX), a key gauge of market fear or complacency. Color-coded for direction.
VIX Price: Displays the current VIX price with thresholds to indicate low, medium, or high volatility.
Other Market Metrics:
DXY Change (%): Percentage change in the US Dollar Index (DXY), indicating dollar strength or weakness.
VWAP Deviation (%): Percentage of stocks above VWAP (Volume Weighted Average Price), helping traders assess intraday buying and selling pressure.
Asset-Specific Metrics:
BTCUSD Change (%): Percentage change in Bitcoin (BTC) price, useful for monitoring cryptocurrency sentiment.
SPY Change (%): Percentage change in the S&P 500 ETF (SPY), a proxy for the overall stock market.
Current Ticker Change (%): Percentage change in the currently selected ticker on the chart.
US10Y Change (%): Percentage change in the yield of the 10-Year US Treasury Note (TVC:US10Y), an important macroeconomic indicator.
Customizable Appearance:
Adjustable text size to suit your chart layout.
User-defined thresholds for key metrics (e.g., TICK, ADD, VWAP, VIX).
Dynamic Table Placement:
You can position the table anywhere on the chart: top-right, top-left, bottom-right, bottom-left, middle-right, or middle-left.
How to Use:
Add the Indicator to Your Chart:
Apply the indicator to your chart from the Pine Script editor in TradingView.
Customize the Inputs:
Adjust the thresholds for TICK, ADD, VWAP, and VIX according to your trading style.
Enable or disable the metrics you want to see in the table by toggling the display options for each metric (e.g., Show TICK, Show BTC, Show SPY).
Set the table placement to your preferred position on the chart.
Interpret the Table:
Look for color-coded cells to quickly identify significant changes or breaches of thresholds.
Positive values are typically shown in green, negative values in red, and neutral/insignificant changes in gray.
Use metrics like TICK and ADD to gauge market breadth and momentum.
Refer to VWAP deviation to assess intraday buying or selling pressure.
Monitor the VIX and US10Y changes to stay aware of macroeconomic and volatility shifts.
Incorporate Into Your Strategy:
Use the indicator alongside technical analysis to confirm setups or identify areas of caution.
Keep an eye on correlated metrics (e.g., VIX and SPY) for broader market context.
Use BTCUSD or DXY as additional indicators of risk-on/risk-off sentiment.
Ideal Users:
Day Traders: Quickly gauge intraday market conditions and momentum.
Swing Traders: Identify broader sentiment shifts using metrics like ADD, DXY, and US10Y.
Macro Investors: Stay updated on key macroeconomic indicators like the 10-Year Treasury yield (US10Y) and the US Dollar Index (DXY).
This indicator serves as a comprehensive tool for understanding market conditions at a glance, enabling traders to act decisively based on the latest data.
Year-over-Year % Change for PCEPILFEHello, traders!
This indicator is specifically for FRED:PCEPILFE , which is a 'Personal Consumption Expenditures (PCE) Index excluding food and energy.'
What this indicator does is compare the monthly data to that of the same month last year to see how it has changed over the year. This comparison method is widely known as YoY(Year-over-Year).
While I made this indicator to use for FRED:PCEPILFE , you may use it for different charts as long as they show monthly data.
FRED:PCEPILFE is one of the main measures of inflation the Federal Reserve uses.
You can see the YoY % change of the PCE Index excluding food and energy in the official website for the Bureau of Labor Statistics, but unfortunately, I couldn't find one in TradingView.
So instead, I decided to make my own indicator showing the changes using FRED:PCEPILFE .
The code is very simple: it compares the data to the data 12 points ago because 12 points would mean 12 months in this chart. We then multiply the result by 100 for percentage.
Doing so, we compare the current month to the same month of the previous year.
Because I am only interested in the YoY % Change of the index, I pulled the indicator all the way up, covering the original chart data entirely. (Or you could achieve the same by simply moving your indicator to the pane above. But this way, the original chart data is also visible.)
I hope this indicator helps you with your analysis. Feel free to ask questions if have any!
God bless!
Compare Symbol [LuxmiAI]This indicator allows users to plot candles or bars for a selected symbol and add a moving average of their choice as an underlay. Users can customize the moving average type and length, making it versatile for a wide range of trading strategies.
This script is designed to offer flexibility, letting traders select the symbol, timeframe, candle style, and moving average type directly from the input options. The moving averages include the Exponential Moving Average (EMA), Simple Moving Average (SMA), Weighted Moving Average (WMA), and Volume-Weighted Moving Average (VWMA).
Features of the Script
This indicator provides the following key features:
1. Symbol Selection: Users can input the ticker symbol for which they want to plot the data.
2. Timeframe Selection: The script allows users to choose a timeframe for the symbol data.
3. Candle Styles: Users can select from three styles - regular candles, bars, or Heikin-Ashi candles.
4. Moving Average Options: Users can choose between EMA, SMA, WMA, and VWMA for added trend analysis.
5. Customizable Moving Average Length: The length of the moving average can be adjusted to suit individual trading strategies.
How the Script Works
The script starts by taking user inputs for the symbol and timeframe. It then retrieves the open, high, low, and close prices of the selected symbol and timeframe using the request.security function. Users can select between three candle styles: standard candles, bars, and Heikin-Ashi candles. If Heikin-Ashi candles are selected, the script calculates the Heikin-Ashi open, high, low, and close values.
To add further analysis capabilities, the script includes a moving average. Traders can select the moving average type from EMA, SMA, WMA, or VWMA and specify the desired length. The selected moving average is then plotted on the chart to provide a clear visualization of the trend.
Step-by-Step Implementation
1. Input Options: The script starts by taking inputs for the symbol, timeframe, candle style, moving average type, and length.
2. Data Retrieval: The script fetches OHLC data for the selected symbol and timeframe using request.security.
3. Candle Style Logic: It determines which candle style to plot based on the user’s selection. If Heikin-Ashi is selected, the script calculates Heikin-Ashi values.
4. Moving Average Calculation: Depending on the user’s choice, the script calculates the selected moving average.
5. Visualization: The script plots the candles or bars and overlays the moving average on the chart.
Benefits of Using This Indicator
This custom indicator provides multiple benefits for traders. It allows for quick comparisons between symbols and timeframes, helping traders identify trends and patterns. The flexibility to choose different candle styles and moving averages enhances its adaptability to various trading strategies. Additionally, the ability to customize the moving average length makes it suitable for both short-term and long-term analysis.
Request█ OVERVIEW
This library is a tool for Pine Script™ programmers that consolidates access to a wide range of lesser-known data feeds available on TradingView, including metrics from the FRED database, FINRA short sale volume, open interest, and COT data. The functions in this library simplify requests for these data feeds, making them easier to retrieve and use in custom scripts.
█ CONCEPTS
Federal Reserve Economic Data (FRED)
FRED (Federal Reserve Economic Data) is a comprehensive online database curated by the Federal Reserve Bank of St. Louis. It provides free access to extensive economic and financial data from U.S. and international sources. FRED includes numerous economic indicators such as GDP, inflation, employment, and interest rates. Additionally, it provides financial market data, regional statistics, and international metrics such as exchange rates and trade balances.
Sourced from reputable organizations, including U.S. government agencies, international institutions, and other public and private entities, FRED enables users to analyze over 825,000 time series, download their data in various formats, and integrate their information into analytical tools and programming workflows.
On TradingView, FRED data is available from ticker identifiers with the "FRED:" prefix. Users can search for FRED symbols in the "Symbol Search" window, and Pine scripts can retrieve data for these symbols via `request.*()` function calls.
FINRA Short Sale Volume
FINRA (the Financial Industry Regulatory Authority) is a non-governmental organization that supervises and regulates U.S. broker-dealers and securities professionals. Its primary aim is to protect investors and ensure integrity and transparency in financial markets.
FINRA's Short Sale Volume data provides detailed information about daily short-selling activity across U.S. equity markets. This data tracks the volume of short sales reported to FINRA's trade reporting facilities (TRFs), including shares sold on FINRA-regulated Alternative Trading Systems (ATSs) and over-the-counter (OTC) markets, offering transparent access to short-selling information not typically available from exchanges. This data helps market participants, researchers, and regulators monitor trends in short-selling and gain insights into bearish sentiment, hedging strategies, and potential market manipulation. Investors often use this data alongside other metrics to assess stock performance, liquidity, and overall trading activity.
It is important to note that FINRA's Short Sale Volume data does not consolidate short sale information from public exchanges and excludes trading activity that is not publicly disseminated.
TradingView provides ticker identifiers for requesting Short Sale Volume data with the format "FINRA:_SHORT_VOLUME", where "" is a supported U.S. equities symbol (e.g., "AAPL").
Open Interest (OI)
Open interest is a cornerstone indicator of market activity and sentiment in derivatives markets such as options or futures. In contrast to volume, which measures the number of contracts opened or closed within a period, OI measures the number of outstanding contracts that are not yet settled. This distinction makes OI a more robust indicator of how money flows through derivatives, offering meaningful insights into liquidity, market interest, and trends. Many traders and investors analyze OI alongside volume and price action to gain an enhanced perspective on market dynamics and reinforce trading decisions.
TradingView offers many ticker identifiers for requesting OI data with the format "_OI", where "" represents a derivative instrument's ticker ID (e.g., "COMEX:GC1!").
Commitment of Traders (COT)
Commitment of Traders data provides an informative weekly breakdown of the aggregate positions held by various market participants, including commercial hedgers, non-commercial speculators, and small traders, in the U.S. derivative markets. Tallied and managed by the Commodity Futures Trading Commission (CFTC) , these reports provide traders and analysts with detailed insight into an asset's open interest and help them assess the actions of various market players. COT data is valuable for gaining a deeper understanding of market dynamics, sentiment, trends, and liquidity, which helps traders develop informed trading strategies.
TradingView has numerous ticker identifiers that provide access to time series containing data for various COT metrics. To learn about COT ticker IDs and how they work, see our LibraryCOT publication.
█ USING THE LIBRARY
Common function characteristics
• This library's functions construct ticker IDs with valid formats based on their specified parameters, then use them as the `symbol` argument in request.security() to retrieve data from the specified context.
• Most of these functions automatically select the timeframe of a data request because the data feeds are not available for all timeframes.
• All the functions have two overloads. The first overload of each function uses values with the "simple" qualifier to define the requested context, meaning the context does not change after the first script execution. The second accepts "series" values, meaning it can request data from different contexts across executions.
• The `gaps` parameter in most of these functions specifies whether the returned data is `na` when a new value is unavailable for request. By default, its value is `false`, meaning the call returns the last retrieved data when no new data is available.
• The `repaint` parameter in applicable functions determines whether the request can fetch the latest unconfirmed values from a higher timeframe on realtime bars, which might repaint after the script restarts. If `false`, the function only returns confirmed higher-timeframe values to avoid repainting. The default value is `true`.
`fred()`
The `fred()` function retrieves the most recent value of a specified series from the Federal Reserve Economic Data (FRED) database. With this function, programmers can easily fetch macroeconomic indicators, such as GDP and unemployment rates, and use them directly in their scripts.
How it works
The function's `fredCode` parameter accepts a "string" representing the unique identifier of a specific FRED series. Examples include "GDP" for the "Gross Domestic Product" series and "UNRATE" for the "Unemployment Rate" series. Over 825,000 codes are available. To access codes for available series, search the FRED website .
The function adds the "FRED:" prefix to the specified `fredCode` to construct a valid FRED ticker ID (e.g., "FRED:GDP"), which it uses in request.security() to retrieve the series data.
Example Usage
This line of code requests the latest value from the Gross Domestic Product series and assigns the returned value to a `gdpValue` variable:
float gdpValue = fred("GDP")
`finraShortSaleVolume()`
The `finraShortSaleVolume()` function retrieves EOD data from a FINRA Short Sale Volume series. Programmers can call this function to retrieve short-selling information for equities listed on supported exchanges, namely NASDAQ, NYSE, and NYSE ARCA.
How it works
The `symbol` parameter determines which symbol's short sale volume information is retrieved by the function. If the value is na , the function requests short sale volume data for the chart's symbol. The argument can be the name of the symbol from a supported exchange (e.g., "AAPL") or a ticker ID with an exchange prefix ("NASDAQ:AAPL"). If the `symbol` contains an exchange prefix, it must be one of the following: "NASDAQ", "NYSE", "AMEX", or "BATS".
The function constructs a ticker ID in the format "FINRA:ticker_SHORT_VOLUME", where "ticker" is the symbol name without the exchange prefix (e.g., "AAPL"). It then uses the ticker ID in request.security() to retrieve the available data.
Example Usage
This line of code retrieves short sale volume for the chart's symbol and assigns the result to a `shortVolume` variable:
float shortVolume = finraShortSaleVolume(syminfo.tickerid)
This example requests short sale volume for the "NASDAQ:AAPL" symbol, irrespective of the current chart:
float shortVolume = finraShortSaleVolume("NASDAQ:AAPL")
`openInterestFutures()` and `openInterestCrypto()`
The `openInterestFutures()` function retrieves EOD open interest (OI) data for futures contracts. The `openInterestCrypto()` function provides more granular OI data for cryptocurrency contracts.
How they work
The `openInterestFutures()` function retrieves EOD closing OI information. Its design is focused primarily on retrieving OI data for futures, as only EOD OI data is available for these instruments. If the chart uses an intraday timeframe, the function requests data from the "1D" timeframe. Otherwise, it uses the chart's timeframe.
The `openInterestCrypto()` function retrieves opening, high, low, and closing OI data for a cryptocurrency contract on a specified timeframe. Unlike `openInterest()`, this function can also retrieve granular data from intraday timeframes.
Both functions contain a `symbol` parameter that determines the symbol for which the calls request OI data. The functions construct a valid OI ticker ID from the chosen symbol by appending "_OI" to the end (e.g., "CME:ES1!_OI").
The `openInterestFutures()` function requests and returns a two-element tuple containing the futures instrument's EOD closing OI and a "bool" condition indicating whether OI is rising.
The `openInterestCrypto()` function requests and returns a five-element tuple containing the cryptocurrency contract's opening, high, low, and closing OI, and a "bool" condition indicating whether OI is rising.
Example usage
This code line calls `openInterest()` to retrieve EOD OI and the OI rising condition for a futures symbol on the chart, assigning the values to two variables in a tuple:
= openInterestFutures(syminfo.tickerid)
This line retrieves the EOD OI data for "CME:ES1!", irrespective of the current chart's symbol:
= openInterestFutures("CME:ES1!")
This example uses `openInterestCrypto()` to retrieve OHLC OI data and the OI rising condition for a cryptocurrency contract on the chart, sampled at the chart's timeframe. It assigns the returned values to five variables in a tuple:
= openInterestCrypto(syminfo.tickerid, timeframe.period)
This call retrieves OI OHLC and rising information for "BINANCE:BTCUSDT.P" on the "1D" timeframe:
= openInterestCrypto("BINANCE:BTCUSDT.P", "1D")
`commitmentOfTraders()`
The `commitmentOfTraders()` function retrieves data from the Commitment of Traders (COT) reports published by the Commodity Futures Trading Commission (CFTC). This function significantly simplifies the COT request process, making it easier for programmers to access and utilize the available data.
How It Works
This function's parameters determine different parts of a valid ticker ID for retrieving COT data, offering a streamlined alternative to constructing complex COT ticker IDs manually. The `metricName`, `metricDirection`, and `includeOptions` parameters are required. They specify the name of the reported metric, the direction, and whether it includes information from options contracts.
The function also includes several optional parameters. The `CFTCCode` parameter allows programmers to request data for a specific report code. If unspecified, the function requests data based on the chart symbol's root prefix, base currency, or quoted currency, depending on the `mode` argument. The call can specify the report type ("Legacy", "Disaggregated", or "Financial") and metric type ("All", "Old", or "Other") with the `typeCOT` and `metricType` parameters.
Explore the CFTC website to find valid report codes for specific assets. To find detailed information about the metrics included in the reports and their meanings, see the CFTC's Explanatory Notes .
View the function's documentation below for detailed explanations of its parameters. For in-depth information about COT ticker IDs and more advanced functionality, refer to our previously published COT library .
Available metrics
Different COT report types provide different metrics . The tables below list all available metrics for each type and their applicable directions:
+------------------------------+------------------------+
| Legacy (COT) Metric Names | Directions |
+------------------------------+------------------------+
| Open Interest | No direction |
| Noncommercial Positions | Long, Short, Spreading |
| Commercial Positions | Long, Short |
| Total Reportable Positions | Long, Short |
| Nonreportable Positions | Long, Short |
| Traders Total | No direction |
| Traders Noncommercial | Long, Short, Spreading |
| Traders Commercial | Long, Short |
| Traders Total Reportable | Long, Short |
| Concentration Gross LT 4 TDR | Long, Short |
| Concentration Gross LT 8 TDR | Long, Short |
| Concentration Net LT 4 TDR | Long, Short |
| Concentration Net LT 8 TDR | Long, Short |
+------------------------------+------------------------+
+-----------------------------------+------------------------+
| Disaggregated (COT2) Metric Names | Directions |
+-----------------------------------+------------------------+
| Open Interest | No Direction |
| Producer Merchant Positions | Long, Short |
| Swap Positions | Long, Short, Spreading |
| Managed Money Positions | Long, Short, Spreading |
| Other Reportable Positions | Long, Short, Spreading |
| Total Reportable Positions | Long, Short |
| Nonreportable Positions | Long, Short |
| Traders Total | No Direction |
| Traders Producer Merchant | Long, Short |
| Traders Swap | Long, Short, Spreading |
| Traders Managed Money | Long, Short, Spreading |
| Traders Other Reportable | Long, Short, Spreading |
| Traders Total Reportable | Long, Short |
| Concentration Gross LE 4 TDR | Long, Short |
| Concentration Gross LE 8 TDR | Long, Short |
| Concentration Net LE 4 TDR | Long, Short |
| Concentration Net LE 8 TDR | Long, Short |
+-----------------------------------+------------------------+
+-------------------------------+------------------------+
| Financial (COT3) Metric Names | Directions |
+-------------------------------+------------------------+
| Open Interest | No Direction |
| Dealer Positions | Long, Short, Spreading |
| Asset Manager Positions | Long, Short, Spreading |
| Leveraged Funds Positions | Long, Short, Spreading |
| Other Reportable Positions | Long, Short, Spreading |
| Total Reportable Positions | Long, Short |
| Nonreportable Positions | Long, Short |
| Traders Total | No Direction |
| Traders Dealer | Long, Short, Spreading |
| Traders Asset Manager | Long, Short, Spreading |
| Traders Leveraged Funds | Long, Short, Spreading |
| Traders Other Reportable | Long, Short, Spreading |
| Traders Total Reportable | Long, Short |
| Concentration Gross LE 4 TDR | Long, Short |
| Concentration Gross LE 8 TDR | Long, Short |
| Concentration Net LE 4 TDR | Long, Short |
| Concentration Net LE 8 TDR | Long, Short |
+-------------------------------+------------------------+
Example usage
This code line retrieves "Noncommercial Positions (Long)" data, without options information, from the "Legacy" report for the chart symbol's root, base currency, or quote currency:
float nonCommercialLong = commitmentOfTraders("Noncommercial Positions", "Long", false)
This example retrieves "Managed Money Positions (Short)" data, with options included, from the "Disaggregated" report:
float disaggregatedData = commitmentOfTraders("Managed Money Positions", "Short", true, "", "Disaggregated")
█ NOTES
• This library uses dynamic requests , allowing dynamic ("series") arguments for the parameters defining the context (ticker ID, timeframe, etc.) of a `request.*()` function call. With this feature, a single `request.*()` call instance can flexibly retrieve data from different feeds across historical executions. Additionally, scripts can use such calls in the local scopes of loops, conditional structures, and even exported library functions, as demonstrated in this script. All scripts coded in Pine Script™ v6 have dynamic requests enabled by default. To learn more about the behaviors and limitations of this feature, see the Dynamic requests section of the Pine Script™ User Manual.
• The library's example code offers a simple demonstration of the exported functions. The script retrieves available data using the function specified by the "Series type" input. The code requests a FRED series or COT (Legacy), FINRA Short Sale Volume, or Open Interest series for the chart's symbol with specific parameters, then plots the retrieved data as a step-line with diamond markers.
Look first. Then leap.
█ EXPORTED FUNCTIONS
This library exports the following functions:
fred(fredCode, gaps)
Requests a value from a specified Federal Reserve Economic Data (FRED) series. FRED is a comprehensive source that hosts numerous U.S. economic datasets. To explore available FRED datasets and codes, search for specific categories or keywords at fred.stlouisfed.org Calls to this function count toward a script's `request.*()` call limit.
Parameters:
fredCode (series string) : The unique identifier of the FRED series. The function uses the value to create a valid ticker ID for retrieving FRED data in the format `"FRED:fredCode"`. For example, `"GDP"` refers to the "Gross Domestic Product" series ("FRED:GDP"), and `"GFDEBTN"` refers to the "Federal Debt: Total Public Debt" series ("FRED:GFDEBTN").
gaps (simple bool) : Optional. If `true`, the function returns a non-na value only when a new value is available from the requested context. If `false`, the function returns the latest retrieved value when new data is unavailable. The default is `false`.
Returns: (float) The value from the requested FRED series.
finraShortSaleVolume(symbol, gaps, repaint)
Requests FINRA daily short sale volume data for a specified symbol from one of the following exchanges: NASDAQ, NYSE, NYSE ARCA. If the chart uses an intraday timeframe, the function requests data from the "1D" timeframe. Otherwise, it uses the chart's timeframe. Calls to this function count toward a script's `request.*()` call limit.
Parameters:
symbol (series string) : The symbol for which to request short sale volume data. If the specified value contains an exchange prefix, it must be one of the following: "NASDAQ", "NYSE", "AMEX", "BATS".
gaps (simple bool) : Optional. If `true`, the function returns a non-na value only when a new value is available from the requested context. If `false`, the function returns the latest retrieved value when new data is unavailable. The default is `false`.
repaint (simple bool) : Optional. If `true` and the chart's timeframe is intraday, the value requested on realtime bars may change its time offset after the script restarts its executions. If `false`, the function returns the last confirmed period's values to avoid repainting. The default is `true`.
Returns: (float) The short sale volume for the specified symbol or the chart's symbol.
openInterestFutures(symbol, gaps, repaint)
Requests EOD open interest (OI) and OI rising information for a valid futures symbol. If the chart uses an intraday timeframe, the function requests data from the "1D" timeframe. Otherwise, it uses the chart's timeframe. Calls to this function count toward a script's `request.*()` call limit.
Parameters:
symbol (series string) : The symbol for which to request open interest data.
gaps (simple bool) : Optional. If `true`, the function returns non-na values only when new values are available from the requested context. If `false`, the function returns the latest retrieved values when new data is unavailable. The default is `false`.
repaint (simple bool) : Optional. If `true` and the chart's timeframe is intraday, the value requested on realtime bars may change its time offset after the script restarts its executions. If `false`, the function returns the last confirmed period's values to avoid repainting. The default is `true`.
Returns: ( ) A tuple containing the following values:
- The closing OI value for the symbol.
- `true` if the closing OI is above the previous period's value, `false` otherwise.
openInterestCrypto(symbol, timeframe, gaps, repaint)
Requests opening, high, low, and closing open interest (OI) data and OI rising information for a valid cryptocurrency contract on a specified timeframe. Calls to this function count toward a script's `request.*()` call limit.
Parameters:
symbol (series string) : The symbol for which to request open interest data.
timeframe (series string) : The timeframe of the data request. If the timeframe is lower than the chart's timeframe, it causes a runtime error.
gaps (simple bool) : Optional. If `true`, the function returns non-na values only when new values are available from the requested context. If `false`, the function returns the latest retrieved values when new data is unavailable. The default is `false`.
repaint (simple bool) : Optional. If `true` and the `timeframe` represents a higher timeframe, the function returns unconfirmed values from the timeframe on realtime bars, which repaint when the script restarts its executions. If `false`, it returns only confirmed higher-timeframe values to avoid repainting. The default is `true`.
Returns: ( ) A tuple containing the following values:
- The opening, high, low, and closing OI values for the symbol, respectively.
- `true` if the closing OI is above the previous period's value, `false` otherwise.
commitmentOfTraders(metricName, metricDirection, includeOptions, CFTCCode, typeCOT, mode, metricType)
Requests Commitment of Traders (COT) data with specified parameters. This function provides a simplified way to access CFTC COT data available on TradingView. Calls to this function count toward a script's `request.*()` call limit. For more advanced tools and detailed information about COT data, see TradingView's LibraryCOT library.
Parameters:
metricName (series string) : One of the valid metric names listed in the library's documentation and source code.
metricDirection (series string) : Metric direction. Possible values are: "Long", "Short", "Spreading", and "No direction". Consult the library's documentation or code to see which direction values apply to the specified metric.
includeOptions (series bool) : If `true`, the COT symbol includes options information. Otherwise, it does not.
CFTCCode (series string) : Optional. The CFTC code for the asset. For example, wheat futures (root "ZW") have the code "001602". If one is not specified, the function will attempt to get a valid code for the chart symbol's root, base currency, or main currency.
typeCOT (series string) : Optional. The type of report to request. Possible values are: "Legacy", "Disaggregated", "Financial". The default is "Legacy".
mode (series string) : Optional. Specifies the information the function extracts from a symbol. Possible modes are:
- "Root": The function extracts the futures symbol's root prefix information (e.g., "ES" for "ESH2020").
- "Base currency": The function extracts the first currency from a currency pair (e.g., "EUR" for "EURUSD").
- "Currency": The function extracts the currency of the symbol's quoted values (e.g., "JPY" for "TSE:9984" or "USDJPY").
- "Auto": The function tries the first three modes (Root -> Base currency -> Currency) until it finds a match.
The default is "Auto". If the specified mode is not available for the symbol, it causes a runtime error.
metricType (series string) : Optional. The metric type. Possible values are: "All", "Old", "Other". The default is "All".
Returns: (float) The specified Commitment of Traders data series. If no data is available, it causes a runtime error.
Silver Bullet SessionsThe Silver Bullet Sessions indicator is a specialized timing tool designed to highlight key market sessions throughout the trading day. By marking specific hours with vertical lines, it helps traders identify potentially significant market moments that often coincide with increased volatility and trading opportunities.
This indicator plots vertical lines at six strategic times during the trading day: 3:00 AM, 4:00 AM, 10:00 AM, 11:00 AM, 2:00 PM, and 3:00 PM. These times are carefully selected to correspond with important market events and session overlaps in the global trading cycle. The early morning hours (3-4 AM) often capture significant Asian market movements and the European market opening. The mid-morning period (10-11 AM) typically corresponds with peak European trading hours and the pre-US market dynamics. The afternoon times (2-3 PM) coincide with key US market activities and the European market close.
The indicator is implemented using Pine Script version 6, ensuring compatibility with the latest TradingView platform features. It employs a clean, efficient coding structure that minimizes resource usage while maintaining reliable performance. The vertical lines are rendered in blue for clear visibility against any chart background, and their width is optimized for easy identification without obscuring price action.
Traders can use these visual markers to:
Plan their entries and exits around these key time periods
Anticipate potential market volatility
Structure their trading sessions around these significant market hours
Identify session-based trading patterns
Options Levels Support and ResistanceAre you sometimes clueless of where you are going to find support or resistance for the stock price? Nothing can be more powerful than market positioning via options levels.
This indicator visualizes key institutional options levels including short-term and longer-term Put/Call Walls, and projected implied move ranges.
Key Features:
Displays major support/resistance levels derived from options data
Shows institutional Put Walls (PW) and Call Walls (CW) - areas of significant options activity
Identifies short-term and longer-term gamma levels for more precise trading
Includes an option statistics (IV, Put/Call ratio, trend) in a clean dashboard
Automatically(*) updates throughout the trading day to reflect current market positioning
Currently supporting 440 of the most popular tickers.
Presents gamma flip levels for indexes SPX, RUT, NDX and VIX
Trading Applications:
Identify key price levels where institutional options activity may influence price movement
Gauge market sentiment through IV levels, Put/Call ratios, and options positioning
Plan entries/exits around major Put/Call walls where price reversals are more likely
Monitor changes in institutional positioning through level trends
Levels are calculated externally using comprehensive options data and updated into the indicator multiple times per day. Note that I can't guarantee it will be timely updated since TradingView offers no access to external data nor a way to programmatically update the script.
This code simply renders the levels I calculate using external software. I had to make the code as short as possible to accommodate more tickers, reason why there is no commenting.
The last update time (New York/EST) is shown in the dashboard.
ICT CRT Model Range with EquilibriumICT CRT Model Range with Equilibrium Indicator
This indicator calculates and displays the high, low, and equilibrium levels within a custom-defined session (9:00 am to 10:00 am New York Time and the lines will stop appearing at 16:00pm ). It draws horizontal lines to represent the session's range and marks the equilibrium point as a reference.
What is CRT (Candle Range Theory)?
Candle Range Theory (CRT) is based on the concept that every candle on any timeframe forms its own range. These ranges can either be manipulated—through strategies like Turtle Soup—or broken, resulting in price movements such as engulfing patterns, breakouts, and retests beyond the candle's high or low.
CRT is commonly visualized as a 3-candle model, but it can include more candles due to the presence of inside bars. An inside bar is a candle whose high is not higher than the previous candle's high and whose low is not lower than the previous candle's low.
The CRT model follows the A-M-D structure:
Accumulation (A): The first candle or group of candles (inside bars) represents market consolidation.
Manipulation (M): The second candle signals a false move, often a Turtle Soup setup designed to trap traders.
Distribution (D): The third candle confirms the true market move, breaking out of the range and establishing the trend.
Customizable Settings:
Line Colors: Choose your preferred colors for the high, low, and equilibrium lines.
Line Widths: Adjust the thickness of the lines for better visibility.
Line Styles: Select from solid, dotted, or dashed styles for each line.
Label Settings: Customize the text and colors of the labels for the high, low, and equilibrium points.
Traders can easily modify these settings to suit their visual preferences and trading strategies. This indicator is ideal for identifying price action within a specific range, offering clear visual cues for potential CRT Setup.