Relative StrengthThis strategy employs a custom "strength" function to assess the relative strength of a user-defined source (e.g., closing price, moving average) compared to its historical performance over various timeframes (8, 34, 20, 50, and 200 periods). The strength is calculated as a percentage change from an Exponential Moving Average (EMA) for shorter timeframes and a Simple Moving Average (SMA) for longer timeframes. Weights are then assigned to each timeframe based on a logarithmic scale, and a weighted average strength is computed.
Key Features:
Strength Calculation:
Calculates the relative strength of the source using EMAs and SMAs over various timeframes.
Assigns weights to each timeframe based on a logarithmic scale, emphasizing shorter timeframes.
Calculates a weighted average strength for a comprehensive view.
Visualizations:
Plots the calculated strength as a line, colored green for positive strength and red for negative strength.
Fills the background area below the line with green for positive strength and red for negative strength, enhancing visualization.
Comparative Analysis:
Optionally displays the strength of Bitcoin (BTC), Ethereum (ETH), S&P 500, Nasdaq, and Dow Jones Industrial Average (DJI) for comparison with the main source strength.
Backtesting:
Allows users to specify a start and end time for backtesting the strategy's performance.
Trading Signals:
Generates buy signals when the strength turns positive from negative and vice versa for sell signals.
Entry and exit are conditional on the backtesting time range.
Basic buy and sell signal plots are commented out (can be uncommented for visual representation).
Risk Management:
Closes all open positions and cancels pending orders outside the backtesting time range.
Disclaimer:
Backtesting results do not guarantee future performance. This strategy is for educational purposes only and should be thoroughly tested and refined before risking capital.
Additional Notes:
- The strategy uses a custom "strength" function that can be further customized to explore different timeframes and weighting schemes.
- Consider incorporating additional technical indicators or filters to refine the entry and exit signals.
- Backtesting with different parameters and market conditions is crucial for evaluating the strategy's robustness.
อินดิเคเตอร์และกลยุทธ์
Enigma Endgame with Dynamic Trend-Based FibonacciThe Enigma Endgame script combines dynamic trend-based Fibonacci levels with the core principles of the ENIGMA strategy. It provides traders with actionable signals by identifying key levels of fractal support and resistance and highlighting opportunities to trade with market momentum. This tool is designed for multi-timeframe analysis and is especially effective during high-volatility sessions like London and New York.
Purpose and Usefulness
This script was developed to simplify complex market dynamics by integrating Fibonacci principles with ENIGMA's logic of fractal support and resistance. Traders can use it to:
- Identify key breakout and retracement levels dynamically.
- Understand the shift between support and resistance as price action evolves.
- Gain confidence in their entries with real-time signals derived from logical fractal behavior.
By merging Fibonacci levels with fractal-based trading insights, this script offers a unique and comprehensive approach to analyzing market structure.
How It Works
The script uses a dual approach to provide insights:
1. Dynamic Fibonacci Levels:
- Automatically plots Fibonacci retracement and extension levels based on recent high and low swings, adjusting dynamically to current market trends.
- Allows traders to visualize key levels where price might reverse or extend.
2. Fractal Support and Resistance Logic:
- The script identifies fractal support and resistance by analyzing candle formations.
- When a candle body closes below the low of a previous candle, the previous low, which was fractal support, now becomes fractal resistance. The script generates a bearish signal, encouraging traders to look for sell opportunities at or above the previous low.
- Conversely, when a candle body closes above the high of a previous candle, the previous high, which was fractal resistance, becomes fractal support. The script generates a bullish signal, encouraging traders to look for buy opportunities at or below the previous high.
Real-Time Signals
The script marks these transitions with arrows on the chart:
- Bearish arrows indicate broken fractal support turning into resistance.
- Bullish arrows** indicate broken fractal resistance turning into support.
These signals help traders stay aligned with the trend and trade with market momentum.
Key Features
1. Session-Based Analysis: Focuses on high-probability setups by allowing traders to customize session times, such as London or US sessions.
2. Multi-Timeframe Support: Works seamlessly across multiple timeframes for both scalpers and swing traders.
3. Real-Time Alerts: Sends customizable alerts when price interacts with critical Fibonacci levels or fractal support/resistance shifts.
How to Use the Script
1. Apply the script to a clean chart for clear visualization. Avoid combining it with other scripts unless necessary.
2. Use the arrows to identify shifts in fractal support and resistance and validate opportunities for buy/sell trades.
3. Monitor the dynamic Fibonacci levels to find confluence with key price areas.
4. Customize session times to focus on high-probability trading hours.
Key Notes for Traders
- This script provides insights based on logical market structure but should be used alongside proper risk management and trading plans.
- The fractal-based approach works well in conjunction with dynamic Fibonacci levels, helping traders build confidence in their strategy.
- Adapt the script settings to match your unique trading style and timeframe preferences.
By offering a seamless integration of fractal logic and Fibonacci principles, Enigma Endgame empowers traders with actionable insights to navigate markets effectively.
GROK - 40 Day High BreakoutTitle: GROK - Customizable High Breakout Detector
To scan base breakout with Pine Screener
Description:
This Pine Script indicator identifies high breakout patterns based on a user-defined lookback period. By default, it checks for a breakout of the 40-day high, but the period can be adjusted to suit your trading strategy. Key features include:
Custom Lookback Period: Easily modify the number of days for high breakout detection. Lookback period is length of base you want to scan using pine screener.
Visual Alerts: Displays a green triangle above the price bar when a breakout is detected.
Alert Conditions: Built-in alert notifications for automated breakout detection.
Screener Compatibility: Plots breakout signals as a histogram for screener use.
This script is ideal for traders looking to identify strong breakout patterns and incorporate them into their strategies.
How to Use:
Adjust the lookback period in the settings to match your desired breakout criteria.
Add alerts for automated notifications when a breakout is detected.
Use the visual markers and histogram to analyze breakout patterns on your chart.
Lot size calculator for futuresEasily and quickly calculate lot sizes with this unique indicator for futures trading. Whether you're dealing with full contracts or micro contracts, this tool simplifies the process by allowing you to input your account balance, risk percentage, and stop loss in pips. The indicator then automatically calculates the optimal number of contracts to trade based on your risk parameters. Designed for both novice and experienced traders, it ensures precise risk management and enhances your trading strategy. Experience the ease and efficiency of lot size calculation like never before!
Levels Strength Index [BigBeluga]Levels Strength Index provides a unique perspective on market strength by comparing price positions relative to predefined levels, delivering a dynamic probability-based outlook for potential up and down moves.
🔵 Idea:
The Levels Strength Index analyzes the price position against a series of calculated levels, assigning probabilities for upward and downward movements. These probabilities are displayed in percentage form, providing actionable insights into market momentum and strength. The color-coded display visually reinforces whether the price is predominantly above or below key levels, simplifying trend analysis.
🔵 Key Features:
Dynamic Probability Calculation: The indicator compares the current price position relative to 10 predefined levels, assigning an "Up" and "Down" percentage. For example, if the price is above 8 levels, it will display 80% upward and 20% downward probabilities.
Color-Coded Trend Visualization: When the price is above the majority of levels, the display turns green, signaling strength. Conversely, when below, it shifts to orange, reflecting bearish momentum.
Clear Up/Down Probability Labels: Probabilities are displayed with directional arrows next to the price, instantly showing the likelihood of upward or downward moves.
Probability-Based Price Line: The price line is color-coded based on the probability percentages, allowing a quick glance at the prevailing trend and market strength. This can be toggled in the settings.
Customizable Transparency: Adjust the transparency of the levels to seamlessly integrate the indicator with your preferred chart setup.
Fully Configurable: Control key parameters such as the length of levels and price color mode (trend, neutral, or none) through intuitive settings.
🔵 When to Use:
The Levels Strength Index is ideal for traders looking to:
Identify strong upward or downward market momentum using quantified probabilities.
Visualize price strength relative to key levels with intuitive color coding.
Supplement existing level-based strategies by combining probabilities and market positioning.
Gain instant clarity on potential market moves with percentage-based insights.
Whether you're trading trends or ranges, this tool enhances decision-making by combining level-based analysis with a dynamic probability system, offering a clear, actionable perspective on market behavior.
Compare TOTAL, TOTAL2, TOTAL3, and OTHERSCompare TOTAL, TOTAL2, TOTAL3, and OTHERS
This indicator compares the performance of major cryptocurrency market cap indices: TOTAL, TOTAL2, TOTAL3, and OTHERS. It normalizes each index's performance relative to its starting value and visualizes their relative changes over time.
Features
- Normalized Performance: Tracks the percentage change of each index from its initial value.
- Customizable Timeframe: Allows users to select a base timeframe for the data (e.g., daily, weekly).
- Dynamic Labels: Displays the latest performance of each index as a label on the chart, aligned to the right of the corresponding line for easy comparison.
- Color-Coded Lines: Each index is assigned a distinct color for clear differentiation:
-- TOTAL (Blue): Represents the total cryptocurrency market cap.
-- TOTAL2 (Green): Excludes Bitcoin.
-- TOTAL3 (Orange): Excludes Bitcoin and Ethereum.
-- OTHERS (Red): Represents all cryptocurrencies excluding the top 10 by market cap.
- Baseline Reference: Includes a horizontal line at 0% for reference.
Use Cases:
- Market Trends: Identify which segments of the cryptocurrency market are outperforming or underperforming over time.
- Portfolio Insights: Assess the impact of Bitcoin and Ethereum dominance on the broader market.
- Market Analysis: Compare smaller-cap coins (OTHERS) with broader indices (TOTAL, TOTAL2, and TOTAL3).
This script is ideal for traders and analysts who want a quick, visual way to track how different segments of the cryptocurrency market perform relative to each other over time.
Note: The performance is normalized to highlight percentage changes, not absolute values.
Fibonacci Retracement and Target LevelsHighest and Lowest Price Points:
The script calculates the highest (high_price) and lowest (low_price) prices in the specified timeframe. These values are essential for computing the Fibonacci retracement and extension levels.
Fibonacci Retracement Levels:
fib_0: 0% level (highest price).
fib_236, fib_382, fib_50, fib_618, and fib_100: These are the classic Fibonacci retracement levels used to identify potential support or resistance areas as the price retraces from its highest point.
Fibonacci Extension Levels (Targets):
fib_1618, fib_2618, and fib_4236: These are Fibonacci extension levels used to predict potential price targets in the direction of the trend if the price breaks beyond its current range.
Drawing the Levels:
The line.new function is used to draw horizontal lines on the chart representing the Fibonacci retracement and extension levels.
Dashed lines represent retracement levels.
Dotted lines represent extension (target) levels.
How to Use:
Create a new Pine Script in TradingView.
Paste the code above into the Pine Script editor.
Save the script and apply it to your chart to see Fibonacci retracement and extension levels plotted.
Santa's Adventure [AlgoAlpha]Introducing "Santa's Adventure," a unique and festive TradingView indicator designed to bring the holiday spirit to your trading charts. With this indicator, watch as Santa, his sleigh, Rudolf the reindeer, and a flurry of snowflakes come to life, creating a cheerful visual experience while you monitor the markets.
Key Features:
🎁 Dynamic Santa Sleigh Visualization : Santa's sleigh, Rudolf, and holiday presents adapt to price movements and chart structure.
🎨 Customizable Holiday Colors : Adjust colors for Santa’s outfit, Rudolf’s nose, sleigh, presents, and more.
❄️ Realistic Snow Animation : A cascade of snowflakes decorates your charts, with density and range adjustable to suit your preferences.
📏 Adaptive Scaling : All visuals scale based on price volatility and market dynamics.
🔄 Rotation by Trend : Santa and his entourage tilt to reflect market trends, making it both functional and fun!
How to Use :
Add the Indicator to Your Chart : Search for "Santa's Adventure" in the TradingView indicator library and add it to your favorites. Use the input menu to adjust snow density, sleigh colors, and other festive elements to match your trading style or holiday mood.
Observe the Market : Watch Santa’s sleigh glide across the chart while Rudolf leads the way, with snowflakes gently falling to enhance the visual charm.
How It Works :
The indicator uses price volatility and market data to dynamically position Santa, his sleigh, Rudolf, and presents on the chart. Santa's Sleigh angle adjusts based on price trends, reflecting market direction. Santa's sleigh and the snowstorm are plotted using advanced polyline arrays for a smooth and interactive display. A festive algorithm powers the snowfall animation, ensuring a consistent and immersive holiday atmosphere. The visuals are built to adapt seamlessly to any market environment, combining holiday cheer with market insights.
Add "Santa's Adventure" to your TradingView charts today and bring the holiday spirit to your trading journey, Merry Christmas! 🎅🎄
Filtered ATR with EMA OverlayFiltered ATR with EMA Overlay is an advanced volatility indicator designed to provide a more accurate representation of market conditions by smoothing the standard Average True Range (ATR). This is achieved by filtering out extreme price movements and abnormal bars that can distort traditional ATR calculations.
The indicator applies an Exponential Moving Average (EMA) to the filtered ATR, creating a dual-layered system that highlights periods of increased or decreased volatility.
Key Features:
Filtered ATR: Filters out extreme bars, reducing noise and making the ATR line more reliable.
EMA Overlay: An EMA (default period of 10) is applied to the filtered ATR, allowing traders to track average volatility trends.
Volatility Signals:
Filtered ATR > EMA(10): Indicates higher-than-average volatility. This often correlates with trend breakouts or strong price movements.
Filtered ATR < EMA(10): Suggests reduced volatility, signaling potential consolidation or sideways price action.
Parameters:
atrLength (Default: 5):
The number of bars used to calculate the ATR. A shorter period (e.g., 3-5) responds faster to price changes, while a longer period (e.g., 10-14) provides smoother results.
multiplier (Default: 1.8):
Controls the sensitivity of the filter. A lower multiplier (e.g., 1.5) filters out more bars, resulting in smoother ATR. Higher values (e.g., 2.0) allow more bars to pass through, retaining more price volatility.
maxIterations (Default: 20):
The maximum number of bars processed to detect abnormal values. Increasing this may improve accuracy at the cost of performance.
ema10Period (Default: 10):
The period for the Exponential Moving Average applied to the filtered ATR. Shorter periods provide faster signals, while longer periods give smoother, lagging signals.
Trading Strategies:
1. Breakout Strategy:
When filtered ATR crosses above EMA(10):
Enter long positions when price breaks above a key resistance level.
Higher volatility suggests strong price action and momentum.
When filtered ATR drops below EMA(10):
Exit positions or tighten stop-loss orders as volatility decreases.
Lower volatility may indicate consolidation or trend exhaustion.
2. Trend Following Strategy:
Use the filtered ATR line to track overall volatility.
If filtered ATR consistently stays above EMA: Hold positions or add to trades.
If filtered ATR remains below EMA: Reduce position size or stay out of trades.
3. Mean Reversion Strategy:
When filtered ATR spikes significantly above EMA, it may indicate market overreaction.
Look for price to revert to the mean once ATR returns below the EMA.
4. Stop-Loss Adjustment:
As volatility increases (ATR above EMA), widen stop-loss levels to avoid being stopped out by random fluctuations.
In low volatility (ATR below EMA), tighten stop-losses to minimize losses during low activity periods.
Benefits:
Reduced Noise: By filtering abnormal bars, the indicator provides cleaner signals.
Better Trend Detection: EMA smoothing highlights volatility trends.
Adaptable: The indicator can be customized for scalping, day trading, or swing trading.
Intuitive Visualization: Traders can visually see volatility shifts and adjust strategies in real-time.
Best Practices:
Timeframes: Works effectively on all timeframes, but higher timeframes (e.g., 1H, 4H, Daily) yield more reliable signals.
Markets: Suitable for forex, crypto, stocks, and commodities.
Combining Indicators: Use in combination with RSI, Moving Averages, Bollinger Bands, or price action analysis for stronger signals.
How It Works (Under the Hood):
The script calculates the Daily Range (High - Low) for each bar.
The largest and smallest bars are filtered out if their difference exceeds the multiplier (default 1.8).
The remaining bars are averaged to generate the filtered ATR.
An EMA(10) is then applied to the filtered ATR for smoother visualization.
Breakout Master//@version=5
indicator('Breakout Master', overlay=true)
bullishBar = 1
bearishBar = -1
var inside_bar = array.new_int(0)
var inside_bar_high = array.new_float(0)
var inside_bar_low = array.new_float(0)
var motherCandleIndex = 0
var motherCandleHigh = 0.0
var motherCandleLow = 0.0
var motherCandleRange = 0.0
var target1Buy = 0.0
var target2Buy = 0.0
var target1Sell = 0.0
var target2Sell = 0.0
var motherCandleH = line.new(na, na, na, na, extend=extend.right, color=color.green)
var motherCandleL = line.new(na, na, na, na, extend=extend.right, color=color.red)
var motherCandleHLabel = label.new(na, na, style=label.style_label_left, textcolor=color.green, color=color.new(color.green, 80))
var motherCandleLLabel = label.new(na, na, style=label.style_label_left, textcolor=color.red, color=color.new(color.red, 80))
var longT1 = line.new(na, na, na, na, extend=extend.right)
var longT2 = line.new(na, na, na, na, extend=extend.right)
var shortT1 = line.new(na, na, na, na, extend=extend.right)
var shortT2 = line.new(na, na, na, na, extend=extend.right)
var longT1Label = label.new(na, na, textcolor=color.blue, style=label.style_label_left, color=color.new(color.blue, 80))
var longT2Label = label.new(na, na, textcolor=color.blue, style=label.style_label_left, color=color.new(color.blue, 80))
var shortT1Label = label.new(na, na, textcolor=color.blue, style=label.style_label_left, color=color.new(color.blue, 80))
var shortT2Label = label.new(na, na, textcolor=color.blue, style=label.style_label_left, color=color.new(color.blue, 80))
var longT1Line = input.bool(title='Show Long T1', defval=true, group='Long')
var longT2Line = input.bool(title='Show Long T2', defval=true, group='Long')
var shortT1Line = input.bool(title='Show Short T1', defval=true, group='Short')
var shortT2Line = input.bool(title='Show Short T2', defval=true, group='Short')
var longT1Range = input.float(title='Long T1', defval=1, group='Long (x times above range of mother candle)', tooltip='Line will be plotted above high of mother candle. If value entered is 1, then T1 = range of mother candle x 1')
var longT2Range = input.float(title='Long T2', defval=1.5, group='Long (x times above range of mother candle)', tooltip='Line will be plotted above high of mother candle. If value entered is 2, then T2 = range of mother candle x 2')
var shortT1Range = input.float(title='Short T1', defval=1, group='Short (x times below range of mother candle)', tooltip='Line will be plotted below low of mother candle. If value entered is 1, then T1 = range of mother candle x 1')
var shortT2Range = input.float(title='Short T2', defval=1.5, group='Short (x times below range of mother candle)', tooltip='Line will be plotted below low of mother candle. If value entered is 2, then T2 = range of mother candle x 1')
hi = high
lo = low
op = open
cl = close
isInside() =>
previousBar = 1
bodyStatus = cl >= op ? 1 : -1
isInsidePattern = hi < hi and lo > lo
isInsidePattern ? bodyStatus : 0
newDay = ta.change(time('D'))
if newDay
array.clear(inside_bar)
array.clear(inside_bar_high)
array.clear(inside_bar_low)
if isInside() and array.size(inside_bar) <= 0
array.push(inside_bar, bar_index)
array.push(inside_bar_high, hi )
array.push(inside_bar_low, lo )
if barstate.islast and array.size(inside_bar) > 0
motherCandleIndex := array.get(inside_bar, 0) - 1
motherCandleHigh := array.get(inside_bar_high, 0)
motherCandleLow := array.get(inside_bar_low, 0)
motherCandleRange := motherCandleHigh - motherCandleLow
target1Buy := motherCandleHigh + longT1Range * motherCandleRange
target2Buy := motherCandleHigh + longT2Range * motherCandleRange
target1Sell := motherCandleLow - shortT1Range * motherCandleRange
target2Sell := motherCandleLow - shortT2Range * motherCandleRange
// mother candle high
line.set_xy1(motherCandleH, motherCandleIndex, motherCandleHigh)
line.set_xy2(motherCandleH, bar_index, motherCandleHigh)
label.set_xy(motherCandleHLabel, bar_index + 5, motherCandleHigh)
label.set_text(id=motherCandleHLabel, text='Range High - ' + str.tostring(motherCandleHigh))
//mother candle low
line.set_xy1(motherCandleL, motherCandleIndex, motherCandleLow)
line.set_xy2(motherCandleL, bar_index, motherCandleLow)
label.set_xy(motherCandleLLabel, bar_index + 5, motherCandleLow)
label.set_text(id=motherCandleLLabel, text='Range Low - ' + str.tostring(motherCandleLow))
//long target 1
if longT1Line
line.set_xy1(longT1, motherCandleIndex, target1Buy)
line.set_xy2(longT1, bar_index, target1Buy)
label.set_xy(longT1Label, bar_index + 5, target1Buy)
label.set_text(id=longT1Label, text='T1 - ' + str.tostring(target1Buy) + ' (' + str.tostring(longT1Range * motherCandleRange) + ') points')
//long target 2
if longT2Line
line.set_xy1(longT2, motherCandleIndex, target2Buy)
line.set_xy2(longT2, bar_index, target2Buy)
label.set_xy(longT2Label, bar_index + 5, target2Buy)
label.set_text(id=longT2Label, text='T2 - ' + str.tostring(target2Buy) + ' (' + str.tostring(longT2Range * motherCandleRange) + ') points')
//short target 1
if shortT1Line
line.set_xy1(shortT1, motherCandleIndex, target1Sell)
line.set_xy2(shortT1, bar_index, target1Sell)
label.set_xy(shortT1Label, bar_index + 5, target1Sell)
label.set_text(id=shortT1Label, text='T1 - ' + str.tostring(target1Sell) + ' (' + str.tostring(shortT1Range * motherCandleRange) + ') points')
//short target 2
if shortT2Line
line.set_xy1(shortT2, motherCandleIndex, target2Sell)
line.set_xy2(shortT2, bar_index, target2Sell)
label.set_xy(shortT2Label, bar_index + 5, target2Sell)
label.set_text(id=shortT2Label, text='T2 - ' + str.tostring(target2Sell) + ' (' + str.tostring(shortT2Range * motherCandleRange) + ') points')
Winter Is Coming (Snowflake)While attempting to draw a star using Pine Script, I ended up creating another nonsense indicator 🙂
How to Draw a Dynamic Snowflake? 🤦♂️
This indicator provides a customizable snowflake pattern that can be displayed on either a linear or logarithmic chart. Users can change the number of vertices and notches to make the pattern dynamic and versatile. (For added fun, the skull emojis that appear on each tick can be replaced with other symbols, like 🍺—because, hey, it’s Christmas!)
What Can You Learn?
Curious users analyzing this script can uncover practical answers to these questions:
How can line and label drawings be constructed using array functions?
How can trigonometric and logarithmic calculations be implemented effectively?
Details:
The snowflake is composed of symmetrical branches radiating from a central point. Each branch includes adjustable notches along its length, allowing users to control both their count and spacing. At the center of the snowflake, an n-point star is drawn (parameter: gon). This star's outer and inner vertices are aligned with the notches, ensuring perfect harmony with the snowflake’s overall geometry. The star is evenly spaced, with each of its points separated by 360/n degrees, resulting in a visually balanced and symmetrical design.
Best Wishes
I hope 2025 will be the year when we can create more peace, more freedom and more time to drink beer for the whole planet! Happy New Year everyone!
ORB Indicator and Moving Average (Anjaneya)Name: ORB Indicator with Adjustable Buffer, Moving Averages, and Center Line
Overview:
This indicator is designed for intraday traders using the Opening Range Breakout (ORB) strategy. It calculates the high and low levels during a specific session (e.g., the first 5 minutes of the trading day) and applies adjustable buffers to these levels. Additionally, it includes a center line between the buffered high and low levels, as well as multiple moving averages for further trend analysis.
Features:
Opening Range Breakout (ORB) Levels:
High and Low: Identified during the configured session time (default: 9:15 AM to 9:20 AM).
Buffered Levels:
Calculated dynamically using the range between ORB high and ORB low.
A new percentage buffer is computed as half of the percentage change from the low to the high.
Buffered levels: Upside Buffer and Downside Buffer.
Center Line:
A visual midpoint between the Upside Buffer and Downside Buffer.
Displayed in light blue with 50% opacity and a thin line style.
Helps traders visualize the equilibrium point.
Crossover and Crossunder Signals:
Buy Signal (B): When the price crosses above the Upside Buffer.
Sell Signal (S): When the price crosses below the Downside Buffer.
Configurable for either close price or touch-based detection.
Moving Averages:
Includes Exponential Moving Averages (EMA) and Simple Moving Averages (SMA).
Configurable lengths for short-term, medium-term, and long-term trends.
Can be hidden or displayed as per user preference.
Customization Options:
ORB Session Time: Configurable to define the range for ORB calculation (default: 9:15 AM to 9:20 AM).
Signal Detection: Option to use Close or Touch for signal generation.
Moving Average Lengths: Adjustable for EMA (7, 14, 26) and SMA (50, 100, 200, 1000).
Buffer Calculation: Automatically calculates the buffer levels based on the ORB range.
Visual Elements:
Buffered Levels:
Green: Upside Buffer.
Red: Downside Buffer.
Center Line:
Light blue, 50% opacity.
Signals:
Buy: Green label below the bar.
Sell: Red label above the bar.
Moving Averages:
Color-coded and customizable for trend visualization.
Use Case:
This indicator is ideal for:
Breakout Trading: Identifying potential breakouts using buffered ORB levels.
Reversal Trading: Spotting price rejections near the ORB levels.
Trend Analysis: Leveraging moving averages to confirm or invalidate breakout signals.
Brijesh TTrades candle plot"Brijesh TTrades candle plot" is a powerful and customizable indicator that allows you to overlay higher timeframe candles directly on your chart. Choose your desired timeframe (e.g., Daily, Hourly) and plot up to 10 recent candles with precise control over color, wick style, and width. The candles are offset by 40 bars to the right, providing a clear and unobstructed view of the current price action. Ideal for multi-timeframe analysis and gaining deeper insights into market trends.
Pine ChristmasThe "Pine Christmas" indicator is a festive decoration for your chart. It features a stylized Christmas tree, symbolizing the Pine Script logo, dressed up for the New Year. A star shines atop the tree, snowflakes float around, and gifts and snowmen sit beneath it, creating a magical winter vibe. This indicator brings a touch of holiday cheer and joy to your charting experience!
Breadth of Volatility The Breadth of Volatility (BoV) is an indicator designed to help traders understand the activity and volatility of the market. It focuses on analyzing how fast prices are moving and how much trading volume is driving those movements. By combining these two factors—price speed and volume strength—the BoV provides a single value that reflects the current level of market activity. This can help traders identify when the market is particularly active or calm, which is useful for planning trading strategies.
The speed component of the BoV measures how quickly prices are moving compared to their recent average. This is done by using a metric called the Average True Range (ATR), which calculates the typical size of price movements over a specific period. The BoV compares the current price change to this average, showing whether the market is moving faster or slower than usual. Faster price movements generally indicate higher volatility, which might signal opportunities for active traders.
The strength component focuses on the role of trading volume in price changes. It multiplies the trading volume by the size of the price movement to create a value called volume strength. This value is then compared to the highest volume strength seen over a recent period, which helps gauge whether the current price action is being strongly supported by trading activity. When the strength value is high, it suggests that market participants are actively trading and supporting the price movement.
These two components—speed and strength—are averaged to calculate the Breadth of Volatility value. While the formula also includes a placeholder for a third component (related to fundamental analysis), it is currently inactive and does not influence the final value. The BoV is displayed as a line on a chart, with a zero line for reference. Positive BoV values indicate heightened market activity and volatility, while values near zero suggest a quieter market. This indicator is particularly helpful for new traders to monitor market conditions and adjust their strategies accordingly, whether they’re focusing on trend-following or waiting for calmer periods for more conservative trades.
Important Notice:
Trading financial markets involves significant risk and may not be suitable for all investors. The use of technical indicators like this one does not guarantee profitable results. This indicator should not be used as a standalone analysis tool. It is essential to combine it with other forms of analysis, such as fundamental analysis, risk management strategies, and awareness of current market conditions. Always conduct thorough research or consult with a qualified financial advisor before making trading decisions. Past performance is not indicative of future results.
Disclaimer:
Trading financial instruments involves substantial risk and may not be suitable for all investors. Past performance is not indicative of future results. This indicator is provided for informational and educational purposes only and should not be considered investment advice. Always conduct your own research and consult with a licensed financial professional before making any trading decisions.
Note: The effectiveness of any technical indicator can vary based on market conditions and individual trading styles. It's crucial to test indicators thoroughly using historical data and possibly paper trading before applying them in live trading scenarios.
PineTree-Colors-V6Merry Christmas!!!
This is PineScript Version Tree in COLORS....as a Pine Tree (Christmas Tree) !!! This is how it all started from Version1 (V1) to Version 6 (V6) and on and on....
Enjoy :)
Intelligent Support & Resistance Lines (MTF)This script automatically detects and updates key Support & Resistance (S/R) levels using a higher timeframe (MTF) approach. By leveraging volume confirmation, levels are only identified when significant volume (relative to the SMA of volume) appears. Each level is drawn horizontally in real time, and whenever the market breaks above a resistance level (and retests it), the script automatically converts that resistance into support. The opposite occurs if the market breaks below a support level.
Key Features:
Multi-Timeframe (MTF) Data
Select a higher timeframe for more robust S/R calculations.
The script fetches High, Low, Volume, and SMA of Volume from the chosen timeframe.
Automatic Role Reversal
Resistance becomes Support if a breakout retest occurs.
Support becomes Resistance if a breakdown retest occurs.
Dynamic Line Width & Labeling
Each S/R line’s thickness increases with additional touches, making frequently tested levels easier to spot.
Labels automatically display the number of touches (e.g., “R 3” or “S 2”) and can have adjustable text size.
Volume Threshold
Only significant pivots (where volume exceeds a specified multiplier of average volume) are plotted, reducing noise.
Horizontal Offset for Clarity
Lines are drawn with timestamps instead of bar_index, ensuring that old levels remain visible without chart limitations.
Adjustable Maximum Levels
Maintain a clean chart by limiting how many S/R lines remain at once.
How It Works:
Pivot Detection: The script identifies swing highs and lows from the higher timeframe (timeframeSR).
Volume Check: Only pivots with volume ≥ (SMA Volume * volumeThreshold) qualify.
Line Creation & Updates: New lines are drawn at these pivots, labeled “R #” or “S #,” indicating how many times they’ve been touched.
Role Reversal: If price breaks above a resistance and retests it from above, that line is removed from the resistance array and re-created in the support array (and vice versa).
Inputs:
Timeframe for S/R: Choose the higher timeframe for S/R calculations.
Swing Length: Number of bars to consider in a pivot calculation.
Minimum Touches: Minimum required touches before drawing or updating a level.
Volume Threshold (Multiplier): Determines how much volume (relative to SMA) is needed to confirm a pivot.
Maximum Number of Levels: Caps how many S/R lines can be shown at once.
Color for Resistance & Color for Support: Customize your preferred colors for lines and labels.
Label Size: Select from "tiny", "small", "normal", "large", or "huge" to resize the labels.
Disclaimer:
This script is intended for educational purposes and should not be interpreted as financial or investment advice. Always conduct your own research or consult a qualified professional before making trading decisions.
The Final CountdownDescription:
The Final Countdown is a multi-timeframe candle countdown tool with the following features:
Dynamic Color-Coded Countdowns: Easily track candle closings with green, yellow, and red colors based on remaining time. Fully customizable thresholds.
Customizable Timeframes: Monitor up to 8 timeframes simultaneously, from 1-minute to weekly candles.
Alerts for Candle Closures: Get notified when a candle is about to close (red zone).
Flexible Display Options: Choose between vertical or horizontal layouts, adjust table size, and enable/disable individual timeframes.
Real-Time Updates: Seamlessly integrates with live charts to ensure accurate countdowns.
User-Friendly Settings: Modify colors, alert thresholds, and other parameters directly from the settings menu.
---------------------------------------------------------------
Dynamic Color-Coded Countdowns (In-Depth)
The countdown changes color based on how much time remains before a candle closes:
Green: Ample time remains.
Yellow: A warning that the candle is nearing its close.
Red: The candle is about to close imminently, requiring immediate attention.
Default Settings:
Green to Yellow: When 50% of the time has elapsed.
Yellow to Red: When only 10% of the time remains.
These percentages can be easily adjusted in the indicator settings to fit your trading needs. For example, you can set the transition to yellow at 70% elapsed time or adjust the red zone to begin with 5% time remaining for more urgency.
Stay prepared, stay informed, and never miss an important candle close with The Final Countdown!
Weekly and daily separators - MKThis indicator is designed to provide easier usability and greater customization for traders. The update brings enhanced stability and reliability in detecting day, week, and month changes across various timeframes, ensuring consistent and accurate visuals on your charts.
Key Features:
Time Zone Customization: Select the time zone to determine when session changes are marked.
Adjustable Line Coverage: Lines can now be customized to only partially cover the top and bottom of the chart, offering a cleaner look.
Optional Labels: Enable labels to display the starting month, calendar week, or day. Day formats include:
Weekday name
Date in formats: dd.MM or MM.dd
Visual Enhancements:
Default line widths and colors now use an orange hue for better visibility.
Added a monthly separator line for better long-term trend tracking.
Higher time frame color options for clarity.
Independent customization of line styles and widths.
Additional Improvements:
Ability to hide daily lines on daily charts and higher timeframes. Similarly, weekly lines can be hidden on weekly charts and higher.
Secondary line width for weekly separators on daily and higher timeframes, ensuring cleaner chart aesthetics.
Updated color selection and default values for better readability.
Abnormal Delta Volume HistogramThis indicator can help traders spot potential turning points or heightened volatility and provides a dynamic measure of unusual market behavior by focusing on shifts in “delta volume.” Delta volume is approximated by assigning all of a bar’s volume to the bullish side if the close is higher than the open and to the bearish side if the close is lower. The result is a net volume measure that can hint at which side—buyers or sellers—has the upper hand. By comparing this delta volume to its historical averages and measuring how far current readings deviate in terms of standard deviations, the indicator can highlight bars that reflect significantly stronger than normal buying or selling pressure.
A histogram visualizes these delta volume values on a bar-by-bar basis, while additional reference lines for the mean and threshold boundaries allow traders to quickly identify abnormal conditions. When the histogram bars extend beyond the threshold lines, and are colored differently to signal abnormality, it can draw the trader’s eye to periods when market participation or sentiment may be shifting rapidly. This can be used as an early warning signal, prompting further investigation into price action, external news, or significant events that may be driving unusual volume patterns.
Important Notice:
Trading financial markets involves significant risk and may not be suitable for all investors. The use of technical indicators like this one does not guarantee profitable results. This indicator should not be used as a standalone analysis tool. It is essential to combine it with other forms of analysis, such as fundamental analysis, risk management strategies, and awareness of current market conditions. Always conduct thorough research or consult with a qualified financial advisor before making trading decisions. Past performance is not indicative of future results.
Disclaimer:
Trading financial instruments involves substantial risk and may not be suitable for all investors. Past performance is not indicative of future results. This indicator is provided for informational and educational purposes only and should not be considered investment advice. Always conduct your own research and consult with a licensed financial professional before making any trading decisions.
Note: The effectiveness of any technical indicator can vary based on market conditions and individual trading styles. It's crucial to test indicators thoroughly using historical data and possibly paper trading before applying them in live trading scenarios.
FT SessionsFT Sessions
Overview
The FT Sessions is a highly customizable and powerful indicator designed for intraday traders who focus on session-based analysis. This script visually highlights global market sessions—Asia, Frankfurt, London, and New York (AM & PM)—on the chart, making it easier to track session ranges and analyze intraday price movements.
Key Features
Customizable Session Times and Colors:
Define your own session times and assign unique colors for better visibility.
Session Range Visualization:
Displays high and low ranges for each session.
Optional transparent range areas with outlines for clarity.
Configurable session range labels for enhanced readability.
Flexible Timezone Settings:
Choose a UTC offset or sync with the exchange's timezone.
User-Friendly Customization:
Compact settings for easier adjustments.
Enable or disable specific sessions to focus on relevant market activity.
How This Script Differs from LuxAlgo
This script draws inspiration from LuxAlgo's session tracking concept but has been developed with significant modifications and unique features:
Built from Scratch in Pine Script v5:
Fully optimized for Pine Script’s latest version, improving performance and functionality.
Expanded Session Range Features:
Five unique sessions (Asia, Frankfurt, London, New York AM, New York PM) with customizable ranges, colors, and labels.
Real-time updating of session ranges for improved intraday analysis.
4H Timeframe Optimization:
Automatically notifies users if applied to an unsupported timeframe, ensuring session accuracy.
Highly Configurable Input Options:
Advanced timezone handling and compact session management settings.
Unique Coding Structure:
Designed to maximize efficiency and minimize resource usage on TradingView.
While LuxAlgo focuses on session concepts, this script brings a fresh, customizable approach specifically tailored for intraday traders seeking precision in tracking session activity.
How It Works
The indicator tracks price movements within each session.
Highlights the high and low range of each session directly on the chart.
Updates session ranges in real-time to reflect evolving market conditions.
Practical Applications
Intraday Trading: Plan trades based on major market session ranges.
Breakout Strategies: Use session high and low levels to identify potential breakouts.
Session-Specific Patterns: Spot consolidations and reversals within session activity.
Important Notes
Optimized for the 4H timeframe. If applied to another timeframe, a notification will appear.
Best used in combination with other tools (e.g., volume or trend indicators) for a complete trading strategy.
Credits
This script draws inspiration from LuxAlgo's open-source session-tracking methodology. However, it introduces substantial improvements and unique features that set it apart. Full credit is given to LuxAlgo for their original open-source concept.
Disclaimer
This script is for informational and educational purposes only. Always test on a demo account before applying to live markets.
Christmas EMA with Advent Calendar [SS]Hey everyone!
As Tradingview is looking for Christmas themed indicators, I thought I would throw one out this year!
I understand they don't need to be useful, but if you know me, you know that's just not an option, so I went ahead and did a semi useful Christmas themed indicator!
It will calculate the EMA and put the EMA in a Christmas theme, you can select custom EMA theme:
Or you can select "Random" and it will random generate the Emoji and change each day (the advent aspect of the indicator).
In addition to that, of course the EMA is customizable, you can select whichever length you want, and you can toggle on or off the Christmas Countdown!
Thanks for everyone who followed me this year and for a longtime!
And thank you to the Tradingview and Pinecoder community for an awesome platform!
Hopefully we can all approach the new year with an optimistic outlook and be well prepared for whatever comes, both within the market and within our lives.
Safe trades, safe holidays and thoughts and wishes with you all.
McClellan A-D Volume Integration ModelThe strategy integrates the McClellan A-D Oscillator with an adjustment based on the Advance/Decline (A-D) volume data. The McClellan Oscillator is calculated by taking the difference between the short-term and long-term exponential moving averages (EMAs) of the A-D line. This strategy introduces an enhancement where the A-D volume (the difference between the advancing and declining volume) is factored in to adjust the oscillator value.
Inputs:
• ema_short_length: The length for the short-term EMA of the A-D line.
• ema_long_length: The length for the long-term EMA of the A-D line.
• osc_threshold_long: The threshold below which the oscillator must drop for an entry signal to trigger.
• exit_periods: The number of periods after which the position is closed.
• Data Sources:
• ad_advance and ad_decline are the data sources for advancing and declining issues, respectively.
• vol_advance and vol_decline are the volume data for the advancing and declining issues. If volume data is unavailable, it defaults to na (Not Available), and the fallback logic ensures that the strategy continues to function.
McClellan Oscillator with Volume Adjustment:
• The A-D line is calculated by subtracting the declining issues from the advancing issues. Then, the volume difference is applied to this line, creating a “weighted” A-D line.
• The short and long EMAs are calculated for the weighted A-D line to generate the McClellan Oscillator.
Entry Condition:
• The strategy looks for a reversal signal, where the oscillator falls below the threshold and then rises above it again. The condition is designed to trigger a long position when this reversal happens.
Exit Condition:
• The position is closed after a set number of periods (exit_periods) have passed since the entry.
Plotting:
• The McClellan Oscillator and the threshold are plotted on the chart for visual reference.
• Entry and exit signals are highlighted with background colors to make the signals more visible.
Scientific Background:
The McClellan A-D Oscillator is a popular market breadth indicator developed by Sherman and Marian McClellan. It is used to gauge the underlying strength of a market by analyzing the difference between the number of advancing and declining stocks. The oscillator is typically calculated using exponential moving averages (EMAs) of the A-D line, with the idea being that crossovers of these EMAs indicate potential changes in the market’s direction.
The integration of A-D volume into this model adds another layer of analysis, as volume is often considered a leading indicator of price movement. By factoring in volume, the strategy becomes more sensitive to not just the number of advancing or declining stocks but also how significant those movements are based on trading volume, as discussed in Schwager, J. D. (1999). Technical Analysis of the Financial Markets. This enhanced version aims to capture stronger and more sustainable trends in the market, helping to filter out false signals.
Additionally, volume analysis is often used to confirm price movements, as described in Wyckoff, R. (1931). The Day Trading System. Therefore, incorporating the volume of advancing and declining stocks in the McClellan Oscillator offers a more robust signal for trading decisions.