Hyperbolic Tangent SuperTrend [InvestorUnknown]The Hyperbolic Tangent SuperTrend (HTST) is designed for technical analysis, particularly in markets with assets that have lower prices or price ratios. This indicator leverages the Hyperbolic Tangent Moving Average (HTMA), a custom moving average calculated using the hyperbolic tangent function, to smooth price data and reduce the impact of short-term volatility.
Hyperbolic Tangent Moving Average (HTMA):
The indicator's core uses a hyperbolic tangent function to calculate a smoothed average of the price. The HTMA provides enhanced trend-following capabilities by dampening the impact of sharp price swings and maintaining a focus on long-term market movements.
The hyperbolic tangent function (tanh) is commonly used in mathematical fields like calculus, machine learning and signal processing due to its properties of “squashing” inputs into a range between -1 and 1. The function provides a non-linear transformation that can reduce the impact of extreme values while retaining a certain level of smoothness.
tanh(x) =>
e_x = math.exp(x)
e_neg_x = math.exp(-x)
(e_x - e_neg_x) / (e_x + e_neg_x)
The HTMA is calculated by taking the difference between the price and its simple moving average (SMA), applying a multiplier to control sensitivity, and then transforming it using the hyperbolic tangent function.
htma(src, len, mul) =>
tanh_src = tanh((src - ta.sma(src, len)) * mul) * ta.stdev(src, len) + ta.sma(src, len)
htma = ta.sma(tanh_src, len)
Important Note: The Hyperbolic Tangent function becomes less accurate with very high prices. For assets priced above 100,000, the results may deteriorate, and for prices exceeding 1 million, the function may stop functioning properly. Therefore, this indicator is better suited for assets with lower prices or lower price ratios.
SuperTrend Calculation:
In addition to the HTMA, the indicator includes an Average True Range (ATR)-based SuperTrend calculation, which helps identify uptrends and downtrends in the market. The SuperTrend is adjusted dynamically using the HTMA to avoid false signals in fast-moving markets.
The ATR period and multiplier are customizable, allowing users to fine-tune the sensitivity of the trend signals.
pine_supertrend(src, calc_price, atrPeriod, factor) =>
atr = ta.atr(atrPeriod)
upperBand = src + factor * atr
lowerBand = src - factor * atr
prevLowerBand = nz(lowerBand )
prevUpperBand = nz(upperBand )
lowerBand := lowerBand > prevLowerBand or calc_price < prevLowerBand ? lowerBand : prevLowerBand
upperBand := upperBand < prevUpperBand or calc_price > prevUpperBand ? upperBand : prevUpperBand
int _direction = na
float superTrend = na
prevSuperTrend = superTrend
if na(atr )
_direction := 1
else if prevSuperTrend == prevUpperBand
_direction := calc_price > upperBand ? -1 : 1
else
_direction := calc_price < lowerBand ? 1 : -1
superTrend := _direction == -1 ? lowerBand : upperBand
Inbuilt Backtest Mode:
The HTST includes an inbuilt backtest mode that enables users to test the indicator's performance against historical data, similar to TradingView strategies.
The backtest mode allows you to compare the performance of different indicator settings with a simple buy and hold strategy to assess its effectiveness in different market conditions.
Hint Table for Display Modes:
The indicator includes a Hint Table that recommends the best pane to use for different display modes. For example, it suggests using the "Overlay" mode in the same pane as the price action, while the "Backtest Mode" is better suited for a separate pane. This ensures a more organized and clear visual experience.
The Hint Table appears as a small table at the bottom of the chart with easy-to-follow recommendations, ensuring the best setup for both visual clarity and indicator functionality.
With these features, the Hyperbolic Tangent SuperTrend Indicator offers traders a versatile and customizable tool for analyzing price trends while providing additional functionalities like backtesting and display mode hints for optimal usability.
Indikator dan strategi
New York Opening Bell MarkerThe Opening Bell Marker indicator is designed to assist traders by marking the 09:30 AM Eastern Time (ET) opening of the U.S. stock market with a red dashed vertical line on the chart. This feature is particularly useful for back testing strategies around market open, providing a visual reference point for the start of regular trading hours. The indicator automatically adjusts to display the line at 09:30 ET, helping traders spot key moments and potential setups during market open.
movingAveragesUtilitiesLibrary "movingAveragesUtilities"
get_movingAverages_data(source, length_fast, length_medium, length_slow)
Parameters:
source (float)
length_fast (simple int)
length_medium (simple int)
length_slow (simple int)
Cumulative Volume Delta Divergence [TradingFinder] Periodic EMA🔵 Introduction
The Cumulative Volume Delta (CVD) is a powerful tool in technical analysis that is derived from market volume or trading activity. The Cumulative Volume Delta Divergence Detector Indicator helps traders identify Cumulative Volume Delta Divergences (CVD Divergence), which can provide reliable trading signals.
These divergences, such as bullish and bearish CVD divergences, act as key indicators of potential trend reversals in financial markets. By analyzing CVD divergences, traders can gain insights into the strength of buying and selling pressure and make more informed predictions about price trends.
The CVD indicator is particularly effective for traders who engage in day trading and scalping, as it helps identify price reversal points by analyzing volume and price behavior.
Using the CVD indicator in combination with other technical tools such as support and resistance levels and candlestick patterns allows for a more accurate market analysis.
🔵 How to Use
Divergences are one of the most important technical analysis signals that indicate the current strength of a price move may not be sustainable.
Cumulative Volume Delta Divergence helps traders identify potential trading opportunities that may not be visible on the price chart alone.
This type of divergence examines the relationship between buying and selling volume and price, enabling traders to better understand price trends.
🟣 Bullish CVD Divergence
A bullish CVD divergence occurs when the price makes a lower low, but the CVD indicator shows a higher low. This indicates increasing buying pressure in the market, even though the price is declining. In other words, despite the price dropping, buyers are gradually gaining strength, which could signal a price reversal and the start of a bullish trend.
How to use this signal : In this scenario, traders looking to go long can use this signal as a favorable opportunity to enter the market. After a bullish divergence, the market typically tends to move upward.
To reduce risk, traders can wait for further confirmation from the price chart. For example, if the price breaks through the previous high after the divergence or breaks a resistance level, this could be a more reliable signal for entering the market.
🟣 Bearish CVD Divergence
A bearish CVD divergence is the opposite of a bullish divergence. In this type of divergence, the price makes a higher high, but the CVD indicator shows a lower high. This indicates decreasing buying pressure and weakening momentum in the current bullish trend. A bearish divergence often serves as a warning of a potential market reversal to the downside.
How to use this signal : Traders can use this divergence as an opportunity to exit long positions or enter short positions. When the CVD indicator makes a lower high compared to the price, it signals weakness in buyer strength.
If traders receive further confirmation from the price chart, such as a break of key support levels or an increase in selling volume, this can serve as a stronger signal for the beginning of a bearish trend.
🟣 How to Build a Trading Strategy with Cumulative Volume Delta Divergence
Using CVD divergence alone may not be sufficient. Traders should combine this tool with other technical analysis techniques and indicators to have more confidence in their decisions. For example, when observing a CVD divergence, traders can also analyze volume, trend lines, or candlestick patterns to get a more accurate market analysis.
Additionally, risk management should always be a priority. Using stop-loss orders and properly sizing trades can help traders minimize their losses if they make a mistake.
🔵 Setting
Divergence Fractal Period : Determines the period of swings. The minimum and default value is 2.
CVD Period : You can set the period of " Periodic " and " EMA " modes.
Cumulative Mode : It has three modes "Periodic" and "EMA". In "Periodic" mode, it accumulates the volume periodically and in "EMA" mode, it calculates the moving average of the volume.
Market Ultra Data : If you turn on this feature, 26 large brokers will be included in the calculation of the trading volume. The advantage of this capability is to have more reliable volume data. You should be careful to specify the market you are in, FOREX brokers and Crypto brokers are different.
🔵 Conclusion
The Cumulative Volume Delta (CVD) indicator is a powerful tool in technical analysis, helping traders better identify price trends and make more accurate market predictions. By identifying CVD divergences, traders can anticipate price reversals and time their market entries and exits accordingly.
Bullish and bearish CVD divergences each provide valuable signals that can help traders identify the best entry and exit points in the market. A bullish CVD divergence signals strength in buying that will likely lead to a price increase, while a bearish CVD divergence indicates weakness in the bullish trend and the potential for the beginning of a bearish trend.
Overall, combining CVD with other technical analysis tools and employing risk management strategies can help traders make better trading decisions and capitalize on available market opportunities.
Bullish Gap Up DetectionThis indicator is designed to identify gap-up trading opportunities in real-time. A gap-up occurs when the opening price of a stock is higher than the previous day's high, signaling potential bullish momentum.
Key Features :
Gap Detection : The indicator detects when today’s open is above yesterday’s high and remains above that level throughout the trading session.
Visual Alerts : A triangle shape appears below the price bar when a gap-up condition is met, providing clear visual signals for traders to consider potential entry points.
EMA Analysis : The indicator incorporates two Exponential Moving Averages:
10-day EMA: Used to assess short-term price trends and help determine if the stock is currently in an upward momentum phase.
20-day EMA: Provides additional context for medium-term trends, ensuring that gaps are only considered when the stock is in a favorable trend.
The indicator confirms that the 10-day EMA is above the 20-day EMA, indicating bullish sentiment in the market.
This indicator can be used in various trading strategies to capitalize on momentum following gap-up openings. It’s suitable for day traders and swing traders looking for entry points in trending stocks.
gridUtilitiesLibrary "gridUtilities"
TODO: add library description here
get_fibonacciGrid_data(length, trend_direction, plot_grid, plot_labels, bars_to_right, include_levels)
: Gets and plots a fibonacci grid.
Parameters:
length (int) : (int): The direction flag that indicates where the trend is going.
trend_direction (string) : (string): Direction of the trend (Long, Short or Neutral)
plot_grid (bool) : (bool): Plots the fibonacci grid.
plot_labels (bool) : (bool): Plots the datatable.
bars_to_right (int) : (bool): Plots the datatable.
include_levels (bool) : (bool): Plots the datatable.
Returns: : Returns a map with the grid levels, as string with the direction of the grid and a map with the values for the dataTable.
Thrax - Intraday Market Pressure ZonesTHRAX - INTRADAY MARKET PRESSURE ZONES
This indicator identifies potential support and resistance zones based on areas of significant market pressure. It dynamically plots these zones and adjusts their visibility based on real-time price action and user-defined thresholds. The indicator is useful for traders seeking to understand intraday market pressure, visualize zones of potential price reversals, and analyze volume imbalances at critical levels.
1. Support/Resistance Zones: Wherever the price retraces significantly from its high a support zone is drawn and when it retraces significantly from it low a resistance zone is drawn. The significant retracing is measured by the wick threshold percentage. For instance, if set to 75%, it implies price retracement of 75% either from high or from low for a particular candel
Volume delat: Displays volume delta information where the zones are formed. This can be used by trader to consider only those zones where delta is significant.
2. Breakout Detection: Monitors for price breakouts beyond established zones, deleting zones that are invalidated by price movement. when the price breaks a given zone with the threshold, it is considered to be mitigated and chances of trend continuation is decent.
Candle Coloring: Uses color codes (green, red, and yellow) to represent bullish, bearish, and indecisive (doji) candles, aiding quick visual assessment.
INPUTS
1. Wick Threshold (%) : Sets the minimum wick percentage required for a candle to be considered a support or resistance candidate.
2. Breakout Threshold (%) : Determines the percentage above or below a support or resistance zone that defines a breakout condition. if breaks a zone with the set threshold then the zone will be considered mititgated.
3. Max Number of Support/Resistance Zones : Limits the maximum number of support/resistance zones displayed on the chart, ranging from 1 to 5.
4. Show Wick Percentage Labels : Toggles the display of percentage values for upper and lower wicks on each candle.
TRADE SETUP
Identifying Entry Points: Look for the formation of support or resistance zones. Wait for price to retrace to these zones. if you are willing to take risk, you can consider even zones with low delta. If you want to be more cautious you should consider zones with high delta.
Volume Confirmation: Use the volume information to confirm the strength of the zone. Strong volume differences (displayed as labels) can indicate significant market pressure at these levels.
Breakout Trades: If price breaks through a support/resistance zone by more than the breakout threshold, consider this a signal for a potential trend continuation in the breakout direction.
Risk Management: Set stop-loss levels slightly outside of the identified zones to minimize risk in case of false breakouts. This can be set in input setting for breakout threshold.
Bonus Tip : Mark your significant highs and lows from where prices have retraced multiple times in the near past and if the zone is near these levels it can serve s a strong candidate of support or resistance
Therefore, in conclusion monitor the zones, based on delta and volume presence filter out the zone, wait for price retracement to the zone, intiate the trade with stop loss below zone with a set percentage.
Momentum Cloud.V33🌟 Introducing MomentumCloud.V33 🌟
MomentumCloud.V33 is a cutting-edge indicator designed to help traders capture market momentum with clarity and precision. This versatile tool combines moving averages, directional movement indexes (DMI), and volume analysis to provide real-time insights into trend direction and strength. Whether you’re a scalper, day trader, or swing trader, MomentumCloud.V33 adapts to your trading style and timeframe, making it an essential addition to your trading toolkit. 📈💡
🔧 Customizable Parameters:
• Moving Averages: Adjust the periods of the fast (MA1) and slow (MA2) moving averages to fine-tune your trend analysis.
• DMI & ADX: Customize the DMI length and ADX smoothing to focus on strong, actionable trends.
• Volume Multiplier: Modify the cloud thickness based on trading volume, emphasizing trends with significant market participation.
📊 Trend Detection:
• Color-Coded Clouds:
• Green Cloud: Indicates a strong uptrend, suggesting buying opportunities.
• Red Cloud: Indicates a strong downtrend, signaling potential short trades.
• Gray Cloud: Reflects a range-bound market, helping you avoid low-momentum periods.
• Dynamic Volume Integration: The cloud thickness adjusts dynamically with trading volume, highlighting strong trends supported by high market activity.
📈 Strength & Momentum Analysis:
• Strength Filtering: The ADX component ensures that only strong trends are highlighted, filtering out market noise and reducing false signals.
• Visual Momentum Gauge: The cloud color and thickness provide a quick visual representation of market momentum, enabling faster decision-making.
🔔 Alerts:
• Custom Alerts: Set up alerts for when the trend shifts or reaches critical levels, keeping you informed without needing to constantly monitor the chart.
🎨 Visual Enhancements:
• Gradient Cloud & Shadows: The indicator features a gradient-filled cloud with shadowed moving averages, enhancing both aesthetics and clarity on your charts.
• Adaptive Visual Cues: MomentumCloud.V33’s color transitions and dynamic thickness provide an intuitive feel for the market’s rhythm.
🚀 Quick Guide to Using MomentumCloud.V33
1. Add the Indicator: Start by adding MomentumCloud.V33 to your chart. Customize the settings such as MA periods, DMI length, and volume multiplier to match your trading style.
2. Analyze the Market: Observe the color-coded cloud and its thickness to gauge market momentum and trend direction. The thicker the cloud, the stronger the trend.
3. Set Alerts: Activate alerts for trend changes or key levels to capture trading opportunities without needing to watch the screen continuously.
⚙️ How It Works:
MomentumCloud.V33 calculates market momentum by combining moving averages, DMI, and volume. The cloud color changes based on the trend direction, while its thickness reflects the strength of the trend as influenced by trading volume. This integrated approach ensures you can quickly identify robust market movements, making it easier to enter and exit trades at optimal points.
Settings Overview:
• Moving Averages: Define the lengths for the fast and slow moving averages.
• DMI & ADX: Adjust the DMI length and ADX smoothing to focus on significant trends.
• Volume Multiplier: Customize the multiplier to control cloud thickness, highlighting volume-driven trends.
📚 How to Use MomentumCloud.V33:
• Trend Identification: The direction and color of the cloud indicate the prevailing trend, while the cloud’s thickness suggests the trend’s strength.
• Trade Execution: Use the green cloud to look for long entries and the red cloud for short positions. The gray cloud advises caution, as it represents a range-bound market.
• Alerts: Leverage the custom alerts to stay on top of market movements and avoid missing critical trading opportunities.
Unleash the power of trend and momentum analysis with MomentumCloud.V33! Happy trading! 📈🚀✨
Multi-Step FlexiSuperTrend - Indicator [presentTrading]This version of the indicator is built upon the foundation of a strategy version published earlier. However, this indicator version focuses on providing visual insights and alerts for traders, rather than executing trades. This one is mostly for @thorcmt.
█ Introduction and How it is Different
The **Multi-Step FlexiSuperTrend Indicator** is a versatile tool designed to provide traders with a highly customizable and flexible approach to trend analysis. Unlike traditional supertrend indicators, which focus on a single factor or threshold, the **FlexiSuperTrend** allows users to define multiple levels of take-profit targets and incorporate different trend normalization methods.
It comes with several advanced customization features, including multi-step take profits, deviation plotting, and trend normalization, making it suitable for both novice and expert traders.
BTCUSD 6hr Performance
█ Strategy, How It Works: Detailed Explanation
The **Multi-Step FlexiSuperTrend** works by calculating a supertrend based on multiple factors and incorporating oscillations from trend deviations. Here’s a breakdown of how it functions:
🔶 SuperTrend Calculation
At the heart of the indicator is the SuperTrend formula, which dynamically adjusts based on price movements.
🔶 Normalization of Deviations
To enhance accuracy, the **FlexiSuperTrend** calculates multiple deviations from the trend and normalizes them.
🔶 Multi-Step Take Profit Levels
The indicator allows setting up to three take profit levels, which are displayed via price level alerts. lows traders to exit part of their position at various profit intervals.
For more detail, please check the strategy version - Multi-Step-FlexiSuperTrend-Strategy:
and 'FlexiSuperTrend-Strategy'
█ Trade Direction
The **Multi-Step FlexiSuperTrend Indicator** supports both long and short trade directions.
This flexibility allows traders to adapt to trending, volatile, or sideways markets.
█ Usage
To use the **FlexiSuperTrend Indicator**, traders can set up their preferences for the following key features:
- **Trading Direction**: Choose whether to focus on long, short, or both signals.
- **Indicator Source**: The price source to calculate the trend (e.g., close, hl2).
- **Indicator Length**: The number of periods to calculate the ATR and trend (the larger the value, the smoother the trend).
- **Starting and Increment Factor**: These adjust how reactive the trend is to price movements. The starting factor dictates how far the initial trend band is from the price, and the increment factor adjusts subsequent trend deviations.
The indicator then displays buy and sell signals on the chart, along with alerts for each take-profit level.
Local picture
█ Default Settings
The default settings of the **Multi-Step FlexiSuperTrend** are carefully designed to provide an optimal balance between sensitivity and accuracy. Let’s examine these default parameters and their effect on performance:
🔶 Indicator Length (Default: 10)
The **Indicator Length** determines the lookback period for the ATR calculation. A smaller value makes the indicator more reactive to price changes, but may generate more false signals. A longer length smooths the trend and reduces noise but may delay signals.
Effect on performance: Shorter lengths perform better in volatile markets, while longer lengths excel in trending markets.
🔶 Starting Factor (Default: 0.618)
This factor adjusts the starting distance of the SuperTrend from the current price. The smaller the starting factor, the closer the trend is to the price, making it more sensitive. Conversely, a larger factor allows more distance, reducing sensitivity but filtering out false signals.
Effect on performance: A smaller factor provides quicker signals but can lead to frequent false positives. A larger factor generates fewer but more reliable signals.
🔶 Increment Factor (Default: 0.382)
The **Increment Factor** controls how the trend bands adjust as the price moves. It increases the distance of the bands from the price with each iteration.
Effect on performance: A higher increment factor can result in wider stop-loss or trend reversal bands, allowing for longer trends to develop without frequent exits. A lower factor keeps the bands closer to the price and is more suited for shorter-term trades.
🔶 Take Profit Levels (Default: 2%, 8%, 18%)
The default take-profit levels are set at 2%, 8%, and 18%. These values represent the thresholds at which the trader can partially exit their positions. These multi-step levels are highly customizable depending on the trader’s risk tolerance and strategy.
Effect on performance: Lower take-profit levels (e.g., 2%) capture small, quick profits in volatile markets, while higher levels (8%-18%) allow for a more gradual exit in strong trends.
🔶 Normalization Method (Default: None)
The default normalization method is **None**, meaning the deviations are not normalized. However, enabling normalization (e.g., **Max-Min**) can improve the clarity of the indicator’s signals in volatile or choppy markets by smoothing out the noise.
Effect on performance: Using a normalization method can reduce the effect of extreme deviations, making signals more stable and less prone to false positives.
Bearish signal using Point of Control (POC) with PAC by guruThis indicator code helps traders identify potential sell opportunities using several important technical indicators:
Point of Control (POC) – This is the price level where the most volume was traded over the past several days.
Previous Day's Low – This shows the lowest price reached during the previous day.
PAC (Price Action Channel) EMA – These are two moving averages (one based on the low price and one based on the close price) that help determine if the price is trending within a certain range.
Volume SMA – This is a 3-day simple moving average (SMA) of volume, which helps filter out signals based on market activity.
What the Script Does:
Point of Control (POC):
The script looks at the last 50 days (configurable) and calculates which price level had the highest trading volume.
It then plots a red line on the chart at the POC level. This is important because it helps identify areas where there was strong market interest in the past.
Volume Moving Average:
The script calculates a 3-day SMA of volume, but it excludes the current day to avoid premature signals based on today’s trading.
The volume SMA is used to ensure there’s enough market activity (with a threshold set to 25 units) before triggering a sell signal.
Price Action Channel (PAC) EMA:
The PAC consists of two exponential moving averages (EMAs):
The PAC Low EMA: This is based on the low prices over the last 34 periods (configurable).
The PAC Close EMA: This is based on the closing prices over the last 34 periods.
These EMAs help determine if the price is trending above or below certain price levels.
Sell Signal Logic: The script checks three conditions before displaying a "Sell" signal:
Price Below POC and Previous Day’s Low:
The close price must be below both the Point of Control (POC) and the previous day's low.
Volume SMA Above 25:
The 3-day volume SMA must be greater than 25. This ensures the signal only triggers when there’s enough trading volume in the market.
Today’s Low is Above PAC EMAs:
Today's low price must be above both the PAC low EMA and the PAC close EMA. This prevents sell signals when prices are already significantly below the PAC, indicating possible exhaustion in the downtrend.
If all three conditions are met, the script will display a red "Sell" label on the chart, signaling a potential selling opportunity.
No Sell Signal if Price Reverses:
If the price crosses back above the POC or the previous day's low, the script will remove the sell signal and reset for a new opportunity.
Summary of Conditions:
For the script to display a "Sell" label:
The close price must be below the Point of Control (POC) and the previous day’s low.
The 3-day volume SMA (excluding today) must be greater than 25 units.
The low price of the current day must be above both the PAC low EMA and the PAC close EMA.
If these conditions are met, a red sell label appears on the chart as a potential signal for a short (sell) trade.
Trend CCITrend CCI (TCCI) Indicator
Description:
The Trend CCI (TCCI) indicator is a unique combination of the Commodity Channel Index (CCI) and the Average True Range (ATR), designed to identify trends and market reversals with a refined sensitivity to price volatility. The indicator plots the CCI, adjusted by an ATR filter, and color-codes the trendline to signal uptrends and downtrends.
How It Works:
This indicator uses the CCI to measure price momentum and an ATR-based filter to smooth out market noise, making it easier to detect significant shifts in the market trend. Key parameters such as the ATR Period, ATR Multiplier, and CCI Period have been carefully chosen to optimize the indicator's performance:
1. ATR Period (default: 18)
The ATR Period determines the number of periods used to calculate the **Average True Range**, which reflects market volatility. In this case, an **ATR Period of 18** has been selected for several reasons:
Balance between responsiveness and noise reduction : A period of 18 strikes a balance between being responsive to recent price movements and filtering out minor fluctuations. Shorter ATR periods might be too reactive, creating false signals, while longer periods might miss shorter-term trends.
Adaptable to various market conditions : An 18-period ATR is suitable for both intraday and swing trading strategies, making it versatile across different time frames.
Standard industry practice : Many traders use ATR settings between 14 and 20 periods as a convention for detecting reliable volatility levels.
2. ATR Multiplier (default: 1.5)
The ATR Multiplier is applied to the ATR value to define how sensitive the indicator is to volatility. In this case, a multiplier of 1.5 has been chosen:
Avoiding whipsaws in low volatility markets: By setting the multiplier to 1.5, the indicator filters out smaller, less significant price movements, reducing the likelihood of whipsaw signals (i.e., false trend reversals during periods of low volatility).
Optimizing signal accuracy: A moderate multiplier like 1.5 ensures that the indicator only generates signals when the price moves a significant distance from the average range. Higher multipliers (e.g., 2.0) may ignore valid opportunities, while lower multipliers (e.g., 1.0) might create too many signals.
Enhancing trend clarity : The multiplier’s role in widening the range allows the indicator to respond more clearly during periods of strong trends, reducing signal noise and false positives.
3. CCI Period (default: 63)
The CCI Period defines the number of periods used to calculate the Commodity Channel Index. A 63-period CCI is selected based on the following considerations:
Smoothing the momentum calculation: A longer period, such as 63, is used to smooth out the CCI and reduce the effects of short-term price fluctuations. This period captures longer-term momentum, making it ideal for identifying more significant market trends.
-Filtering out short-term noise: While shorter CCI periods (e.g., 14 or 20) may be more reactive, they tend to produce more signals, some of which may be false. A 63-period CCI focuses on stronger and more sustained price movements, providing fewer but higher-quality signals.
Adapted to intermediate trading: A 63-period CCI aligns well with traders looking for medium-term trend-following strategies, striking a balance between long-term trend identification and responsiveness to significant price shifts.
How to Use:
Green Area: When the trendline turns green, it signals that the CCI is positive, reflecting upward momentum. This can be interpreted as a buy signal, indicating the potential for long positions or continuing bullish trades.
Red Area: When the trendline turns red, it signals that the CCI is negative, reflecting downward momentum. This can be interpreted as a sell signal, indicating potential short positions or bearish trades.
ATR Filter: The ATR helps reduce false signals by ignoring minor price movements. Traders can adjust the ATR Multiplier to make the indicator more or less sensitive based on market conditions. A lower multiplier (e.g., 1.2) may increase signal frequency, while a higher multiplier (e.g., 2.0) reduces it.
Originality:
The Trend CCI (TCCI) stands out due to its combination of the CCI and ATR. While many indicators simply plot raw CCI values, this script enhances the CCI’s effectiveness by incorporating an ATR-based volatility filter. This ensures that only significant trends trigger signals, making it a more reliable tool in volatile markets. The choice of the ATR period, multiplier, and CCI period ensures a refined balance between trend detection and noise reduction, distinguishing it as a powerful trend-following indicator.
Additionally, the visual aspect—using color-coded trendlines that dynamically shift between green and red—simplifies the interpretation of market trends, offering traders a clear and immediate understanding of trend direction and momentum strength.
Final Recommendations:
Use in Trending Markets The TCCI is most effective in trending markets, where its signals align with broader market momentum. In sideways or low-volatility markets, consider adjusting the ATR multiplier or using other complementary indicators to confirm the signals.
Risk Management: Always integrate robust risk management practices, such as using stop-loss orders and position sizing, to protect against sudden market reversals or periods of heightened volatility.
Adjust for Volatility: Consider the volatility of the asset being traded. In highly volatile assets, a higher ATR multiplier (e.g., 2.0) may be necessary to filter out noise, while in more stable assets, a lower multiplier (e.g., 1.2) might generate earlier signals.
By using the Trend CCI (TCCI) indicator with a deeper understanding of its key parameters, traders can better identify trends, reduce noise, and improve their overall decision-making in the markets.
Good Profits!
DRIP Yearly PerformanceOverview: The DRIP Yearly Performance indicator is designed for long-term investors using Dividend Reinvestment Plans (DRIP). This script calculates both the total and average yearly performance of an asset, factoring in the reinvestment of dividends over time. It provides key insights into portfolio growth by tracking the number of accumulated units from dividend reinvestment and how this impacts overall performance.
Key Features:
Dividend Reinvestment (DRIP) Calculation: Automatically adjusts the number of units held by reinvesting dividends, enhancing the calculation of total returns.
Custom Start Date: Choose a custom start date to begin tracking performance from a specific time period, allowing for more tailored performance analysis.
Performance Metrics: Displays key metrics such as the initial investment value, current value, total performance percentage, and the average yearly performance, all in an easy-to-read table format.
Visual Representation: Plots accumulated units and overall performance on the chart, with customizable colors for clarity.
Inputs Explained:
Start Quantity: Define the initial number of units (shares) held at the start of the investment.
Dividend Type: Choose between tracking Net or Gross dividends for reinvestment purposes. Net is always better unless you have a special case and you need to base your calculations on gross.
Start Date: Select a custom date to begin tracking performance. This allows users to focus on performance from any historical point.
Table Size: Customize the size of the text in the performance table to suit your visual preferences.
Performance Line Color: Choose the color of the performance plot line that tracks the value of your investment over time.
Accumulator Line Color: Customize the color of the line that tracks the accumulated units (shares) due to reinvested dividends.
Who Can Benefit: This indicator is ideal for long-term investors and dividend growth investors who want to measure their investment returns over time while factoring in the effects of dividend reinvestment.
Use Cases:
Tracking Dividend Impact: See how reinvesting dividends enhances your overall portfolio value.
Custom Performance Analysis: Set a custom start date to analyze performance from a specific point in time.
Visualizing Growth: Use the chart's plots to visually track your growing number of shares (units) and overall performance.
Uptrick: Market MoodsThe "Uptrick: Market Moods" indicator is an advanced technical analysis tool designed for the TradingView platform. It combines three powerful indicators—Relative Strength Index (RSI), Average True Range (ATR), and Bollinger Bands—into one cohesive framework, aimed at helping traders better understand and interpret market sentiment. By capturing shifts in the emotional climate of the market, it provides a holistic view of market conditions, which can range from calm to stressed or even highly excited. This multi-dimensional analysis tool stands apart from traditional single-indicator approaches by offering a more complete picture of market dynamics, making it a valuable resource for traders looking to anticipate and react to changes in market behavior.
The RSI in the "Uptrick: Market Moods" indicator is used to measure momentum. RSI is an essential component of many technical analysis strategies, and in this tool, it is used to identify potential market extremes. When RSI values are high, they indicate an overbought condition, meaning the market may be approaching a peak. Conversely, low RSI values suggest an oversold condition, signaling that the market could be nearing a bottom. These extremes provide crucial clues about shifts in market sentiment, helping traders gauge whether the current emotional state of the market is likely to result in a reversal. This understanding is pivotal in predicting whether the market is transitioning from calm to stressed or from excited to overbought.
The Average True Range adds another layer to this analysis by offering insights into market volatility. Volatility is a key factor in understanding the mood of the market, as periods of high volatility often reflect high levels of excitement or stress, while low volatility typically indicates a calm, steady market. ATR is calculated based on the range of price movements over a given period, and the higher the value, the more volatile the market is. The "Uptrick: Market Moods" indicator uses ATR to dynamically gauge volatility levels, helping traders understand whether the market is currently moving in a way that aligns with its emotional mood. For example, an increase in ATR accompanied by an RSI value that indicates overbought conditions could suggest that the market is in a highly excited state, with the potential for either strong momentum continuation or a sharp reversal.
Bollinger Bands complement these tools by providing visual cues about price volatility and the range within which the market is likely to move. Bollinger Bands plot two standard deviations away from a simple moving average of the price. This banding technique helps traders visualize how far the price is likely to deviate from its average over a certain period. The "Uptrick: Market Moods" indicator uses Bollinger Bands to establish price boundaries and identify breakout conditions. When prices break above the upper band or below the lower band, it often signals that the market is either highly stressed or excited. This breakout condition serves as a visual representation of the market mood, alerting traders to moments when prices are moving beyond typical ranges and when significant emotional shifts are occurring in the market.
Technically, the "Uptrick: Market Moods" indicator has been developed using TradingView’s Pine Script language, a highly efficient language for building custom indicators. It employs functions like ta.rsi, ta.atr, and ta.sma to perform the necessary calculations. The use of these built-in functions ensures that the calculations are both accurate and efficient, allowing the indicator to operate in real-time without lagging, even in volatile market conditions. The ta.rsi function is used to compute the Relative Strength Index, while ta.atr calculates the Average True Range, and ta.sma is used to smooth out price data for the Bollinger Bands. These functions are applied dynamically within the script, allowing the "Uptrick: Market Moods" indicator to respond to changes in market conditions in real time.
The user interface of the "Uptrick: Market Moods" indicator is designed to provide a visually intuitive experience. The market mood is color-coded on the chart, making it easy for traders to identify whether the market is calm, stressed, or excited at a glance. This feature is especially useful for traders who need to make quick decisions in fast-moving markets. Additionally, the indicator includes an interactive table that updates in real-time, showing the most recent mood state and its frequency. This provides valuable statistical insights into market behavior over specific time frames, helping traders track the dominant emotional state of the market. Whether the market is in a prolonged calm state or rapidly transitioning through moods, this real-time feedback offers actionable data that can help traders adjust their strategies accordingly.
The RSI component of the "Uptrick: Market Moods" indicator helps detect the speed and direction of price movements, offering insight into whether the market is approaching extreme conditions. By providing signals based on overbought and oversold levels, the RSI helps traders decide whether to enter or exit positions. The ATR element acts as a volatility gauge, dynamically adjusting traders’ expectations in response to changes in market volatility. Meanwhile, the Bollinger Bands help identify trends and potential breakout conditions, serving as an additional confirmation tool that highlights when the price has moved beyond normal boundaries, indicating heightened market excitement or stress.
Despite the robust capabilities of the "Uptrick: Market Moods" indicator, it does have limitations. In markets affected by sudden shifts, such as those driven by major news events or external economic factors, the indicator’s performance may not always be reliable. These external factors can cause rapid mood swings that are difficult for any technical analysis tool to fully anticipate. Additionally, the indicator’s complexity may pose a learning curve for novice traders, particularly those who are unfamiliar with the concepts of RSI, ATR, and Bollinger Bands. However, with practice, traders can become proficient in using the tool to its full potential, leveraging the insights it provides to better navigate market shifts.
For traders seeking a deeper understanding of market sentiment, the "Uptrick: Market Moods" indicator is an invaluable resource. It is recommended for those dealing with medium to high volatility instruments, where understanding emotional shifts can offer a strategic advantage. While it can be used on its own, integrating it with other forms of analysis, such as fundamental analysis and additional technical indicators, can enhance its effectiveness. By confirming signals with other tools, traders can reduce the likelihood of false signals and improve their overall trading strategy.
To further enhance the accuracy of the "Uptrick: Market Moods" indicator, it can be integrated with volume-based tools like Volume Profile or On-Balance Volume (OBV). This combination allows traders to confirm the moods identified by the indicator with volume data, providing additional confirmation of market sentiment. For example, when the market is in an excited mood, an increase in trading volume could reinforce the reliability of that signal. Conversely, if the market is stressed but volume remains low, traders may want to proceed with caution. Using multiple indicators together creates a more comprehensive trading approach, helping traders better manage risk and make informed decisions based on multiple data points.
In conclusion, the "Uptrick: Market Moods" indicator is a powerful and unique addition to the suite of technical analysis tools available on TradingView. It provides traders with a multi-dimensional view of market sentiment by combining the analytical strengths of RSI, ATR, and Bollinger Bands into a single tool. Its ability to capture and interpret the emotional mood of the market makes it an essential tool for traders seeking to gain an edge in understanding market behavior. While the indicator has certain limitations, particularly in rapidly shifting markets, its ability to provide real-time insights into market sentiment is a valuable asset for traders of all experience levels. Used in conjunction with other tools and sound trading practices, the "Uptrick: Market Moods" indicator offers a comprehensive solution for navigating the complexities of financial markets.
High Yield Spread Strategy with SMA FilterThis Pine Script strategy is designed for statistical analysis and research purposes only, not for live trading or financial decision-making. The script evaluates the relationship between financial volatility (measured by either the VIX or the High Yield Spread) and market positioning strategies (long or short) based on user-defined conditions. Specifically, it allows users to test the assumption that elevated levels of VIX or the High Yield Spread may justify short positions in the market—a widely held belief in financial circles—but this script demonstrates that shorting is not always the optimal choice, even under these conditions.
Key Components:
1. High Yield Spread and VIX:
• High Yield Spread is the difference between the yields of corporate high-yield (or “junk”) bonds and U.S. Treasury securities. A rising spread often reflects increased market risk perception.
• VIX (Volatility Index) is often referred to as the market’s “fear gauge.” Higher VIX levels usually indicate heightened market uncertainty or expected volatility.
2. Strategy Logic:
• The script allows users to specify a threshold for the VIX or High Yield Spread, and it automatically evaluates if the spread exceeds this level, which traditionally would suggest an environment for higher market risk and thus potentially favoring short trades.
• However, the strategy provides flexibility to enter long or short positions, even in a high-risk environment, emphasizing that a high VIX or High Yield Spread does not always warrant shorting.
3. SMA Filter:
• A Simple Moving Average (SMA) filter can be applied to the price data, where positions are only entered if the price is above or below the SMA (depending on the trade direction). This adds a technical component to the strategy, incorporating price trends into decision-making.
4. Hold Duration:
• The script also allows users to define how long to hold a position after entering, enabling an analysis of different timeframes.
Theoretical Background:
The traditional belief that high VIX or High Yield Spreads favor short positions is not universally supported by research. While a spike in the VIX or credit spreads is often associated with increased market risk, research suggests that excessive volatility does not always lead to negative returns. In fact, high volatility can sometimes signal an approaching market rebound.
For example:
• Studies have shown that long-term investments during periods of heightened volatility can yield favorable returns due to mean reversion. Whaley (2000) notes that VIX spikes are often followed by market recoveries as volatility tends to revert to its mean over time .
• Research by Blitz and Vliet (2007) highlights that low-volatility stocks have historically outperformed high-volatility stocks, suggesting that volatility may not always predict negative returns .
• Furthermore, credit spreads can widen in response to broader market stress, but these may overshoot the actual credit risk, presenting opportunities for long positions when spreads are high and risk premiums are mispriced .
Educational Purpose:
The goal of this script is to challenge assumptions about shorting during volatile periods, showing that long positions can be equally, if not more, effective during market stress. By incorporating an SMA filter and customizable logic for entering trades, users can test different hypotheses regarding the effectiveness of both long and short positions under varying market conditions.
Note: This strategy is not intended for live trading and should be used solely for educational and statistical exploration. Misinterpreting financial indicators can lead to incorrect investment decisions, and it is crucial to conduct comprehensive research before trading.
References:
1. Whaley, R. E. (2000). “The Investor Fear Gauge”. The Journal of Portfolio Management, 26(3), 12-17.
2. Blitz, D., & van Vliet, P. (2007). “The Volatility Effect: Lower Risk Without Lower Return”. Journal of Portfolio Management, 34(1), 102-113.
3. Bhamra, H. S., & Kuehn, L. A. (2010). “The Determinants of Credit Spreads: An Empirical Analysis”. Journal of Finance, 65(3), 1041-1072.
This explanation highlights the academic and research-backed foundation of the strategy and the nuances of volatility, while cautioning against the assumption that high VIX or High Yield Spread always calls for shorting.
Sector Performance v0.3Sector Performance Dashboard v0.3 (Work In Progress)
- Provides a comprehensive view of sector and stock performance across multiple timeframes
Features:
- Displays performance data for various Indian market sectors and their constituent stocks
- Allows selection of different sector groups (e.g., NIFTY, BANKNIFTY, CNXAUTO, etc.)
- Shows performance over four customizable time periods (default: Year, Quarter, Month, Week)
- Calculates percentage change for each time period
- Presents current price, 250-day high and low, and percentage distance from these extremes
- Uses color-coding to quickly identify positive (green) and negative (red) performance
- Adjustable text size for better visibility
- Functionality:
- Creates a table in the center of the chart
- Populates the table with up to 15 symbols per sector
- Updates data in real-time on daily timeframe
- Allows for easy comparison of different stocks within a sector
- User Inputs:
- Sector selection
- Four customizable date inputs for different time periods
- Adjustable text size for the table
- Use Cases:
- Quick sector rotation analysis
- Identifying outperforming and underperforming stocks within a sector
- Monitoring multiple timeframes simultaneously for comprehensive market view
- Assisting in stock screening and selection process
Enhanced MACD and RSI Buy/Sell Signals - Created by Marco NucupKey Features:
EMA Filter: Adds an Exponential Moving Average (EMA) to filter signals based on the trend. Buys are only considered when the price is above the EMA, and sells when below it.
Customizable Inputs: Users can adjust parameters for EMA, MACD, and RSI directly from the TradingView interface, allowing for more personalized strategies.
Alerts: The script includes alert conditions for both buy and sell signals, enabling users to receive notifications.
Signal Plotting: Visual indicators for buy and sell signals on the chart, along with the EMA line for trend reference.
Bitcoin Logarithmic Growth Curve 2024The Bitcoin logarithmic growth curve is a concept used to analyze Bitcoin's price movements over time. The idea is based on the observation that Bitcoin's price tends to grow exponentially, particularly during bull markets. It attempts to give a long-term perspective on the Bitcoin price movements.
The curve includes an upper and lower band. These bands often represent zones where Bitcoin's price is overextended (upper band) or undervalued (lower band) relative to its historical growth trajectory. When the price touches or exceeds the upper band, it may indicate a speculative bubble, while prices near the lower band may suggest a buying opportunity.
Unlike most Bitcoin growth curve indicators, this one includes a logarithmic growth curve optimized using the latest 2024 price data, making it, in our view, superior to previous models. Additionally, it features statistical confidence intervals derived from linear regression, compatible across all timeframes, and extrapolates the data far into the future. Finally, this model allows users the flexibility to manually adjust the function parameters to suit their preferences.
The Bitcoin logarithmic growth curve has the following function:
y = 10^(a * log10(x) - b)
In the context of this formula, the y value represents the Bitcoin price, while the x value corresponds to the time, specifically indicated by the weekly bar number on the chart.
How is it made (You can skip this section if you’re not a fan of math):
To optimize the fit of this function and determine the optimal values of a and b, the previous weekly cycle peak values were analyzed. The corresponding x and y values were recorded as follows:
113, 18.55
240, 1004.42
451, 19128.27
655, 65502.47
The same process was applied to the bear market low values:
103, 2.48
267, 211.03
471, 3192.87
676, 16255.15
Next, these values were converted to their linear form by applying the base-10 logarithm. This transformation allows the function to be expressed in a linear state: y = a * x − b. This step is essential for enabling linear regression on these values.
For the cycle peak (x,y) values:
2.053, 1.268
2.380, 3.002
2.654, 4.282
2.816, 4.816
And for the bear market low (x,y) values:
2.013, 0.394
2.427, 2.324
2.673, 3.504
2.830, 4.211
Next, linear regression was performed on both these datasets. (Numerous tools are available online for linear regression calculations, making manual computations unnecessary).
Linear regression is a method used to find a straight line that best represents the relationship between two variables. It looks at how changes in one variable affect another and tries to predict values based on that relationship.
The goal is to minimize the differences between the actual data points and the points predicted by the line. Essentially, it aims to optimize for the highest R-Square value.
Below are the results:
It is important to note that both the slope (a-value) and the y-intercept (b-value) have associated standard errors. These standard errors can be used to calculate confidence intervals by multiplying them by the t-values (two degrees of freedom) from the linear regression.
These t-values can be found in a t-distribution table. For the top cycle confidence intervals, we used t10% (0.133), t25% (0.323), and t33% (0.414). For the bottom cycle confidence intervals, the t-values used were t10% (0.133), t25% (0.323), t33% (0.414), t50% (0.765), and t67% (1.063).
The final bull cycle function is:
y = 10^(4.058 ± 0.133 * log10(x) – 6.44 ± 0.324)
The final bear cycle function is:
y = 10^(4.684 ± 0.025 * log10(x) – -9.034 ± 0.063)
The main Criticisms of growth curve models:
The Bitcoin logarithmic growth curve model faces several general criticisms that we’d like to highlight briefly. The most significant, in our view, is its heavy reliance on past price data, which may not accurately forecast future trends. For instance, previous growth curve models from 2020 on TradingView were overly optimistic in predicting the last cycle’s peak.
This is why we aimed to present our process for deriving the final functions in a transparent, step-by-step scientific manner, including statistical confidence intervals. It's important to note that the bull cycle function is less reliable than the bear cycle function, as the top band is significantly wider than the bottom band.
Even so, we still believe that the Bitcoin logarithmic growth curve presented in this script is overly optimistic since it goes parly against the concept of diminishing returns which we discussed in this post:
This is why we also propose alternative parameter settings that align more closely with the theory of diminishing returns.
Our recommendations:
Drawing on the concept of diminishing returns, we propose alternative settings for this model that we believe provide a more realistic forecast aligned with this theory. The adjusted parameters apply only to the top band: a-value: 3.637 ± 0.2343 and b-parameter: -5.369 ± 0.6264. However, please note that these values are highly subjective, and you should be aware of the model's limitations.
Conservative bull cycle model:
y = 10^(3.637 ± 0.2343 * log10(x) - 5.369 ± 0.6264)
Nifty Dashboard//@version=5
//Author @GODvMarkets
indicator("GOD NSE Nifty Dashboard", "Nifty Dashboard")
i_timeframe = input.timeframe("D", "Timeframe")
// if not timeframe.isdaily
// runtime.error("Please switch timeframe to Daily")
i_text_size = input.string(size.auto, "Text Size", )
//-----------------------Functions-----------------------------------------------------
f_oi_buildup(price_chg_, oi_chg_) =>
switch
price_chg_ > 0 and oi_chg_ > 0 =>
price_chg_ > 0 and oi_chg_ < 0 =>
price_chg_ < 0 and oi_chg_ > 0 =>
price_chg_ < 0 and oi_chg_ < 0 =>
=>
f_color(val_) => val_ > 0 ? color.green : val_ < 0 ? color.red : color.gray
f_bg_color(val_) => val_ > 0 ? color.new(color.green,80) : val_ < 0 ? color.new(color.red,80) : color.new(color.black,80)
f_bg_color_price(val_) =>
fg_color_ = f_color(val_)
abs_val_ = math.abs(val_)
transp_ = switch
abs_val_ > .03 => 40
abs_val_ > .02 => 50
abs_val_ > .01 => 60
=> 80
color.new(fg_color_, transp_)
f_bg_color_oi(val_) =>
fg_color_ = f_color(val_)
abs_val_ = math.abs(val_)
transp_ = switch
abs_val_ > .10 => 40
abs_val_ > .05 => 50
abs_val_ > .025 => 60
=> 80
color.new(fg_color_, transp_)
f_day_of_week(time_=time) =>
switch dayofweek(time_)
1 => "Sun"
2 => "Mon"
3 => "Tue"
4 => "Wed"
5 => "Thu"
6 => "Fri"
7 => "Sat"
//-------------------------------------------------------------------------------------
var table table_ = table.new(position.middle_center, 22, 20, border_width = 1)
var cols_ = 0
var text_color_ = color.white
var bg_color_ = color.rgb(1, 5, 19)
f_symbol(idx_, symbol_) =>
symbol_nse_ = "NSE" + ":" + symbol_
fut_cur_ = "NSE" + ":" + symbol_ + "1!"
fut_next_ = "NSE" + ":" + symbol_ + "2!"
= request.security(symbol_nse_, i_timeframe, [close, close-close , close/close -1, volume], ignore_invalid_symbol = true, lookahead = barmerge.lookahead_on)
= request.security(fut_cur_, i_timeframe, , ignore_invalid_symbol = true, lookahead = barmerge.lookahead_on)
= request.security(fut_next_, i_timeframe, , ignore_invalid_symbol = true, lookahead = barmerge.lookahead_on)
= request.security(fut_cur_ + "_OI", i_timeframe, [close, close-close ], ignore_invalid_symbol = true, lookahead = barmerge.lookahead_on)
= request.security(fut_next_ + "_OI", i_timeframe, [close, close-close ], ignore_invalid_symbol = true, lookahead = barmerge.lookahead_on)
stk_vol_ = stk_vol_nse_
fut_vol_ = fut_cur_vol_ + fut_next_vol_
fut_oi_ = fut_cur_oi_ + fut_next_oi_
fut_oi_chg_ = fut_cur_oi_chg_ + fut_next_oi_chg_
fut_oi_chg_pct_ = fut_oi_chg_ / fut_oi_
fut_stk_vol_x_ = fut_vol_ / stk_vol_
fut_vol_oi_action_ = fut_vol_ / math.abs(fut_oi_chg_)
= f_oi_buildup(chg_pct_, fut_oi_chg_pct_)
close_color_ = fut_cur_close_ > fut_vwap_ ? color.green : fut_cur_close_ < fut_vwap_ ? color.red : text_color_
if barstate.isfirst
row_ = 0, col_ = 0
table.cell(table_, col_, row_, "Symbol", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "Close", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "VWAP", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "Pts", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "Stk Vol", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "Fut Vol", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "Fut/Stk Vol", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "OI Cur", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "OI Next", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "OI Cur Chg", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "OI Next Chg", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "COI ", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "COI Chg", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "Vol/OI Chg", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "COI Chg%", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "Pr.Chg%", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
table.cell(table_, col_, row_, "OI Buildup", text_color = text_color_, bgcolor = bg_color_, text_size = i_text_size), col_ += 1
cell_color_ = color.white
cell_bg_color_ = color.rgb(1, 7, 24)
if barstate.islast
row_ = idx_, col_ = 0
table.cell(table_, col_, row_, str.format("{0}", symbol_), text_color = f_color(chg_pct_), bgcolor = f_bg_color_price(chg_pct_), text_size = i_text_size, text_halign = text.align_left), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#.00}", fut_cur_close_), text_color = close_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#.00}", fut_vwap_), text_color = cell_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,0.00}", chg_pts_), text_color = cell_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#,###}", stk_vol_), text_color = cell_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#,###}", fut_vol_), text_color = cell_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,0.00}", fut_stk_vol_x_), text_color = cell_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#,###}", fut_cur_oi_), text_color = cell_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#,###}", fut_next_oi_), text_color = cell_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#,###}", fut_cur_oi_chg_), text_color = f_color(fut_cur_oi_chg_), bgcolor = f_bg_color(fut_cur_oi_chg_), text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#,###}", fut_next_oi_chg_), text_color = f_color(fut_next_oi_chg_), bgcolor = f_bg_color(fut_next_oi_chg_), text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#,###}", fut_oi_), text_color = cell_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,#,###}", fut_oi_chg_), text_color = f_color(fut_oi_chg_), bgcolor = f_bg_color(fut_oi_chg_), text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,0.00}", fut_vol_oi_action_), text_color = cell_color_, bgcolor = cell_bg_color_, text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,0.00%}", fut_oi_chg_pct_), text_color = f_color(fut_oi_chg_pct_), bgcolor = f_bg_color_oi(fut_oi_chg_pct_), text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0,number,0.00%}", chg_pct_), text_color = f_color(chg_pct_), bgcolor = f_bg_color_price(chg_pct_), text_size = i_text_size, text_halign = text.align_right), col_ += 1
table.cell(table_, col_, row_, str.format("{0}", oi_buildup_), text_color = oi_buildup_color_, bgcolor = color.new(oi_buildup_color_,80), text_size = i_text_size, text_halign = text.align_left), col_ += 1
idx_ = 1
f_symbol(idx_, "BANKNIFTY"), idx_ += 1
f_symbol(idx_, "NIFTY"), idx_ += 1
f_symbol(idx_, "CNXFINANCE"), idx_ += 1
f_symbol(idx_, "RELIANCE"), idx_ += 1
f_symbol(idx_, "HDFC"), idx_ += 1
f_symbol(idx_, "ITC"), idx_ += 1
f_symbol(idx_, "HINDUNILVR"), idx_ += 1
f_symbol(idx_, "INFY"), idx_ += 1
Simplified Gap Strategy with SMA FilterThe Simplified Gap Strategy leverages price gaps as a trading signal, focusing on their significance in market behavior. Gaps occur when the opening price of a security differs significantly from the previous closing price, often signaling potential continuation or reversal patterns.
Key Features:
Gap Threshold:
This strategy requires a minimum percentage gap (defined by the user) to qualify for trading signals.
Directional Trading:
Users can select from various gap types, including "Long Up Gap" and "Short Down Gap," allowing for tailored trading approaches.
SMA Filter:
An optional Simple Moving Average (SMA) filter helps refine trade entries based on trend direction, increasing the probability of successful trades.
Hold Duration:
Positions can be held for a user-defined duration, providing flexibility in trade management.
Statistical Significance of Gaps:
Research has shown that gaps can provide insights into future price movements. According to studies such as those by Hutton and Jiang (2008), price gaps are often followed by momentum in the direction of the gap, indicating that they can serve as reliable indicators for traders. The "Gap Theory" suggests that gaps are filled approximately 90% of the time, emphasizing their relevance in market dynamics (Nikkinen, Sahlström, & Kinnunen, 2006).
Important Note:
This strategy is designed solely for statistical analysis and should not be construed as financial advice. Users are encouraged to conduct their own research and analysis before applying this strategy in live trading scenarios.
By understanding the underlying mechanisms of price gaps and their statistical significance, traders can enhance their decision-making processes and potentially improve trading outcomes.
References:
Hutton, A. W., & Jiang, W. (2008). "Price Gaps: A Guide to Trading Gaps."
Nikkinen, J., Sahlström, P., & Kinnunen, J. (2006). "The Gaps in Financial Markets: An Empirical Study."
This description provides an overview of the strategy while emphasizing its analytical purpose and backing it with relevant academic insights.
CANSLIM Screener [TrendX_]INTRODUCTION:
The CANSLIM investment strategy, developed by William J. O'Neil, is a powerful tool for identifying growth stocks that have the potential to outperform the market. TrendX has enhanced this approach with its unique indicators, making it easier for investors to assess stocks based on seven critical criteria.
➊ C: Current Quarterly EPS or PE with Growth Benchmark
The first criterion focuses on the Earnings Per Share (EPS) growth in the most recent quarter compared to previous quarters. A company should demonstrate significant EPS growth, ideally exceeding expectations and benchmarks within its industry.
➋ A: Average Annual EPS Growth with Growth Benchmark
This aspect evaluates a company's average annual EPS growth over the last three years. A consistent upward trend suggests that the company is effectively increasing its profitability. TrendX provides a customizable benchmark to help investors identify firms with sustainable growth trajectories.
➌ N: New Highs or New Product Development
TrendX interprets this criterion through an Annual Research & Development to Revenue Ratio (RNDR). A decreasing RNDR ratio may indicate that a company is finishing new products, which could lead to reduced revenue if product launches are unsuccessful.
➍ S: Supply and Demand
This component assesses supply and demand dynamics by analyzing the movement of Float Shares Outstanding. A decrease in float shares typically indicates higher demand for the stock, suggesting that the company is in good shape for future growth.
➎ L: Leader
TrendX employs comparative analysis between the Relative Strength Index (RSI) of a company and that of the overall market. If a company's RSI is higher than the market's, it signifies that the stock is leading rather than lagging.
➏ I: Institutional Sponsorship
Institutional sponsorship is gauged through the total dividends paid by a company. High dividend payouts can signal strong institutional interest, support and confidence in the company's future prospects.
➐ M: Market Direction
TrendX evaluates market direction by comparing a company's RSI against its Moving Average of RSI, along with utilizing Market Structure in Smart Money Concept indicator for alternative trend insights.
HOW TO USE
The TrendX CANSLIM indicator provides an evaluation score based on each of the seven criteria outlined above, which displays in a table containing:
Scoring System: Each letter in CANSLIM contributes to a total score out of 100%. A stock does not need to meet all seven criteria; achieving a score above 70% (5 out of 7) is generally considered indicative of a promising growth stock.
Screening Feature: The tool includes a screening feature that evaluates multiple stocks simultaneously, allowing investors to compare their CANSLIM scores efficiently. This feature streamlines identifying potential investment opportunities across various sectors.
DISCLAIMER
This indicator is not financial advice, it can only help traders make better decisions. There are many factors and uncertainties that can affect the outcome of any endeavor, and no one can guarantee or predict with certainty what will occur.
Therefore, one should always exercise caution and judgment when making decisions based on past performance.
ATR+StdTR Band and Trailing StopThis Pine Script code plots the "ATR+StdTR Band and Trailing Stop," serving as a tool for volatility-based risk management and trend detection. While bands are typically set using a multiple of ATR, this script uses StdTR (the True Range standard deviation) and sets the band width based on ±(ATR + n times StdTR). StdTR is a great tool for detecting price volatility and anomalies, allowing traders to adapt to rapid changes in extreme market conditions. This helps traders proactively manage risk during sudden market fluctuations.
The following features are provided:
Table Display
A table is shown on the chart, allowing traders to visually track the current ATR value, StdTR (σ), and the long/short stop-loss levels (±ATR ± nσ). This enables real-time monitoring of risk management data.
Band Plots
The script plots bands that combine ATR with StdTR (nσ).
The upper and lower bands are calculated using the previous candle’s closing price (the source is customizable) and are plotted as ±(ATR + nσ), providing a clear visual of the price range.
ATR ± nσ Trailing Stop
The trailing stop dynamically adjusts the stop-loss levels based on price movements. In an uptrend, the stop-loss rises, while in a downtrend, it lowers, helping traders lock in profits while minimizing losses during significant reversals.
Breakout Detection
Breakouts are detected when the price exceeds the upper band or drops below the lower band. A visual marker (X) is displayed on the chart, allowing traders to quickly recognize when the price has moved beyond normal volatility ranges, making it easier to respond to trend formations or reversals.
Customization Points:
The ATR period and StdTR (n) are fully customizable.
The source for ATR band calculation can be adjusted, allowing traders to choose from close, open, high, low, etc.
The table’s display position and design (text color, size, etc.) can be customized to present the information clearly and effectively.