SUPeR TReND 2.718An evolved version of the classic Supertrend, SUPeR TReND 2.718 is built to deliver elegant, high-precision trend detection using Euler's constant (e = 2.718) as its default multiplier. Designed for clarity and visual flow, this indicator brings together smooth line work, intelligent color logic, and a minimalistic tally system that tracks trend persistence — all in a highly customizable, overlay-ready format.
Unlike traditional implementations, this version maintains line visibility regardless of fill opacity, ensuring crisp tracking even in complex environments. Ideal for traders who value both aesthetics and actionable structure.
__________________________________________________________
🔑 Key Features:
- 📐 ATR-based Supertrend with default multiplier = e (2.718)
- 📉 Dynamic trend line with optional fill beneath price
- ⏳ Trend duration tally label (count-only or full format)
- ⬆️ Higher-timeframe Supertrend overlay (optional)
- 🟢 Directional candle coloring for clarity
- 🟡 Subtle anchor line to guide perception without clutter
- ⚙️ PineScript v6 compliant, efficient and modular
__________________________________________________________
🧠 Interpretation Guide:
- The Supertrend line tracks trend support or resistance — beneath price in uptrends, above in downtrends.
- The shaded fill reflects direction with 70% transparency.
- The trend tally label counts how long the current trend has lasted.
- Candle colors confirm direction without overtaking price action.
- The optional HTF line shows higher-timeframe context.
- A soft yellow anchor line stabilizes the fill relationship without distraction.
__________________________________________________________
⚙️ Inputs & Controls:
- ✏️ ATR Length – Volatility lookback
- 🧮 Multiplier – Default = 2.718 (Euler's number)
- 🕰️ Higher Timeframe – Choose your bias frame
- 👁️ Show HTF / Main – Toggle each trend layer
- 🧾 Show Label / Simplify – Show trend duration, with or without arrows
- 🎨 Color Candles – Turn directional bar coloring on or off
- 🪄 Show Fill – Toggle the shaded visual rhythm
- 🎛️ All visuals use tuned colors and transparencies for clarity
__________________________________________________________
🚀 Best Practices:
- ✅ Works on any time frame; shines on 1h v. 1D
- 🔁 Use the HTF line for macro bias filtering
- 📊 Combine with volume or liquidity overlays for edge
- 🧱 Use as a structural base layer with minimalist stacks
__________________________________________________________
📈 Strategy Tips:
- 🧭 MTF Trend Alignment: Enable the HTF line to filter trades. If the HTF trend is up, only take longs on the lower frame, and vice versa.
- 🔁 Pullback Entries: During a strong trend, consider short-term dips below the Supertrend line as possible re-entry zones — only if HTF remains aligned.
- ⏳ Tally for Exhaustion: When the bar count exceeds 15+, look for confluence (volume divergence, key levels, reversal signals).
- ⚠️ HTF Flip + Extended Trend: When the HTF trend reverses while the main trend is extended, that may be a macro exit or fade signal.
- 🚫 Solo Mode: Disable HTF and use the main trend + tally as a standalone signal layer.
- 🧠 Swing Setup Friendly: Especially powerful on 1D or 1h in swing systems or trend-based grid strategies.
Volatility
ATR - Asymmetric Turbulence Ribbon🧭 Asymmetric Turbulence Ribbon (ATR)
The Asymmetric Turbulence Ribbon (ATR) is an enhanced and reimagined version of the standard Average True Range (ATR) indicator. It visualizes not just raw volatility, but the structure, momentum, and efficiency of volatility through a multi-layered visual approach.
It contains two distinct visual systems:
1. A zero-centered histogram that expresses how current volatility compares to its historical average, with intensity and color showing speed and conviction
2. A braided ribbon made of dual ATR-based moving averages that highlight transitions in volatility behavior—whether volatility is expanding or contracting
The name reflects its purpose: to capture asymmetric, evolving turbulence in market behavior, through structure-aware volatility tracking.
_______________________________________________________________
🔧 Inputs (Fibonacci defaults)
ATR Length
Lookback period for ATR calculation (default: 13)
ATR Base Avg. Length
Moving average period used as the zero baseline for histogram (default: 55)
ATR ROC Lookback
Number of bars to measure rate of change for histogram color mapping (default: 8)
Timeframe Override
Optionally calculate ATR values from a higher or fixed timeframe (e.g., 1D) for macro-volatility overlay
Show Ribbon Fill
Toggles colored fill between ATR EMA and HMA lines
Show ATR MAs
Toggles visibility of ATR EMA and HMA lines
Show Crossover Markers
Shows directional triangle markers where ATR EMA and HMA cross
Show Histogram
Toggles the entire histogram display
_______________________________________________________________
📊 Histogram Component: Volatility Energy Profile
The histogram shows how far the current ATR is from its moving average baseline, centered around zero. This lets you interpret volatility pressure—whether it's expanding, contracting, or preparing to reverse.
To complement this, the indicator also plots the raw ATR line in aqua. This is the actual average true range value—used internally in both the histogram and ribbon calculations. By default, it appears as a slightly thicker line, providing a clear reference point for comparing historical volatility trends and absolute levels.
Use the baseline ATR to:
- Compare real-time volatility to previous peaks or troughs
- Monitor how ATR behaves near histogram flips or ribbon crossovers
- Evaluate volatility phases in absolute terms alongside relative momentum
The ATR line is particularly helpful for users who want to keep tabs on raw volatility values while still benefiting from the enhanced visual storytelling of the histogram and ribbon systems.
Each histogram bar is colored based on the rate of change (ROC) in ATR: The faster ATR rises or falls, the more intense the color. Meanwhile, the opacity of each bar is adjusted by the effort/result ratio of the price candle (body vs. range), showing how much price movement was achieved with conviction.
Color Interpretation:
🔴 Red
Strong volatility expansion
Market entering or deepening into a volatility burst
Seen during breakouts, panic moves, or macro shock events
Often accompanied by large real candle bodies
🟠 Orange
Moderate volatility expansion
Heating up phase, often precedes breakouts
Common in strong trending environments
Signals tightening before acceleration
🟡 Yellow
Mild volatility increase
Transitional state—energy building, not yet exploding
Appears in early trend development or pullbacks
🟢 Green
Mild volatility contraction
ATR cooling off
Seen during consolidation, reversion, or range balance
Good time to assess upcoming directional setups
🔵 Aqua
Moderate compression
Volatility is clearly declining
Signals consolidation within larger structure
Pre-breakout zones often form here
🔵 Deep Blue
Strong volatility compression
Market is coiling or dormant
Can signal upcoming squeeze or fade environment
Often followed by sharp expansion
Opacity scaling:
Brighter bars = efficient, directional price action (strong bodies)
Faded bars = indecision, chop, absorption, or wick-heavy structure
Together, color and opacity give a 2D view of market volatility: Hue = the type and direction of volatility
Opacity = the quality and structure behind it
Use this to gauge whether volatility is rising with conviction, fading into neutrality, or compressing toward breakout potential.
_______________________________________________________________
🪡 Ribbon Component: Volatility Rhythm Structure
The ribbon overlays two moving averages of ATR:
EMA (yellow) – faster, more reactive
HMA (orange) – smoother, more rhythmic
Their relationship creates the ribbon logic:
Yellow fill (EMA > HMA)
Short-term volatility is increasing faster than the longer-term rhythm
Signals active expansion and engagement
Orange fill (HMA > EMA)
Volatility is decaying or leveling off
Suggests possible exhaustion, pullback, or range
Crossover triangle markers (optional, off by default to avoid clutter) identify the moment of shift in volatility phase.
The ribbon reflects the shape of volatility over time—ideal for mapping cyclical energy shifts, transitional states, and alignment between current and average volatility.
_______________________________________________________________
📐 Strategy Application
Use the Asymmetric Turbulence Ribbon to:
- Detect volatility expansions before breakouts or directional runs
- Spot compression zones that precede structural ruptures
- Visually separate efficient moves from noisy market activity
- Confirm or fade trade setups based on underlying energy state
- Track the volatility environment across multiple timeframes using the override
_______________________________________________________________
🎯 Ideal Timeframes
Designed to function across all timeframes, but particularly powerful on intraday to daily ranges (1H to 1D)
Use the timeframe override to anchor your chart in higher-timeframe volatility context, like daily ATR behavior influencing a 1H setup.
_______________________________________________________________
🧬 Customization Tips
- Increase ATR ROC Lookback for smoother color transitions
- Extend ATR Base Avg Length for more macro-driven histogram centering
- Disable the histogram for ribbon-only rhythm view
- Use opacity and color shifts in the histogram to detect stealth energy builds
- Align ATR phases with structure or order flow tools for high-quality setups
First EMA Touch (Last N Bars)Okay, here's a description of the "First EMA Touch (Last N Bars)" TradingView indicator:
Indicator Name: First EMA Touch (Last N Bars)
Core Purpose:
This indicator is designed to visually highlight on the chart the exact moment when the price (specifically, the high/low range of a price bar) makes contact with a specified Exponential Moving Average (EMA) for the first time within a defined recent lookback period (e.g., the last 20 bars).
How it Works:
EMA Calculation: It first calculates a standard Exponential Moving Average (EMA) based on the user-defined EMA Length and EMA Source (e.g., close price). This EMA line is plotted on the chart, often serving as a dynamic level of potential support or resistance.
"Touch" Detection: For every price bar, the indicator checks if the bar's range (from its low to its high) overlaps with or crosses the calculated EMA value for that bar. If low <= EMA <= high, it's considered a "touch".
"First Touch" Logic: This is the key feature. The indicator looks back over a specified number of preceding bars (defined by the Lookback Period). If a "touch" occurs on the current bar, and no "touch" occurred on any of the bars within that preceding lookback window, then the current touch is marked as the "first touch".
Visual Signal: When a "first touch" condition is met, the indicator plots a distinct shape (by default, a small green triangle) below the corresponding price bar. This makes it easy to spot these specific events.
Key Components & Settings:
EMA Line: The calculated EMA itself is plotted (typically as an orange line) for visual reference.
First Touch Signal: A shape (e.g., green triangle) appears below bars meeting the "first touch" criteria.
EMA Length (Input): Determines the period used for the EMA calculation. Shorter lengths make the EMA more reactive to recent price changes; longer lengths make it smoother and slower.
Lookback Period (Input): Defines how many bars (including the current one) the indicator checks backwards to determine if the current touch is the first one. A lookback of 20 means it checks if there was a touch in the previous 19 bars before signalling the current one as the first.
EMA Source (Input): Specifies which price point (close, open, high, low, hl2, etc.) is used to calculate the EMA.
Interpretation & Potential Uses:
Identifying Re-tests: The signal highlights when price returns to test the EMA after having stayed away from it for the duration of the lookback period. This can be significant as the market re-evaluates the EMA level.
Potential Reversal/Continuation Points: A first touch might indicate:
A potential area where a trend might resume after a pullback (if price bounces off the EMA).
A potential area where a reversal might begin (if price strongly rejects the EMA).
A point of interest if price consolidates around the EMA after the first touch.
Filtering Noise: By focusing only on the first touch within a period, it can help filter out repeated touches that might occur during choppy or consolidating price action around the EMA.
Confluence: Traders might use this signal in conjunction with other forms of analysis (e.g., horizontal support/resistance, trendlines, candlestick patterns, other indicators) to strengthen trade setups.
Limitations:
Lagging: Like all moving averages, the EMA is a lagging indicator.
Not Predictive: The signal indicates a specific past event (the first touch) occurred; it doesn't guarantee a future price movement.
Parameter Dependent: The effectiveness and frequency of signals heavily depend on the chosen EMA Length and Lookback Period. These may need tuning for different assets and timeframes.
Requires Confirmation: It's generally recommended to use this indicator as part of a broader trading strategy and not rely solely on its signals for trade decisions.
In essence, the "First EMA Touch (Last N Bars)" indicator provides a specific, refined signal related to price interaction with a moving average, helping traders focus on potentially significant initial tests of the EMA after a period of separation.
Litecoin Trailing-Stop StrategyAltcoins Trailing-Stop Strategy
This strategy is based on a momentum breakout approach using PKAMA (Powered Kaufman Adaptive Moving Average) as a trend filter, and a delayed trailing stop mechanism to manage risk effectively.
It has been designed and fine-tuned Altcoins, which historically shows consistent volatility patterns and clean trend structures, especially on intraday timeframes like 15m and 30m.
Strategy Logic:
Entry Conditions:
Long when PKAMA indicates an upward move
Short when PKAMA detects a downward trend
Minimum spacing of 30 bars between trades to avoid overtrading
Trailing Stop:
Activated only after a customizable delay (delayBars)
User can set trailing stop % and delay independently
Helps avoid premature exits due to short-term volatility
Customizable Parameters:
This strategy uses a custom implementation of PKAMA (Powered Kaufman Adaptive Moving Average), inspired by the work of alexgrover
PKAMA is a volatility-aware moving average that adjusts dynamically to market conditions, making it ideal for altcoins where trend strength and direction change frequently.
This script is for educational and experimental purposes only. It is not financial advice. Please test thoroughly before using it in live conditions, and always adapt parameters to your specific asset and time frame.
Feedback is welcome! Feel free to clone and adapt it for your own trading style.
02 SMC + BB Breakout (Improved)This strategy combines Smart Money Concepts (SMC) with Bollinger Band breakouts to identify potential trading opportunities. SMC focuses on identifying key price levels and market structure shifts, while Bollinger Bands help pinpoint overbought/oversold conditions and potential breakout points. The strategy also incorporates higher timeframe trend confirmation to filter out trades that go against the prevailing trend.
Key Components:
Bollinger Bands:
Calculated using a Simple Moving Average (SMA) of the closing price and a standard deviation multiplier.
The strategy uses the upper and lower bands to identify potential breakout points.
The SMA (basis) acts as a centerline and potential support/resistance level.
The fill between the upper and lower bands can be toggled by the user.
Higher Timeframe Trend Confirmation:
The strategy allows for optional confirmation of the current trend using a higher timeframe (e.g., daily).
It calculates the SMA of the higher timeframe's closing prices.
A bullish trend is confirmed if the higher timeframe's closing price is above its SMA.
This helps filter out trades that go against the prevailing long-term trend.
Smart Money Concepts (SMC):
Order Blocks:
Simplified as recent price clusters, identified by the highest high and lowest low over a specified lookback period.
These levels are considered potential areas of support or resistance.
Liquidity Zones (Swing Highs/Lows):
Identified by recent swing highs and lows, indicating areas where liquidity may be present.
The Swing highs and lows are calculated based on user defined lookback periods.
Market Structure Shift (MSS):
Identifies potential changes in market structure.
A bullish MSS occurs when the closing price breaks above a previous swing high.
A bearish MSS occurs when the closing price breaks below a previous swing low.
The swing high and low values used for the MSS are calculated based on the user defined swing length.
Entry Conditions:
Long Entry:
The closing price crosses above the upper Bollinger Band.
If higher timeframe confirmation is enabled, the higher timeframe trend must be bullish.
A bullish MSS must have occurred.
Short Entry:
The closing price crosses below the lower Bollinger Band.
If higher timeframe confirmation is enabled, the higher timeframe trend must be bearish.
A bearish MSS must have occurred.
Exit Conditions:
Long Exit:
The closing price crosses below the Bollinger Band basis.
Or the Closing price falls below 99% of the order block low.
Short Exit:
The closing price crosses above the Bollinger Band basis.
Or the closing price rises above 101% of the order block high.
Position Sizing:
The strategy calculates the position size based on a fixed percentage (5%) of the strategy's equity.
This helps manage risk by limiting the potential loss per trade.
Visualizations:
Bollinger Bands (upper, lower, and basis) are plotted on the chart.
SMC elements (order blocks, swing highs/lows) are plotted as lines, with user-adjustable visibility.
Entry and exit signals are plotted as shapes on the chart.
The Bollinger band fill opacity is adjustable by the user.
Trading Logic:
The strategy aims to capitalize on Bollinger Band breakouts that are confirmed by SMC signals and higher timeframe trend. It looks for breakouts that align with potential market structure shifts and key price levels (order blocks, swing highs/lows). The higher timeframe filter helps avoid trades that go against the overall trend.
In essence, the strategy attempts to identify high-probability breakout trades by combining momentum (Bollinger Bands) with structural analysis (SMC) and trend confirmation.
Key User-Adjustable Parameters:
Bollinger Bands Length
Standard Deviation Multiplier
Higher Timeframe
Higher Timeframe Confirmation (on/off)
SMC Elements Visibility (on/off)
Order block lookback length.
Swing lookback length.
Bollinger band fill opacity.
This detailed description should provide a comprehensive understanding of the strategy's logic and components.
***DISCLAIMER: This strategy is for educational purposes only. It is not financial advice. Past performance is not indicative of future results. Use at your own risk. Always perform thorough backtesting and forward testing before using any strategy in live trading.***
Volatility Layered Supertrend [NLR]We’ve all used Supertrend, but do you know where to actually enter a trade? Volatility Layered Supertrend (VLS) is here to solve that! This advanced trend-following indicator builds on the classic Supertrend by not only identifying trends and their strength but also guiding you to the best trade entry points. VLS divides the main long-term trend into “Strong” and “Weak” Zones, with a clear “Trade Entry Zone” to help you time your trades with precision. With layered trends, dynamic profit targets, and volatility-adaptive bands, VLS delivers actionable signals for any market.
Why I Created VLS Over a Plain Supertrend
I built VLS to address the gaps in traditional Supertrend usage and make trade entries clearer:
Single-Line Supertrend Issues: The default Supertrend sets stop-loss levels that are too wide, making it impractical for most traders to use effectively.
Unclear Entry Points: Standard Supertrend doesn’t tell you where to enter a trade, often leaving you guessing or entering too early or late.
Multi-Line Supertrend Enhancement: Many traders use short, medium, and long Supertrends, which is helpful but can lack focus. In VLS, I include Short, Medium, and Long trends (using multipliers 1 to 3), and add multipliers 4 and 5 to track extra long-term trends—helping to avoid fakeouts that sometimes occur with multiplier 3.
My Solution: I focused on the main long-term Supertrend and split it into “Weak Zone” and “Strength Zone” to show the trend’s reliability. I also defined a “Trade Entry Zone” (starting from the Mid Point, with the first layer’s background hidden for clarity) to guide you on where to enter trades. The zones include Short, Medium, and Long Trend layers for precise entries, exits, and stop-losses.
Practical Trading: This approach provides realistic stop-loss levels, clear entry points, and a “Profit Target” line that aligns with your risk tolerance, while filtering out false signals with longer-term trends.
Key Features
Layered Trend Zones: Short, Medium, Long, and Extra Long Trend layers (up to multipliers 4 and 5) for timing entries and exits.
Strong & Weak Zones: See when the trend is reliable (Strength Zone) or needs caution (Weak Zone).
Trade Entry Zone: A dedicated zone starting from the Mid Point (first layer’s background hidden) to show the best entry points.
Dynamic Profit Targets: A “Profit Target” line that adjusts with the trend for clear goals.
Volatility-Adaptive: Uses ATR to adapt to market conditions, ensuring reliable signals.
Color-Coded: Green for uptrends, red for downtrends—simple and clear.
How It Works
VLS enhances the main long-term Supertrend by dividing it into two zones:
Weak Zone: Indicates a less reliable trend—use tighter stop-losses or wait for the price to reach the Trade Entry Zone.
Strength Zone: Signals a strong trend—ideal for entries with wider stop-losses for bigger moves.
The “Trade Entry Zone” starts at the Mid Point (last layer’s background hidden for clarity), showing you the best area to enter trades. Each zone includes Short, Medium, Long, and Extra Long Trend sublevels (up to multipliers 4 and 5) for precise trade timing and to filter out fakeouts. The “Profit Target” updates dynamically based on trend direction and volatility, giving you a clear goal.
How to Use
Spot the Trend: Green bands = buy, red bands = sell.
Check Strength: Price in Strength Zone? Trend’s reliable—trade confidently. In Weak Zone? Use tighter stops or wait.
Enter Trades: Use the “Trade Entry Zone” (from the Mid Point upward) for the best entry points.
Use Sublevels: Short, Medium, Long, and Extra Long layers in each zone help fine-tune entries and exits.
Set Targets: Follow the Profit Target line for goals—it updates automatically.
Combine Tools: Pair with RSI, MACD, or support/resistance for added confirmation.
Settings
ATR Length: Adjust the ATR period (default 10) to change sensitivity.
Up/Down Colors: Customize colors—green for up, red for down, by default.
ATRs in Days📌 ATR in Days
This script tracks how price moves in relation to ATR over multiple days, providing a powerful volatility framework for traders.
🔹 Key Features:
✅ 4 ATRs in 5 Days – Measures if a stock has moved 4x its ATR within the last 5 days, identifying extreme volatility zones.
✅ Daily ATR Calculation – Tracks average true range over time to gauge market conditions.
✅ Clear Table Display – Real-time ATR readings for quick decision-making.
✅ Intraday & Swing Trading Compatible – Works across multiple timeframes for day traders & swing traders.
📊 How to Use:
Look for stocks that exceed 4 ATRs in 5 days to spot extended moves.
Use ATR as a reversion or continuation signal depending on market structure.
🚀 Perfect for traders looking to quantify volatility & structure trades effectively!
Spent Output Profit Ratio (SOPR) Z-Score | [DeV]SOPR Z-Score
The Spent Output Profit Ratio (SOPR) is an advanced on-chain metric designed to provide deep insights into Bitcoin market dynamics by measuring the ratio between the combined USD value of all Bitcoin outputs spent on a given day and their combined USD value at the time of creation (typically, their purchase price). As a member of the Realized Profit/Loss family of metrics, SOPR offers a window into aggregate seller behavior, effectively representing the USD amount received by sellers divided by the USD amount they originally paid. This indicator enhances this metric by normalizing it into a Z-Score, enabling a statistically robust analysis of market sentiment relative to historical trends, augmented by a suite of customizable features for precision and visualization.
SOPR Settings -
Lookback Length (Default: 150 days): Determines the historical window for calculating the Z-Score’s mean and standard deviation. A longer lookback captures broader market cycles, providing a stable baseline for identifying extreme deviations, which is particularly valuable for long-term strategic analysis.
Smoothing Period (Default: 100 days): Applies an EMA to the raw SOPR, balancing responsiveness to recent changes with noise reduction. This extended smoothing period ensures the indicator focuses on sustained shifts in seller behavior, ideal for institutional-grade trend analysis.
Moving Average Settings -
MA Lookback Length (Default: 90 days): Sets the period for the Z-Score’s moving average, offering a shorter-term trend signal relative to the 150-day Z-Score lookback. This contrast enhances the ability to detect momentum shifts within the broader context.
MA Type (Default: EMA): Provides six moving average types, from the simple SMA to the volume-weighted VWMA. The default EMA strikes an optimal balance between smoothness and responsiveness, while alternatives like HMA (Hull) or VWMA (volume-weighted) allow for specialized applications, such as emphasizing recent price action or incorporating volume dynamics.
Display Settings -
Show Moving Average (Default: True): Toggles the visibility of the Z-Score MA plot, enabling users to focus solely on the raw Z-Score when preferred.
Show Background Colors (Default: True): Activates dynamic background shading, enhancing visual interpretation of market regimes.
Background Color Source (Default: SOPR): Allows users to tie the background color to either the SOPR Z-Score’s midline (reflecting adjustedZScore > 0) or the MA’s trend direction (zScoreMA > zScoreMA ). This dual-source option provides flexibility to align the visual context with the primary analytical focus.
Analytical Applications -
Bear Market Resistance: When the Z-Score approaches or exceeds zero (raw SOPR near 1), it often signals resistance as sellers rush to exit at break-even, a pattern historically observed during downtrends. A rising Z-Score MA crossing zero can confirm this pressure.
Bull Market Support: Conversely, a Z-Score dropping below zero in uptrends indicates reluctance to sell at a loss, forming support as sell pressure diminishes. The MA’s bullish coloring reinforces confirmation of renewed buying interest.
Extreme Deviations: Values significantly above or below zero highlight overbought or oversold conditions, respectively, offering opportunities for contrarian positioning when paired with other on-chain or price-based metrics.
OG ATR RangeDescription:
The OG ATR Tool is a clean, visualized version of the Average True Range indicator for identifying volatility, stop-loss levels, and realistic price movement expectations.
How it works:
Calculates the average range (in points/pips) of recent candles.
Overlays ATR bands to help define breakout potential or squeeze zones.
Can be used to size trades or set dynamic stop-loss and target levels.
Best for:
Intraday traders who want to avoid unrealistic targets.
Volatility-based setups and breakout strategies.
Creating position sizing rules based on instrument volatility.
Pro Tip: Combine with your trend indicators to set sniper entries and exits that respect volatility.
PumpC Opening Range Breakout (ORB) Stretch RangePumpC ORB Stretch
The PumpC ORB Stretch is a volatility-based indicator that helps traders identify potential breakout zones by analyzing how price typically behaves around the open. This tool is inspired by concepts introduced by Toby Crabel in his well-known book “Day Trading with Short-Term Price Patterns and Opening Range Breakout.”
Rather than predicting market direction, this indicator highlights areas where price is likely to expand based on recent volatility. It is designed for traders who prefer dynamic, data-driven breakout levels over static support and resistance zones.
What Is the "Stretch"?
In Toby Crabel’s framework, the Stretch is the average of the smaller of two price moves:
The distance from the open to the high of the bar
The distance from the open to the low of the bar
This smaller value captures the “quiet side” of the candle and reflects recent price compression. Averaged over multiple periods (commonly 10 daily bars), it creates a baseline to assess how far price may move away from the open under typical market conditions.
How the Indicator Works
The PumpC ORB Stretch follows this process:
Uses a higher timeframe (such as daily) to calculate the open, high, and low.
For each bar, measures the smaller of the two distances: open to high or open to low.
Applies a moving average to the result over a user-defined number of bars (default is 10).
Multiplies the average stretch by customizable levels (e.g., 0.382, 1.0, 2.0).
Plots breakout levels above and below the open of the selected timeframe.
The result is a set of adaptive levels that expand or contract with market volatility.
Customization Options
Stretch Timeframe: Choose the timeframe used for stretch calculation (default: Daily).
Stretch Length: Set the number of bars to include in the moving average.
Breakout Levels: Enable or disable individual levels and define multipliers.
Color Settings: Customize colors for each range level for easy visual distinction.
Plot Style: Circular markers are used to reduce chart clutter and improve readability.
How to Use It
Use plotted levels to anticipate possible breakouts from the open.
Adjust stretch length to reflect short-term or longer-term volatility trends.
Combine this tool with momentum indicators, volume, or price action for confirmation.
Use levels to help guide stop placement or profit targets in breakout strategies.
Important Notes
This script is based on an interpretation of Crabel’s concepts and is not affiliated with Crabel Capital or the original author.
The indicator does not predict direction; it is a tool for context and structure.
It is recommended that users test and validate this tool in a simulated environment before applying it to live trading.
This indicator is intended for educational purposes only.
Licensing and Attribution
This script is built entirely in Pine Script v5 and follows TradingView’s open-source standards. It does not include any third-party or proprietary code. If you modify or share it, please credit the original idea and follow all TradingView script publishing rules.
Nasan Risk Score & Postion Size Estimator** THE RISK SCORE AND POSITION SIZE WILL ONLY BE CALCUTAED ON DIALY TIMEFRAME NOT IN OTHER TIMEFRAMES.
The typically accepted generic rule for risk management is not to risk more than 1% - 2 % of the capital in any given trade. It has its own basis however it does not take into account the stocks historic & current performance and does not consider the traders performance metrics (like win rate, profit ratio).
The Nasan Risk Score & Position size calculator takes into account all the listed parameters into account and estimates a Risk %. The position size is calculated using the estimated risk % , current ATR and a dynamically adjusted ATR multiple (ATR multiple is adjusted based on true range's volatility and stocks relative performance).
It follows a series of calculations:
Unadjusted Nasan Risk Score = (Min Risk)^a + b*
Min Risk = ( 5 year weighted avg Annual Stock Return - 5 year weighted avg Annual Bench Return) / 5 year weighted avg Annual Max ATR%
Max Risk = ( 5 year weighted avg Annual Stock Return - 5 year weighted avg Annual Bench Return) / 5 year weighted avg Annual Min ATR%
The min and max return is calculated based on stocks excess return in comparison to the Benchmark return and adjusted for volatility of the stock.
When a stock underperforms the benchmark, the default is, it does not calculate a position size , however if we opt it to calculate it will use 1% for Min Risk% and 2% for Max Risk% but all the other calculations and scaling remain the same.
Rationale:
Stocks outperforming their benchmark with lower volatility (ATR%) score higher.
A stock with high returns but excessive volatility gets penalized.
This ensures volatility-adjusted performance is emphasized rather than absolute returns.
Depending on the risk preference aggressive or conservative
Aggressive Risk Scaling: a = max (m, n) and b = min (m, n)
Conservative Scaling: a = min (m, n) and b = max (m, n)
where n = traders win % /100 and m = 1 - (1/ (1+ profit ratio))
A default of 50% is used for win factor and 1.5 for profit ratio.
Aggressive risk scaling increases exposure when the strategy's strongest factor is favorable.
Conservative risk scaling ensures more stable risk levels by focusing on the weaker factor.
The Unadjusted Nasan risk is score is further refined based on a tolerance factor which is based on the stocks maximum annual drawdown and the trader's maximum draw down tolerance.
Tolerance = /100
The correction factor (Tolerance) adjusts the risk score based on downside risk. Here's how it works conceptually:
The formula calculates how much the stock's actual drawdown exceeds your acceptable limit.
If stocks maximum Annual drawdown is smaller than Trader's maximum acceptable drawdown % , this results in a positive correction factor (indicating the drawdown is within your acceptable range and increases the unadjusted score.
If stocks maximum Annual drawdown exceeds Trader's maximum acceptable drawdown %, the correction factor will decrease (indicating that the downside risk is greater than what you are comfortable with, so it will adjust the risk exposure).
Once the Risk Score (numerically equal to Risk %) The position size is calculated based on the current market conditions.
Nasan Risk Score (Risk%) = Unadjusted Nasan Risk Score * Tolerance.
Position Size = (Capital * Risk% )/ ATR-Multiplier * ATR
The ATR Multiplier is dynamically adjusted based on the stocks recent relative performance and the variability of the true range itself. It would range between 1 - 3.5.
The multiplier widens when conditions are not favorable decreasing the position size and increases position size when conditions are favorable.
This Calculation /Estimate Does not give you a very different result than the arbitrary 1% - 2%. However it does fine tune the % based on sock performance, traders performance and tolerance level.
Long Term Profitable Swing | AbbasA Story of a Profitable Swing Trading Strategy
Imagine you're sailing across the ocean, looking for the perfect wave to ride. Swing trading is quite similar—you're navigating the stock market, searching for the ideal moments to enter and exit trades. This strategy, created by Abbas, helps you find those waves and ride them effectively to profitable outcomes.
🌊 Finding the Perfect Wave (Entry)
Our journey begins with two simple signs that tell us a great trading opportunity is forming:
- Moving Averages: We use two lines that follow price trends—the faster one (EMA 16) reacts quickly to recent price moves, and the slower one (EMA 30) gives us a longer-term perspective. When the faster line crosses above the slower line, it's like a clear signal saying, "Hey! The wave is rising, and prices might move higher!"
- RSI Momentum: Next, we check a tool called the RSI, which measures momentum (how strongly prices are moving). If the RSI number is above 50, it means there's enough strength behind this rising wave to carry us forward.
When both signals appear together, that's our green light. It's time to jump on our surfboard and start riding this promising wave.
⚓ Safely Riding the Wave (Risk Management)
While we're riding this wave, we want to ensure we're safe from sudden surprises. To do this, we use something called the Average True Range (ATR), which measures how volatile (or bumpy) the price movements are:
- Stop-Loss: To avoid falling too hard, we set a safety line (stop-loss) 8 times the ATR below our entry price. This helps ensure we exit if the wave suddenly turns against us, protecting us from heavy losses.
- Take Profit: We also set a goal to exit the trade at 11 times the ATR above our entry. This way, we capture significant profits when the wave reaches a nice high point.
🌟 Multiple Rides, Bigger Adventures
This strategy allows us to take multiple positions simultaneously—like riding several waves at once, up to 5. Each trade we make uses only 10% of our trading capital, keeping risks manageable and giving us multiple opportunities to win big.
🗺️ Easy to Follow Settings
Here are the basic settings we use:
- Fast EMA**: 16
- Slow EMA**: 30
- RSI Length**: 9
- RSI Threshold**: 50
- ATR Length**: 21
- ATR Stop-Loss Multiplier**: 8
- ATR Take-Profit Multiplier**: 11
These settings are flexible—you can adjust them to better suit different markets or your personal trading style.
🎉 Riding the Waves of Success
This simple yet powerful swing trading approach helps you confidently enter trades, clearly know when to exit, and effectively manage your risk. It’s a reliable way to ride market waves, capture profits, and minimize losses.
Happy trading, and may you find many profitable waves to ride! 🌊✨
Please test, and take into account that it depends on taking multiple longs within the swing, and you only get to invest 25/30% of your equity.
Correlation Coefficient TableThis Pine Script generates a dynamic table for analyzing how multiple assets correlate with a chosen benchmark (e.g., NZ50G). Users can input up to 12 asset symbols, customize the benchmark, and define the beta calculation periods (e.g., 15, 30, 90, 180 days). The script calculates Correlation values for each asset over these periods and computes the average beta for better insights.
The table includes:
Asset symbols: Displayed in the first row.
Correlation values: Calculated for each defined period and displayed in subsequent columns.
Average Correlation: Presented in the final column as an overall measure of correlation strength.
Color coding: Background colors indicate beta magnitude (green for high positive beta, yellow for near-neutral beta, red for negative beta).
ATR & PTR TableThe ATR & PTR Table Indicator displays a dynamic table that provides Average True Range (measures market volatility over 1D, 1W, and 1M timeframes), Price trading range (difference between the high and low prices over the same periods) & percentage of the typical range that has been traded. This indicator will help traders identify potential breakout zones and assess volatility across multiple timeframes.
This had been optimized to show ATR and PTR on every time frame. The (1D) represents ATR on whatever timeframe you are currently on.
ATR SL and TP with Candle Freeze & DataWindowThis indicator uses the Average True Range (ATR) to automatically calculate your stop loss (SL) and take profit (TP) levels based on the current market volatility and your chosen multipliers. Here's how it works:
ATR Calculation:
The indicator computes the ATR, which measures the average market volatility over a set period. This value helps gauge how much the price typically moves.
SL and TP Determination:
Depending on whether you're in a long or short trade, the SL and TP are calculated relative to the current price:
For a long trade, the stop loss is set below the current price (by subtracting a multiple of the ATR) and the take profit is set above it (by adding a multiple of the ATR).
For a short trade, the calculations are reversed.
Candle Freeze Feature:
Once a new candle starts, the calculated SL and TP values are "frozen" for that candle. This means they remain constant during the candle's formation, preventing them from updating continuously as the price fluctuates. This can make it easier to plan your trades without the levels shifting mid-candle.
Data Window & Labels:
The SL and TP values are plotted on the chart as lines and displayed in labels for quick reference. Additionally, they appear in TradingView's Data Window, so you can easily copy the price numbers if needed.
Overall, the indicator is designed to help you manage your trades by setting dynamic, volatility-adjusted SL and TP levels that only update at the start of each new candle, aligning with your chosen timeframe. Let me know if you have any more questions or need further adjustments!
Composite Reversal IndicatorOverview
The "Composite Reversal Indicator" aggregates five technical signals to produce a composite score that ranges from -5 (strongly bearish) to +5 (strongly bullish). These signals come from:
Relative Strength Index (RSI)
Moving Average Convergence Divergence (MACD)
Accumulation/Distribution (A/D)
Volume relative to its moving average
Price proximity to support and resistance levels
Each signal contributes a value of +1 (bullish), -1 (bearish), or 0 (neutral) to the total score. The raw score is plotted as a histogram, and a smoothed version is plotted as a colored line to highlight trends.
Step-by-Step Explanation
1. Customizable Inputs
The indicator starts with user-defined inputs that allow traders to tweak its settings. These inputs include:
RSI: Length (e.g., 14), oversold level (e.g., 30), and overbought level (e.g., 70).
MACD: Fast length (e.g., 12), slow length (e.g., 26), and signal length (e.g., 9).
Volume: Moving average length (e.g., 20) and multipliers for high (e.g., 1.5) and low (e.g., 0.5) volume thresholds.
Price Levels: Period for support and resistance (e.g., 50) and proximity percentage (e.g., 2%).
Score Smoothing: Length for smoothing the score (e.g., 5).
These inputs make the indicator adaptable to different trading styles, assets, or timeframes.
2. Indicator Calculations
The script calculates five key indicators using the input parameters:
RSI: Measures momentum and identifies overbought or oversold conditions.
Formula: rsi = ta.rsi(close, rsi_length)
Example: With a length of 14, it analyzes the past 14 bars of closing prices.
MACD: Tracks trend and momentum using two exponential moving averages (EMAs).
Formula: = ta.macd(close, macd_fast, macd_slow, macd_signal)
Components: MACD line (fast EMA - slow EMA), signal line (EMA of MACD line).
Accumulation/Distribution (A/D): A volume-based indicator showing buying or selling pressure.
Formula: ad = ta.accdist
Reflects cumulative flow based on price and volume.
Volume Moving Average: A simple moving average (SMA) of trading volume.
Formula: vol_ma = ta.sma(volume, vol_ma_length)
Example: A 20-bar SMA smooths volume data.
Support and Resistance Levels: Key price levels based on historical lows and highs.
Formulas:
support = ta.lowest(low, price_level_period)
resistance = ta.highest(high, price_level_period)
Example: Over 50 bars, it finds the lowest low and highest high.
These calculations provide the raw data for generating signals.
3. Signal Generation
Each indicator produces a signal based on specific conditions:
RSI Signal:
+1: RSI < oversold level (e.g., < 30) → potential bullish reversal.
-1: RSI > overbought level (e.g., > 70) → potential bearish reversal.
0: Otherwise.
Logic: Extreme RSI values suggest price may reverse.
MACD Signal:
+1: MACD line > signal line → bullish momentum.
-1: MACD line < signal line → bearish momentum.
0: Equal.
Logic: Crossovers indicate trend shifts.
A/D Signal:
+1: Current A/D > previous A/D → accumulation (bullish).
-1: Current A/D < previous A/D → distribution (bearish).
0: Unchanged.
Logic: Rising A/D shows buying pressure.
Volume Signal:
+1: Volume > high threshold (e.g., 1.5 × volume MA) → strong activity (bullish).
-1: Volume < low threshold (e.g., 0.5 × volume MA) → weak activity (bearish).
0: Otherwise.
Logic: Volume spikes often confirm reversals.
Price Signal:
+1: Close near support (within proximity %, e.g., 2%) → potential bounce.
-1: Close near resistance (within proximity %) → potential rejection.
0: Otherwise.
Logic: Price near key levels signals reversal zones.
4. Composite Score
The raw composite score is the sum of the five signals:
Formula: score = rsi_signal + macd_signal + ad_signal + vol_signal + price_signal
Range: -5 (all signals bearish) to +5 (all signals bullish).
Purpose: Combines multiple perspectives into one number.
5. Smoothed Score
A smoothed version of the score reduces noise:
Formula: score_ma = ta.sma(score, score_ma_length)
Example: With a length of 5, it averages the score over 5 bars.
Purpose: Highlights the trend rather than short-term fluctuations.
6. Visualization
The indicator plots two elements:
Raw Score: A gray histogram showing the composite score per bar.
Style: plot.style_histogram
Color: Gray.
Smoothed Score: A line that changes color:
Green: Score > 0 (bullish).
Red: Score < 0 (bearish).
Gray: Score = 0 (neutral).
Style: plot.style_line, thicker line (e.g., linewidth=2).
These visuals make it easy to spot potential reversals.
How It Works Together
The indicator combines signals from:
RSI: Momentum extremes.
MACD: Trend shifts.
A/D: Buying/selling pressure.
Volume: Confirmation of moves.
Price Levels: Key reversal zones.
By summing these into a composite score, it filters out noise and provides a unified signal. A high positive score (e.g., +3 to +5) suggests a bullish reversal, while a low negative score (e.g., -3 to -5) suggests a bearish reversal. The smoothed score helps traders focus on the trend.
Practical Use
Bullish Reversal: Smoothed score is green and rising → look for buying opportunities.
Bearish Reversal: Smoothed score is red and falling → consider selling or shorting.
Neutral: Score near 0 → wait for clearer signals.
Traders can adjust inputs to suit their strategy, making it versatile for stocks, forex, or crypto.
Pivot S/R with Volatility Filter## *📌 Indicator Purpose*
This indicator identifies *key support/resistance levels* using pivot points while also:
✅ Detecting *high-volume liquidity traps* (stop hunts)
✅ Filtering insignificant pivots via *ATR (Average True Range) volatility*
✅ Tracking *test counts and breakouts* to measure level strength
---
## *⚙ SETTINGS – Detailed Breakdown*
### *1️⃣ ◆ General Settings*
#### *🔹 Pivot Length*
- *Purpose:* Determines how many bars to analyze when identifying pivots.
- *Usage:*
- *Low values (5-20):* More pivots, better for scalping.
- *High values (50-200):* Fewer but stronger levels for swing trading.
- *Example:*
- Pivot Length = 50 → Only the most significant highs/lows over 50 bars are marked.
#### *🔹 Test Threshold (Max Test Count)*
- *Purpose:* Sets how many times a level can be tested before being invalidated.
- *Example:*
- Test Threshold = 3 → After 3 tests, the level is ignored (likely to break).
#### *🔹 Zone Range*
- *Purpose:* Creates a price buffer around pivots (±0.001 by default).
- *Why?* Markets often respect "zones" rather than exact prices.
---
### *2️⃣ ◆ Volatility Filter (ATR)*
#### *🔹 ATR Period*
- *Purpose:* Smoothing period for Average True Range calculation.
- *Default:* 14 (standard for volatility measurement).
#### *🔹 ATR Multiplier (Min Move)*
- *Purpose:* Requires pivots to show *meaningful price movement*.
- *Formula:* Min Move = ATR × Multiplier
- *Example:*
- ATR = 10 pips, Multiplier = 1.5 → Only pivots with *15+ pip swings* are valid.
#### *🔹 Show ATR Filter Info*
- Displays current ATR and minimum move requirements on the chart.
---
### *3️⃣ ◆ Volume Analysis*
#### *🔹 Volume Change Threshold (%)*
- *Purpose:* Filters for *unusual volume spikes* (institutional activity).
- *Example:*
- Threshold = 1.2 → Requires *120% of average volume* to confirm signals.
#### *🔹 Volume MA Period*
- *Purpose:* Lookback period for "normal" volume calculation.
---
### *4️⃣ ◆ Wick Analysis*
#### *🔹 Wick Length Threshold (Ratio)*
- *Purpose:* Ensures rejection candles have *long wicks* (strong reversals).
- *Formula:* Wick Ratio = (Upper Wick + Lower Wick) / Candle Range
- *Example:*
- Threshold = 0.6 → 60% of the candle must be wicks.
#### *🔹 Min Wick Size (ATR %)*
- *Purpose:* Filters out small wicks in volatile markets.
- *Example:*
- ATR = 20 pips, MinWickSize = 1% → Wicks under *0.2 pips* are ignored.
---
### *5️⃣ ◆ Display Settings*
- *Show Zones:* Toggles support/resistance shaded areas.
- *Show Traps:* Highlights liquidity traps (▲/▼ symbols).
- *Show Tests:* Displays how many times levels were tested.
- *Zone Transparency:* Adjusts opacity of zones.
---
## *🎯 Practical Use Cases*
### *1️⃣ Liquidity Trap Detection*
- *Scenario:* Price spikes *above resistance* then reverses sharply.
- *Requirements:*
- Long wick (Wick Ratio > 0.6)
- High volume (Volume > Threshold)
- *Outcome:* *Short Trap* signal (▼) appears.
### *2️⃣ Strong Support Level*
- *Scenario:* Price bounces *3 times* from the same level.
- *Indicator Action:*
- Labels the level with test count (3/5 = 3 tests out of max 5).
- Turns *red* if broken (Break Count > 0).
Deep Dive: How This Indicator Works*
This indicator combines *four professional trading concepts* into one powerful tool:
1. *Classic Pivot Point Theory*
- Identifies swing highs/lows where price previously reversed
- Unlike basic pivot indicators, ours uses *confirmed pivots only* (filtered by ATR)
2. *Volume-Weighted Validation*
- Requires unusual trading volume to confirm levels
- Filters out "phantom" levels with low participation
3. *ATR Volatility Filtering*
- Eliminates insignificant price swings in choppy markets
- Ensures only meaningful levels are plotted
4. *Liquidity Trap Detection*
- Spots institutional stop hunts where markets fake out traders
- Uses wick analysis + volume spikes for high-probability signals
---
Deep Dive: How This Indicator Works*
This indicator combines *four professional trading concepts* into one powerful tool:
1. *Classic Pivot Point Theory*
- Identifies swing highs/lows where price previously reversed
- Unlike basic pivot indicators, ours uses *confirmed pivots only* (filtered by ATR)
2. *Volume-Weighted Validation*
- Requires unusual trading volume to confirm levels
- Filters out "phantom" levels with low participation
3. *ATR Volatility Filtering*
- Eliminates insignificant price swings in choppy markets
- Ensures only meaningful levels are plotted
4. *Liquidity Trap Detection*
- Spots institutional stop hunts where markets fake out traders
- Uses wick analysis + volume spikes for high-probability signals
---
## *📊 Parameter Encyclopedia (Expanded)*
### *1️⃣ Pivot Engine Settings*
#### *Pivot Length (50)*
- *What It Does:*
Determines how many bars to analyze when searching for swing highs/lows.
- *Professional Adjustment Guide:*
| Trading Style | Recommended Value | Why? |
|--------------|------------------|------|
| Scalping | 10-20 | Captures short-term levels |
| Day Trading | 30-50 | Balanced approach |
| Swing Trading| 50-200 | Focuses on major levels |
- *Real Market Example:*
On NASDAQ 5-minute chart:
- Length=20: Identifies levels holding for ~2 hours
- Length=50: Finds levels respected for entire trading day
#### *Test Threshold (5)*
- *Advanced Insight:*
Institutions often test levels 3-5 times before breaking them. This setting mimics the "probe and push" strategy used by smart money.
- *Psychology Behind It:*
Retail traders typically give up after 2-3 tests, while institutions keep testing until stops are run.
---
### *2️⃣ Volatility Filter System*
#### *ATR Multiplier (1.0)*
- *Professional Formula:*
Minimum Valid Swing = ATR(14) × Multiplier
- *Market-Specific Recommendations:*
| Market Type | Optimal Multiplier |
|------------------|--------------------|
| Forex Majors | 0.8-1.2 |
| Crypto (BTC/ETH) | 1.5-2.5 |
| SP500 Stocks | 1.0-1.5 |
- *Why It Matters:*
In EUR/USD (ATR=10 pips):
- Multiplier=1.0 → Requires 10 pip swings
- Multiplier=1.5 → Requires 15 pip swings (fewer but higher quality levels)
---
### *3️⃣ Volume Confirmation System*
#### *Volume Threshold (1.2)*
- *Institutional Benchmark:*
- 1.2x = Moderate institutional interest
- 1.5x+ = Strong smart money activity
- *Volume Spike Case Study:*
*Before Apple Earnings:*
- Normal volume: 2M shares
- Spike threshold (1.2): 2.4M shares
- Actual volume: 3.1M shares → STRONG confirmation
---
### *4️⃣ Liquidity Trap Detection*
#### *Wick Analysis System*
- *Two-Filter Verification:*
1. *Wick Ratio (0.6):*
- Ensures majority of candle shows rejection
- Formula: (UpperWick + LowerWick) / Total Range > 0.6
2. *Min Wick Size (1% ATR):*
- Prevents false signals in flat markets
- Example: ATR=20 pips → Min wick=0.2 pips
- *Trap Identification Flowchart:*
Price Enters Zone →
Spikes Beyond Level →
Shows Long Wick →
Volume > Threshold →
TRAP CONFIRMED
---
## *💡 Master-Level Usage Techniques*
### *Institutional Order Flow Analysis*
1. *Step 1:* Identify pivot levels with ≥3 tests
2. *Step 2:* Watch for volume contraction near levels
3. *Step 3:* Enter when trap signal appears with:
- Wick > 2×ATR
- Volume > 1.5× average
### *Multi-Timeframe Confirmation*
1. *Higher TF:* Find weekly/monthly pivots
2. *Lower TF:* Use this indicator for precise entries
3. *Example:*
- Weekly pivot at $180
- 4H shows liquidity trap → High-probability reversal
---
## *⚠ Critical Mistakes to Avoid*
1. *Using Default Settings Everywhere*
- Crude oil needs higher ATR multiplier than bonds
2. *Ignoring Trap Context*
- Traps work best at:
- All-time highs/lows
- Major psychological numbers (00/50 levels)
3. *Overlooking Cumulative Volume*
- Check if volume is building over multiple tests
Price Extreme BandsPrice Extreme Bands Description
This indicator calculates and displays Price Extreme Bands based on an Exponential Moving Average (EMA) and True Range Average True Range (TR ATR). It utilizes a custom "Super Smoother" function to smooth the bands, providing a clearer representation of potential price extremes without sacrificing accuracy.
Usage
Built for specifically for intraday timeframes, this indicator identifies short term price extremes and volatility ranges. Traders can observe when price moves towards the outer bands, suggesting strong momentum or potential overbought/oversold conditions. The filled zones highlight areas of increased volatility which can used as exit criteria for a trade, possible reversal points in ranging markets or price ranges where price momentum could slow in trending markets.
Key Features
Length Input: Controls the length of the EMA and TR ATR calculations.
Multiplier Inputs: Uses two fixed multipliers (1.71 and 2.50) to create bands.
Super Smoother: Applies a custom smoothing function to the bands for reduced noise.
Fill Zones: Fills the areas between the inner and outer bands to highlight potential volatility ranges.
Calculation:
1. EMA (Basis): Calculates the Exponential Moving Average of the selected source.
2. TR ATR: Calculates the True Range and then smoothes it using RMA (Rolling Moving Average).
3. Bands: Calculates upper and lower bands using the EMA and ATR, with multipliers of 1.71 and 2.50.
4. Super Smoother: Applies a smoothing function to the calculated bands.
Visuals:
Basis Line: Plots the EMA (basis) (invisible by default).
Inner Bands (1.71 Multiplier): Plots the smoothed bands with a distinct color (e.g., orange) (invisible by default).
Outer Bands (2.50 Multiplier): Plots the smoothed bands with a different color (e.g., purple) (invisible by default).
Fill Zones: Fills the region between the inner and outer upper bands and the inner and outer lower bands with a translucent color (e.g. light blue).
// Note: The plot lines are invisible by default. To view the basis, upper and lower band lines, adjust the visibility settings in the indicator's settings.
Uniqueness: Ready of the box. Code and parameters built specifically for 1m to 15m timeframes provides users with an indicator to easily identify price extremes. The use of TR ATR and addition of the Super Smoother calculation create a easier visualization and implementation compared to existing price band options.
AI Trend Momentum SniperThe AI Trend Momentum Sniper is a powerful technical analysis tool designed for day trading. This strategy combines multiple momentum and trend indicators to identify high-probability entry and exit points. The indicator utilizes a combination of Supertrend, MACD, RSI, ATR (Average True Range), and On-Balance Volume (OBV) to generate real-time signals for buy and sell opportunities.
Key Features:
Supertrend for detecting market direction (bullish or bearish).
MACD for momentum confirmation, highlighting changes in market momentum.
RSI to filter out overbought/oversold conditions and ensure high-quality trades.
ATR as a volatility filter to adjust for changing market conditions.
OBV (On-Balance Volume) to confirm volume strength and trend validity.
Dynamic Stop-Loss & Take-Profit based on ATR to manage risk and lock profits.
This indicator is tailored for intraday traders looking for quick market moves, especially in volatile and high liquidity assets like Bitcoin (BTC) and Ethereum (ETH). It helps traders capture short-term trends with efficient risk management tools.
How to Apply:
Set Your Chart: Apply the AI Trend Momentum Sniper to a 5-minute (M5) or 15-minute (M15) chart for optimal performance.
Buy Signal: When the indicator generates a green arrow below the bar, it indicates a buy signal based on positive trend and momentum alignment.
Sell Signal: A red arrow above the bar signals a sell condition when the trend and momentum shift bearish.
Stop-Loss and Take-Profit: The indicator automatically calculates dynamic stop-loss and take-profit levels based on the ATR value for each trade, ensuring proper risk management.
Alerts: Set up custom alerts for buy or sell signals, and get notified instantly when opportunities arise.
Best Markets for Use:
BTC/USDT, ETH/USDT – High liquidity and volatility.
Major altcoins with sufficient volume.
Avoid using it on low-liquidity assets where price action may become erratic.
Timeframes:
This indicator is best suited for lower timeframes (5-minute to 15-minute charts) to capture quick price movements in trending markets.
SuperTrend MTF Pro [Cometreon]The SuperTrend MTF Pro takes the classic SuperTrend to a whole new level of customization and accuracy. Unlike the standard version, this indicator allows you to select different moving averages, apply it to various chart types, and fine-tune every key parameter.
If you're looking for an advanced, non-repainting, and highly configurable SuperTrend, this is the right choice for you.
🔷 New Features and Improvements
🟩 Multi-MA SuperTrend
Now you can customize the SuperTrend calculation by choosing from 15 different moving averages:
SMA (Simple Moving Average)
EMA (Exponential Moving Average)
WMA (Weighted Moving Average)
RMA (Smoothed Moving Average)
HMA (Hull Moving Average)
JMA (Jurik Moving Average)
DEMA (Double Exponential Moving Average)
TEMA (Triple Exponential Moving Average)
LSMA (Least Squares Moving Average)
VWMA (Volume-Weighted Moving Average)
SMMA (Smoothed Moving Average)
KAMA (Kaufman’s Adaptive Moving Average)
ALMA (Arnaud Legoux Moving Average)
FRAMA (Fractal Adaptive Moving Average)
VIDYA (Variable Index Dynamic Average)
🟩 Multiple Chart Types
You're no longer limited to candlestick charts! Now you can use SuperTrend with different chart formats, including:
Heikin Ashi
Renko
Kagi
Line Break
Point & Figure
🟩 Customizable Timeframe
Now you can adjust the SuperTrend timeframe without repainting issues, avoiding signal distortions.
🔷 Technical Details and Customizable Inputs
SuperTrend offers multiple customization options to fit any trading strategy:
1️⃣ ATR Period – Defines the ATR length, affecting the indicator’s sensitivity.
2️⃣ Source – Selects the price value used for calculations (Close, HL2, Open, etc.).
3️⃣ ATR Mult – Multiplies the ATR to determine band distance. Higher values reduce false signals, lower values make it more reactive.
4️⃣ Change ATR Calculation Method – When enabled, uses the default ATR method; when disabled, allows selecting another Moving Average with "Use Different Type".
5️⃣ Source Break – Defines the price source for trend changes (Close for more stability, High/Low for more reactivity).
6️⃣ Use Different Type – Allows selecting an alternative Moving Average for ATR calculation if "Change ATR Calculation Method" is disabled.
7️⃣ SuperTrend Type – Advanced options for specific MAs (JMA, ALMA, FRAMA, VIDYA), with dedicated parameters like Phase, Sigma, and Offset for optimized responsiveness.
8️⃣ Ticker Settings – Customize parameters for special chart types such as Renko, Heikin Ashi, Kagi, Line Break, and Point & Figure, adjusting reversal, number of lines, and ATR length.
9️⃣ Timeframe – Enables using SuperTrend on a higher timeframe.
🔟 Wait for Timeframe Closes -
Enabled ✅ – Prevents multiple signals, useful for precise alerts.
Disabled ❌ – Displays SuperTrend smoothly without interruptions.
🔷 How to Use SuperTrend MTF Pro
🔍 Identifying Trends
SuperTrend follows the ongoing trend and provides clear visual signals:
When the price is above the line, the trend is bullish.
When the price is below the line, the trend is bearish.
📈 Interpreting Signals
Line color and position change → Possible trend reversal
Bounce off the line → Potential trend continuation
Strong breakout of the line → Possible reversal
🛠 Integration with Other Tools
RSI or MACD to filter false signals
Moving Averages to confirm trend direction
Support and Resistance to improve entry points
☄️ If you find this indicator useful, leave a Boost to support its development!
Every feedback helps to continuously improve the tool, offering an even more effective trading experience. Share your thoughts in the comments! 🚀🔥
Arbitrage Spot-Futures Don++Strategy: Spot-Futures Arbitrage Don++
This strategy has been designed to detect and exploit arbitrage opportunities between the Spot and Futures markets of the same trading pair (e.g. BTC/USDT). The aim is to take advantage of price differences (spreads) between the two markets, while minimizing risk through dynamic position management.
[Operating principle
The strategy is based on calculating the spread between Spot and Futures prices. When this spread exceeds a certain threshold (positive or negative), reverse positions are opened simultaneously on both markets:
- i] Long Spot + Short Futures when the spread is positive.
- i] Short Spot + Long Futures when the spread is negative.
Positions are closed when the spread returns to a value close to zero or after a user-defined maximum duration.
[Strategy strengths
1. Adaptive thresholds :
- Entry/exit thresholds can be dynamic (based on moving averages and standard deviations) or fixed, offering greater flexibility to adapt to market conditions.
2. Robust data management :
- The script checks the validity of data before executing calculations, thus avoiding errors linked to missing or invalid data.
3. Risk limitation :
- A position size based on a percentage of available capital (default 10%) limits exposure.
- A time filter limits the maximum duration of positions to avoid losses due to persistent spreads.
4. Clear visualization :
- Charts include horizontal lines for entry/exit thresholds, as well as visual indicators for spread and Spot/Futures prices.
5. Alerts and logs :
- Alerts are triggered on entries and exits to inform the user in real time.
[Points for improvement or completion
Although this strategy is functional and robust, it still has a few limitations that could be addressed in future versions:
1. [Limited historical data :
- TradingView does not retrieve real-time data for multiple symbols simultaneously. This can limit the accuracy of calculations, especially under conditions of high volatility.
2. [Lack of liquidity management :
- The script does not take into account the volumes available on the order books. In conditions of low liquidity, it may be difficult to execute orders at the desired prices.
3. [Non-dynamic transaction costs :
- Transaction costs (exchange fees, slippage) are set manually. A dynamic integration of these costs via an external API would be more realistic.
4. User-dependency for symbols :
- Users must manually specify Spot and Futures symbols. Automatic symbol validation would be useful to avoid configuration errors.
5. Lack of advanced backtesting :
- Backtesting is based solely on historical data available on TradingView. An implementation with third-party data (via an API) would enable the strategy to be tested under more realistic conditions.
6. [Parameter optimization :
- Certain parameters (such as analysis period or spread thresholds) could be optimized for each specific trading pair.
[How can I contribute?
If you'd like to help improve this strategy, here are a few ideas:
1. Add additional filters:
- For example, a filter based on volume or volatility to avoid false signals.
2. Integrate dynamic costs:
- Use an external API to retrieve actual costs and adjust thresholds accordingly.
3. Improve position management:
- Implement hedging or scalping mechanisms to maximize profits.
4. Test on other pairs:
- Evaluate the strategy's performance on other assets (ETH, SOL, etc.) and adjust parameters accordingly.
5. Publish backtesting results :
- Share detailed analyses of the strategy's performance under different market conditions.
[Conclusion
This Spot-Futures arbitrage strategy is a powerful tool for exploiting price differentials between markets. Although it is already functional, it can still be improved to meet more complex trading scenarios. Feel free to test, modify and share your ideas to make this strategy even more effective!
[Thank you for contributing to this open-source community!
If you have any questions or suggestions, please feel free to comment or contact me directly.
FFT Approximation StrategyExperimenting FFT Strategy on YCL (USD/JPY 2 x)
This script approximates the effects of FFT by identifying convergence between short- and long-term cycles. While it doesn't provide the precision of true spectral analysis, it captures the essence of cyclical market behavior.
How FFT Concepts Improve YCL Entry Points
Cycle Identification:
Use external FFT analysis to identify dominant cycles in USD/JPY price movements.
Apply these cycles to refine entry zones for YCL.
Noise Filtering:
High-frequency components identified by FFT can help filter out market noise.
Focus on low-frequency trends for more reliable signals.
Timing Optimization:
Combine cycle analysis with gamma exposure proxies to pinpoint moments of accelerated price movement.
Volume Pro Indicator## Volume Pro Indicator
A powerful volume indicator that visualizes volume distribution across different price levels. This tool helps you easily identify where trading activity concentrates within the price range.
### Key Features:
- **Volume visualization by price levels**: Green (lower zone), Magenta (middle zone), Cyan (upper zone)
- **VPOC (Volume Point of Control)**: Shows the price level with the highest volume concentration
- **High and Low lines**: Highlights the extreme levels of the analyzed price range
- **Customizable historical analysis**: Configurable number of days for calculation
### How to use it:
- Colored volumes show where trading activity concentrates within the price range
- The VPOC helps identify the most significant price levels
- Different colors allow you to quickly visualize volume distribution in different price areas
Customizable with numerous options, including analysis period, calculation resolution, colors, and visibility of different components.
### Note:
This indicator works best on higher timeframes (1H, 4H, 1D) and liquid markets. It's a visual analysis tool that enhances your understanding of market structure.
#volume #vpoc #distribution #volumeprofile #trading #analysis #indicator #professional #pricelevels #volumedistribution