CoffeeShopCrypto Supertrend Liquidity EngineMost SuperTrend indicators use fixed ATR multipliers that ignore context—forcing traders to constantly tweak settings that rarely adapt well across timeframes or assets.
This Supertrend is a nodd to and a more completion of the work
done by Olivier Seban ( @olivierseban )
This version replaces guesswork with an adaptive factor based on prior session volatility, dynamically adjusting stops to match current conditions. It also introduces liquidity-aware zones, real-time strength histograms, and a visual control panel—making your stoploss smarter, more responsive, and aligned with how the market actually moves.
📏 The Multiplier Problem & Adaptive Factor Solution
Traditional SuperTrend indicators rely on fixed ATR multipliers—often arbitrary numbers like 1.5, 2, or 3. The issue? No logical basis ties these values to actual market conditions. What works on a 5-minute Nasdaq chart fails on a daily EUR/USD chart. Traders spend hours tweaking multipliers per asset, timeframe, or volatility phase—and still end up with stoplosses that are either too tight or too loose. Worse, the market doesn’t care about your setting—it behaves according to underlying volatility, not your parameter.
This version fixes that by automating the multiplier selection entirely. It uses a 4-zone model based on the current ATR relative to the previous session’s ATR, dynamically adjusting the SuperTrend factor to match current volatility. It eliminates guesswork, adapts to the asset and timeframe, and ensures you’re always using a context-aware stoploss—one that evolves with the market instead of fighting it.
ATR EXAMPLE
Let’s say prior session ATR = 2.00
Now suppose current ATR = 0.32
This places us in Zone 1 (Very Low Volatility)
It doesn’t imply "overbought" or "oversold" — it tells you the market is moving very little, which often means:
Lower risk | Smaller stops | Smaller opportunities (and losses)
🔁 Liquidity Zones vs. Arbitrary Pullbacks
The standard SuperTrend stop loss line often looks like price “barely misses it” before continuing its trend. Traders call this "stop hunting," but what’s really happening is liquidity collection—price pulls back into a zone rich in orders before continuing. The problem? The old SuperTrend doesn’t show this zone. It only draws the outer limit, leaving no visual cue for where entries or continuation moves might realistically originate.
This script introduces 2 levels in the Liquidity Zone. One for Support and one for Stophunts, which draw dynamically between the current price and the SuperTrend line. These levels reflect where the market is most likely to revisit before resuming the trend. By visualizing the area just above the Supertrend stop loss, you can anticipate pullbacks, spot ideal re-entries, and avoid premature exits. This bridges the gap between mechanical stoploss logic and real-world liquidity behavior.
⏳ Prior Session ATR vs. Live ATR
Using real-time ATR to determine movement potential is like driving by looking in your rearview mirror. It’s reactive, not predictive. Traders often base decisions on live ATR, unaware that today’s range is still unfolding —creating volatility mismatches between what’s calculated and what actually matters. Since ATR reflects range, calculating it mid-session gives an incomplete and misleading picture of true volatility.
Instead, this system uses the ATR from the previous session , anchoring your volatility assumptions in a fully-formed price structure . It tells you how far price moved in the last full market phase—be it London, New York, or Tokyo—giving you a more reliable gauge of expected range today. This is a smarter way to estimate how far price could move rather than how far it has moved.
The Smoothing function will take the ATR, Support, Resistance, Stophunt Levels, and the Moving Avearage and smooth them by the calculation you choose.
It will also plot a moving average on your chart against closing prices by the smoothing function you choose.
🧭 Scalping vs. Trending Modes
The market moves in at least 4 phases. Trending, Ranging, Consolidation, Distribution.
Every trader has a different style —some scalp low-volatility moves during off-hours, while others ride macro trends across days. The problem with classic SuperTrend? It treats every market condition the same. A fixed system can’t possibly provide proper stoploss spacing for both a fast scalp and a long-term swing. Traders are forced to rebuild their system every time the market changes character or the session shifts.
This version solves that with a simple toggle:
Scalping or Trend Mode . With one switch, it inverts the logic of the adaptive factor to either tighten or loosen your trailing stops. During low-liquidity hours or consolidation phases, Scalping Mode offers snug stoplosses. During expansion or clear directional bias.
Trend Mode lets the trade breathe. This is flexibility built directly into the logic—not something you have to recalibrate manually.
📉 Histogram Oscillator for Move Strength
In legacy indicators, there’s no built-in way to gauge when the move is losing power . Traders rely on price action or momentum indicators to guess if a trend is fading. But this adds clutter, lag, and often contradiction. The classic SuperTrend doesn’t offer insight into how strong or weak the current trend leg is—only whether price has crossed a line.
This version includes a Trending Liquidity Histogram —a histogram that shows whether the liquidity in the SuperTrend zone is expanding or compressing. When the bars weaken or cross toward zero, it signals liquidity exhaustion . This early warning gives you time to prep for reversals or anticipate pullbacks. It even adapts visually depending on your trading mode, showing color-coded signals for scalping vs. trending behavior. It's both a strength gauge and a trade timing tool—built into your stoploss logic.
Histogram in Scalping Mode
Histogram in Trending Mode
📊 Visual Table for Real-Time Clarity
A major issue with custom indicators is opacity —you don’t always know what settings or values are currently being used. Even worse, if your dynamic logic changes mid-trade, you may not notice unless you go digging into the code or logs. This can create confusion, especially for discretionary traders.
This SuperTrend solves it with a clean visual summary table right on your chart. It shows your current ATR value, adaptive multiplier, trailing stop level, and whether a new zone size is active. That means no surprises and no second-guessing—everything important is visible and updated in real-time.
Breadth Indicators
Trendlines with Breaks + Hull Suite + SuperTrend
الدخول بعد اختراق او كسر الترند المطابق للسحابه والخروج مع تغيير لون الخط المتدرج
Entering after breaking or breaking the trend corresponding to the cloud and exit with changing the colour of the graduated line
Trendlines with Breaks + Hull Suite + SuperTrendEntering after breaking or breaking the trend corresponding to the cloud and exit with changing the colour of the graduated line
الدخول بعد اختراق أو كسر الترند المطابق للسحابة والخروج مع تغيير لون الخط المتدرج
Stephis Supply & Demand Zones v3
📉 Support
Definition: Support is a price level where a downtrend can be expected to pause or reverse due to a concentration of buying interest.
Why it matters: When the price of an asset falls to a support level, traders expect buyers to step in, preventing the price from falling further.
Visual clue: On a chart, support often appears as a horizontal line where the price has bounced up multiple times.
📈 Demand
Definition: Demand refers to the willingness and ability of buyers to purchase an asset at a given price.
In trading context: High demand typically pushes prices up, while low demand can lead to price drops.
Relation to support: A support level exists because of demand—buyers are willing to buy at that price, creating a floor.
🧠 How They Work Together
When price approaches a support level, traders watch to see if demand increases—if it does, the price may bounce.
If the support level is broken, it may signal that demand has weakened, and the price could fall further.
🔁 Opposite Concept: Resistance & Supply
Resistance is the opposite of support—it's a level where selling pressure (supply) may stop a price from rising.
Just like demand creates support, supply creates resistance.
[FS] Time & Cycles Time & Cycles
A comprehensive trading session indicator that helps traders identify and track key market sessions and their price levels. This tool is particularly useful for forex and futures traders who need to monitor multiple trading sessions.
Key Features:
• Multiple Session Support:
- London Session
- New York Session
- Sydney Session
- Asia Session
- Customizable TBD Session
• Session Visualization:
- Clear session boxes with customizable colors
- Session labels with adjustable visibility
- Support for sessions crossing midnight
- Timezone-aware calculations
• Price Level Tracking:
- Daily High/Low levels
- Weekly High/Low levels
- Previous session High/Low levels
- Customizable history depth for each level type
• Customization Options:
- Adjustable colors for each session
- Customizable border styles
- Label visibility controls
- Timezone selection
- History level depth settings
• Technical Features:
- High-performance calculation engine
- Support for multiple timeframes
- Efficient memory usage
- Clean and intuitive visual display
Perfect for:
• Forex traders monitoring multiple sessions
• Futures traders tracking market hours
• Swing traders identifying key session levels
• Day traders planning their trading hours
• Market analysts studying session patterns
The indicator helps traders:
- Identify active trading sessions
- Track session-specific price levels
- Monitor market activity across different time zones
- Plan trades based on session boundaries
- Analyze price action within specific sessions
Note: This indicator is designed to work across all timeframes and is optimized for performance with minimal impact on chart loading times.
NCrypt30 Breadth Strategy (Long Only, SMA 60, 7% SL)Breadth indication is the top 30 coin on coinbase by marketcap excluding BTC ETH & Stables to show overall alts sentiment. Trade will trigger when breadth hits 0 = the top 30 tokens on coinbase are all under the 60sma on the 4hr timeframe. The strategy has the trade close when breadth hits 100 or hits the stop loss which i have set at 7%, although is changeable to your risk tolerance.
Daily/Weekly/Monthly High/LowThis indicator displays previous daily, weekly, and monthly highs and lows on your chart. The lines automatically disappear once price breaks through these levels, helping you identify key support and resistance zones that haven't been tested yet.
Aggressive Volume Indications + SupertrendVolume Precision: The aggressive volume logic is well-designed to filter for conviction-backed price movement. Using (high - low) * 0.7 as the body filter adds a nice touch to weed out noise.
Customizability: The script allows for tunable inputs on both the volume and trend side, which gives flexibility across different instruments or timeframes.
Trend Detection Logic: Your use of persistent variables to track supertrend and trendUp adds robustness to the trend-following element.
💡 Suggestions:
Optional Signal Confirmation: You could incorporate a confirmation mechanism—like checking if price closes above or below the Supertrend line before plotting the aggressive volume markers. That might help filter out traps during ranging markets.
Barcolor or Background Highlighting: For visual clarity, adding barcoloring based on aggressive buying/selling might amplify signal visibility.
Entry/Exit Potential: Consider integrating a simple crossover strategy to simulate entries based on these signals—especially since you're already working on a Nifty 50 script with market psychology in mind.
VWAP + EMA20 + EMA200 + RSI + SR + Panel vwap ema 20 + ema 200 con senales de entrada y soportes dinamicos ideal 1 hora
High/LowPrevious Day High/Low & Weekly Open Indicator
A clean and simple indicator that displays key reference levels for intraday trading.
Features:
Previous day's high and low levels
Current week's opening price
Auto-hides levels once broken (prevents clutter)
Resets automatically at the start of each trading day
No repainting - uses proper security function calls
How it works:
The indicator plots yesterday's high/low as horizontal lines on your chart. When price breaks above the previous day's high, that level disappears. Same for the low. This keeps your chart clean and shows only unbroken levels.
Perfect for:
Day traders using previous day's range as reference
Breakout trading strategies
Support/resistance analysis
Clean chart setup without manual level drawing
The cyan lines show previous day's high/low, while the orange line displays the weekly open. All levels use non-repainting data for reliable backtesting.
MACD with Colored HistogramA script specifying the difference between convergence and divergence indicated with an icon.
Unified Strategy
Traffic Light + Trend Trader
Description:
The Trend Trader strategy leverages the power of moving averages (MAs) and MACD to identify market trends and capitalize on momentum shifts. This indicator is ideal for traders seeking consistent signals for both entry and exit points, making it versatile across various markets, including stocks, forex, and commodities.
Key Features:
Dynamic Trend Detection:
Short and long-term moving averages (MAs) provide insights into the current market trend.
Crossovers between MAs signal potential buy or sell opportunities.
MACD Confirmation:
Combines MA crossovers with MACD for double confirmation of trend changes.
Color-coded background highlights bullish or bearish momentum during active trading sessions.
Session Customization:
Allows traders to focus on specific trading hours by customizing session times.
Ensures the strategy aligns with your preferred trading schedule.
Instrument-Specific Targeting:
Tailored targets for popular instruments like US30, NDX100, GER40, and GOLD.
Adaptable to different volatility profiles and market behaviors.
How to Use:
Buy Signal: When the short MA crosses above the long MA, confirmed by MACD trending upward.
Sell Signal: When the short MA crosses below the long MA, confirmed by MACD trending downward.
Background Colors: Green indicates bullish momentum; red highlights bearish momentum during the session.
Benefits:
Enhances trend-following strategies by reducing noise and false signals.
Suitable for both short-term scalping and long-term trend trading.
Highly customizable for different trading styles and instruments.
Tags:
Trend Trader, Moving Average Crossover, MACD, Forex, Stocks, Scalping, Swing Trading, Long, Short, TradingView Indicator.
Additional Instructions:
Ensure session times and target levels are tailored to your trading strategy.
JEYOUNG MADE20일선 위로올라갈때 매수표시 20일선 아래로내려갈때 매도 표시 5일 20일 120일 200일선 포함됨
("Show a buy signal when the price moves above the 20-day moving average, and a sell signal when it falls below the 20-day moving average. Include the 5-day, 20-day, 120-day, and 200-day moving averages."
Let me know if you want this formatted for a trading script or chart annotation as well.)
Sessions BrockJavaThis script is a flexible, timezone-aware Session High/Low indicator for TradingView. It is based on the original work of kurtsmock (Mozilla Public License 2.0) and includes enhancements for UTC offset handling and autoscale compatibility.
Features:
Tracks and plots the highest and lowest prices within user-defined trading sessions.
Session times default to UTC, but you can set a custom UTC offset (e.g., -4 for New York, 0 for London, +8 for Singapore).
Reset modes: by session, by a set number of hours, or daily.
Backtesting support: specify a date range to limit indicator activity to historical periods.
Session constraint: restricts operation to specific sessions, with optional weekend inclusion for crypto or 24/7 markets.
Visual customization: choose to display session high/low as lines, background color, or filled regions. All colors and transparencies are user-configurable.
Efficient plotting: session levels are always included in TradingView’s autoscale, so you never lose sight of key levels.
Technical details:
Session definition uses TradingView’s session string format (e.g., 1800-1500).
Timezone handling is automatic and accurate, even with custom offsets.
Designed for high efficiency, supporting up to 5000 bars back and 500 lines.
Credit:
Major credit to kurtsmock, the original author. This version adds UTC offset and improved autoscale support.
License: Mozilla Public License 2.0
If you need session-based high/low levels that always fit your chart and your trading hours, this script is for you.
CSM Duplo (Força do Par) - FinalSTRENGTH OF THE ESTROGRAMMED CURRENCY, focused on extracting the matrix from both the base currency and the quoted currency.
Small Body Candle Highlighter//@version=5
indicator("Small Body Candle Highlighter", overlay=true)
// Set max difference in points (adjust as needed based on asset's price scale)
max_diff = 1.5
// Calculate the open-close difference
body_diff = math.abs(close - open)
// Conditions
small_body = body_diff <= max_diff
bullish = close > open
bearish = open > close
// Colors
bull_color = color.new(color.green, 0)
bear_color = color.new(color.red, 0)
// Plot shapes on qualifying candles
plotshape(small_body and bullish, location=location.abovebar, color=bull_color, style=shape.circle, size=size.small, title="Bullish Small Body")
plotshape(small_body and bearish, location=location.belowbar, color=bear_color, style=shape.circle, size=size.small, title="Bearish Small Body")
📅 Non-Euclidean Fib Gibbonaci📅 *Non-Euclidean Fib Gibbonaci**
This indicator dynamically identifies high-probability liquidity zones using a combination of **weekly market structure**, **asymmetric Fibonacci geometry**, and **volume clustering**.
### 🔍 **What It Does:**
* **Detects Weekly Structure Shifts:**
Automatically checks each new week for a break in weekly highs or lows. If a structural change is detected, all liquidity levels are recalculated.
* **Builds Non-Euclidean Fibonacci Ranges:**
Instead of traditional swing-based Fibs, this indicator creates a **distorted Fibonacci zone** around the weekly close using the Golden Ratio (φ ≈ 1.618). This generates asymmetric, forward-projected Fib levels.
* **Volume-Based Liquidity Zones:**
For each projected level, volume is accumulated from the past 50 bars when the price closed near that level. These volumes are then **tiered dynamically based on the previous week’s total volume**.
* **5 Dynamic Volume Tiers:**
Liquidity levels are color-coded based on volume interaction:
* 🔴 **Very High**
* 🟠 **High**
* 🟡 **Mid**
* 🔵 **Low**
* ⚪ **Very Low**
(Thresholds are based on **percentage of last week’s volume**, fully adjustable via settings.)
* **Smart Drawing Engine:**
* Only draws when structure changes.
* Includes inverse bands (bottom-up projections), midlines (optional), and clean auto-clearing of old levels.
* Optional labels show Fib level and volume tier.
* **Predictive Liquidity Zones:**
High-volume extension levels (e.g. Fib 1.272 or above) trigger **"🔺 Potential Top"** and **"🔻 Potential Bottom"** labels, helping to forecast potential exhaustion zones.
---
### ⚙️ **Customizable Settings:**
* Enable/disable:
* Inverse Fibonacci bands
* Midlines between bands
* Volume-based labels
* Adjust:
* Volume tier thresholds (% of prior weekly volume)
* Label display filtering (only show top tiers)
---
### ✅ **Best Used For:**
* Traders who want to identify **key liquidity zones** based on structural shifts.
* Spotting **volume-backed Fib confluences** that may act as magnets or reversal zones.
* Forecasting **potential tops/bottoms** using historical price/volume behavior — dynamically, and in context.
---
### 🚫 No Repainting:
Once weekly structure is established, levels do not repaint. Volume clustering is based on actual historic bar closes.
---
Let me know if you want a shorter version or a version with emojis minimized for a more formal audience.
Yelober - Intraday ETF Dashboard# How to Read the Yelober Intraday ETF Dashboard
The Intraday ETF Dashboard provides a powerful at-a-glance view of sector performance and trading opportunities. Here's how to interpret and use the information:
## Basic Dashboard Reading
### Color-Coding System
- **Green values**: Positive performance or bullish signals
- **Red values**: Negative performance or bearish signals
- **Symbol colors**: Green = buy signal, Red = sell signal, Gray = neutral
### Example 1: Identifying Strong Sectors
If you see XLF (Financials) with:
- Day % showing +2.65% (green background)
- Symbol in green color
- RSI of 58 (not overbought)
**Interpretation**: Financial sector is showing strength and momentum without being overextended. Consider long positions in top financial stocks like JPM or BAC.
### Example 2: Spotting Weakness
If you see XLK (Technology) with:
- Day % showing -1.20% (red background)
- Week % showing -3.50% (red background)
- Symbol in red color
- RSI of 35 (approaching oversold)
**Interpretation**: Technology sector is showing weakness across multiple timeframes. Consider avoiding tech stocks or taking short positions in names like MSFT or AAPL, but be cautious as the low RSI suggests a bounce may be coming.
## Advanced Interpretations
### Example 3: Sector Rotation Detection
If you observe:
- XLE (Energy) showing +2.10% while XLK (Technology) showing -1.50%
- Both sectors' Week % values showing the opposite trend
**Interpretation**: This suggests money is rotating out of technology into energy stocks. This rotation pattern is actionable - consider reducing tech exposure and increasing energy positions (look at XOM, CVX in the Top Stocks column).
### Example 4: RSI Divergences
If you see XLU (Utilities) with:
- Day % showing +0.50% (small positive)
- RSI showing 72 (overbought, red background)
**Interpretation**: Despite positive performance, the high RSI suggests the sector is overextended. This divergence between price and indicator suggests caution - the rally in utilities may be running out of steam.
### Example 5: Relative Strength in Weak Markets
If SPY shows -1.20% but XLP (Consumer Staples) shows +0.30%:
**Interpretation**: Consumer staples are showing defensive strength during market weakness. This is typical risk-off behavior. Consider defensive positions in stocks like PG, KO, or PEP for protection.
## Practical Application Scenarios
### Day Trading Setup
1. **Morning Market Assessment**:
- Check which sectors are green pre-market
- Focus on sectors with Day % > 1% and RSI between 40-70
- Identify 2-3 stocks from the Top Stocks column of the strongest sector
2. **Midday Reversal Hunting**:
- Look for sectors with symbol color changing from red to green
- Confirm with RSI moving away from extremes
- Trade stocks from that sector showing similar pattern changes
### Swing Trading Application
1. **Trend Following**:
- Identify sectors with positive Day % and Week %
- Look for RSI values in uptrend but not overbought (45-65)
- Enter positions in top stocks from these sectors, using daily charts for confirmation
2. **Contrarian Setups**:
- Find sectors with deeply negative Day % but RSI < 30
- Look for divergence (price making new lows but RSI rising)
- Consider counter-trend positions in the stronger stocks within these oversold sectors
## Reading Special Conditions
### Example 6: Risk-Off Environment
If you observe:
- XLP (Consumer Staples) and XLU (Utilities) both green
- XLK (Technology) and XLY (Consumer Disc) both red
- SPY slightly negative
**Interpretation**: Classic risk-off rotation. Investors are moving to safety. Consider defensive positioning and reducing exposure to growth sectors.
### Example 7: Market Breadth Analysis
Count the number of sectors in green vs. red:
- If 7+ sectors are green: Strong bullish breadth, consider aggressive long positioning
- If 7+ sectors are red: Weak market breadth, consider defensive positioning or shorts
- If evenly split: Market is indecisive, focus on specific sector strength instead of broad market exposure
Remember that this dashboard is most effective when combined with broader market analysis and appropriate risk management strategies.
Spaghetti 2.0 - Multi-Asset Performance [By Barbell_Fi]This is an updated and more opinionated take on the original Spaghetti indicator.
Multi Asset Performance indicator (also called “Spaghetti”) makes it easy to monitor the changes in Price, Open Interest, and On Balance Volume across multiple assets simultaneously, distinguish assets that are overperforming or underperforming, observe the relative strength of different assets or currencies, use it as a tool for identifying mean reversion opportunities and even for constructing pairs trading strategies, detect "risk-on" or "risk-off" periods, evaluate statistical relationships between assets through metrics like correlation and beta, construct hedging strategies, trade rotations and much more.
Start by selecting a time period (e.g., 1 DAY) to set the interval for when data is reset. This will provide insight into how price, open interest, and on-balance volume change over your chosen period. In the settings, asset selection is fully customizable, allowing you to create three groups of up to 30 tickers each. These tickers can be displayed in a variety of styles and colors. Additional script settings offer a range of options, including smoothing values with a Simple Moving Average (SMA), highlighting the top or bottom performers, plotting the group mean, applying heatmap/gradient coloring, generating a table with calculations like beta, correlation, and RSI, creating a profile to show asset distribution around the mean, and much more.
One of the most important script tools is the screener table, which can display:
🔸 Percentage Change (Represents the return or the percentage increase or decrease in Price/OI/OBV over the current selected period)
🔸 Beta (Represents the sensitivity or responsiveness of asset's returns to the returns of a benchmark/mean. A beta of 1 means the asset moves in tandem with the market. A beta greater than 1 indicates the asset is more volatile than the market, while a beta less than 1 indicates the asset is less volatile. For example, a beta of 1.5 means the asset typically moves 150% as much as the benchmark. If the benchmark goes up 1%, the asset is expected to go up 1.5%, and vice versa.)
🔸 Correlation (Describes the strength and direction of a linear relationship between the asset and the mean. Correlation coefficients range from -1 to +1. A correlation of +1 means that two variables are perfectly positively correlated; as one goes up, the other will go up in exact proportion. A correlation of -1 means they are perfectly negatively correlated; as one goes up, the other will go down in exact proportion. A correlation of 0 means that there is no linear relationship between the variables. For example, a correlation of 0.5 between Asset A and Asset B would suggest that when Asset A moves, Asset B tends to move in the same direction, but not perfectly in tandem.)
🔸 RSI (Measures the speed and change of price movements and is used to identify overbought or oversold conditions of each asset. The RSI ranges from 0 to 100 and is typically used with a time period of 14. Generally, an RSI above 70 indicates that an asset may be overbought, while RSI below 30 signals that an asset may be oversold.)
⚙️ Settings Overview:
◽️ Period
Periodic inputs (e.g. daily, monthly, etc.) determine when the values are reset to zero and begin accumulating again until the period is over. This visualizes the net change in the data over each period. The input "Visible Range" is auto-adjustable as it starts the accumulation at the leftmost bar on your chart, displaying the net change in your chart's visible range. There's also the "Timestamp" option, which allows you to select a specific point in time from where the values are accumulated. The timestamp anchor can be dragged to a desired bar via Tradingview's interactive option. Timestamp is particularly useful when looking for outperformers/underperformers after a market-wide move. The input positioned next to the period selection determines the timeframe on which the data is based. It's best to leave it at default (Chart Timeframe) unless you want to check the higher timeframe structure of the data.
◽️ Data
The first input in this section determines the data that will be displayed. You can choose between Price, OI, and OBV. The second input lets you select which one out of the three asset groups should be displayed. The symbols in the asset group can be modified in the bottom section of the indicator settings.
◽️ Appearance
You can choose to plot the data in the form of lines, circles, areas, and columns. The colors can be selected by choosing one of the six pre-prepared color palettes.
◽️ Labeling
This input allows you to show/hide the labels and select their appearance and size. You can choose between Label (colored pointed label), Label and Line (colored pointed label with a line that connects it to the plot), or Text Label (colored text).
◽️ Smoothing
If selected, this option will smooth the values using a Simple Moving Average (SMA) with a custom length. This is used to reduce noise and improve the visibility of plotted data.
◽️ Highlight
If selected, this option will highlight the top and bottom N (custom number) plots, while shading the others. This makes the symbols with extreme values stand out from the rest.
◽️ Group Mean
This input allows you to select the data that will be considered as the group mean. You can choose between Group Average (the average value of all assets in the group) or First Ticker (the value of the ticker that is positioned first on the group's list). The mean is then used in calculations such as correlation (as the second variable) and beta (as a benchmark). You can also choose to plot the mean by clicking on the checkbox.
◽️ Profile
If selected, the script will generate a vertical volume profile-like display with 10 zones/nodes, visualizing the distribution of assets below and above the mean. This makes it easy to see how many or what percentage of assets are outperforming or underperforming the mean.
◽️ Gradient
If selected, this option will color the plots with a gradient based on the proximity of the value to the upper extreme, zero, and lower extreme.
◽️ Table
This section includes several settings for the table's appearance and the data displayed in it. The "Reference Length" input determines the number of bars back that are used for calculating correlation and beta, while "RSI Length" determines the length used for calculating the Relative Strength Index. You can choose the data that should be displayed in the table by using the checkboxes.
◽️ Asset Groups
This section allows you to modify the symbols that have been selected to be a part of the 3 asset groups. If you want to change a symbol, you can simply click on the field and type the ticker of another one. You can also show/hide a specific asset by using the checkbox next to the field.
Dao động [VNFlow]Contact and discussion to use advanced tools to support your trading strategy
Email: hasobin@outlook.com
Phone: 0373885338
Cafe break: Hanoi
See you,
Vix FIX / StochRSI StrategyVix FIX / StochRSI Strategy — Smart Gold Trading with Market Fear Detection
Pine Script Version 6 | Timeframe: 1H | Supports Long & Short
🔍 Strategy Overview:
This strategy is designed for trading gold and other highly volatile assets. It combines three powerful components:
Williams VIX Fix (WVF) – A fear-based volatility indicator inspired by the CBOE VIX Index, adapted for non-index assets.
Stochastic RSI – Measures overbought and oversold momentum, used as an exit trigger.
Price Action Filters – Confirms strong bullish or bearish bars to trigger high-conviction entries.
📌 Entry Conditions:
✅ Long Entry
WVF indicates the end of fear (mean reversion signal).
Bullish momentum bar (upRange).
Price is higher than n bars ago but still below medium/long-term recent highs.
✅ Short Entry
WVF indicates the market just cooled down from fear.
Bearish momentum bar (downRange).
Price is lower than n bars ago but still above recent lows.
📌 Exit Conditions:
🔴 Exit Long when Stochastic Overbought + %K cross below %D
🔵 Exit Short when Stochastic Oversold + %K cross above %D
📊 Key Features:
Dual-side entries (Long & Short)
Timeframe-limited to 1 Hour (60 minutes) for consistent signal quality
Ideal for gold and volatile assets (crypto, index CFDs)
Backtested with strong performance across major pairs
Log Regression Oscillator (caN)fi(ki)=>'ra'
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © fikira
//@version=6
indicator('Log Regression Oscillator', max_bars_back=5000, max_labels_count=500, max_lines_count=500, overlay=false)
________________________________________________________________________________________________________________________ ='
⎞ Settings ⎛
(__--------__) '
cGREEN = #089981, cRED = #F23645, cGRAY = #757a79
threshold = input.int (300 , minval=150)
proactive = input.bool (false )
GRE = input.color(cGREEN , 'Bull' , group='Style' )
RED = input.color(cRED , 'Bear' , group='Style' )
GRY = input.color(cGRAY , 'Unconfirmed Bull/Bear' , group='Style' )
showDsh = input.bool ( true , 'Show Dashboard' , group='Dashboard' )
dshLoc = str.replace(str.lower(input.string('Top Right', 'Location', group='Dashboard', options= )), ' ', '_')
txtSize = str.lower(input.string('Normal' , 'Size' , group='Dashboard', options= ) )
________________________________________________________________________________________________________________________ :='
⎞ Constants and general variables ⎛
(__-------------------------------__) '
INV = color(na)
n = bar_index
________________________________________________________________________________________________________________________ :='
⎞ Functions ⎛
(__---------__) '
dot(x, y)=>
if x.size() > 1 and y.size() > 1
m1 = matrix.new()
m2 = matrix.new()
m1.add_col(m1.columns(), y)
m2.add_row(m2.rows (), x)
m1.mult (m2)
.eigenvalues()
.sum()
//Closed form solution to best fit log function
log_reg(log_x, log_x2, log_y) =>
sum_log_x = log_x . sum()
sum_y = log_y . sum()
sum_log_x_y = dot(log_x ,log_y)
sum_log_x_sq = log_x2 . sum()
n_ = log_x .size()
//Closed-form solutions for a and b
a = (n_ * sum_log_x_y - sum_log_x * sum_y)
/ (n_ * sum_log_x_sq - math.pow(sum_log_x , 2))
b = ( sum_y - a * sum_log_x ) / n_
//Variables declared for draw()
var arrayarr = array.new(4, na)
proActH = false, proActL = false
var lastHi = 0., var lastLi = 0.
draw(aTop_x, aTop_x2, aTop_y, aBot_x, aBot_x2, aBot_y, top_points, prc_points, btm_points, refit) =>
var label labH = na, var label labL = na
vTop = 0.
vBtm = 0.
if refit
top_points.clear(), prc_points.clear(), btm_points.clear()
= log_reg(aTop_x, aTop_x2, aTop_y), arr.set(0, a_top), arr.set(1, b_top)
= log_reg(aBot_x, aBot_x2, aBot_y), arr.set(2, a_btm), arr.set(3, b_btm)
for i = 0 to n
top = math.exp(a_top * math.log(i) + b_top)
btm = math.exp(a_btm * math.log(i) + b_btm)
avg = math.avg(top, btm)
if i == n
vTop := top
vBtm := btm
ix = n - i
if ix < 4999
hi = high
lo = low
cl = close
getC = hi > avg ? hi : lo < avg ? lo : cl
prc_points.push(chart.point.from_index(i, 100 * math.max(-1.5, math.min(1.5, (getC - btm) / (top - btm)))))
for lab in label.all
lab.delete()
firstH = proactive ? true : false
firstL = proactive ? true : false
color colH = na, color colL = na
sz = prc_points.size()
if aTop_x.size() > 0
for i = aTop_x.size() -1 to 0
idx = int(math.exp(aTop_x.get(i)))
if idx < sz and idx > n - 5000 and idx >= 0
if firstH
if aTop_x.last() != lastHi
colH := GRY
firstH := false
else
colH := RED
else
colH := RED
top = math.exp(a_top * math.log(idx) + b_top)
btm = math.exp(a_btm * math.log(idx) + b_btm)
label.new(idx , 100 *
math.max(-1.5, math.min(1.5, (high - btm)
/ (top - btm)
) ), '●', textcolor = colH, color=INV, size=8)
if aBot_x.size() > 0
for i = aBot_x.size() -1 to 0
idx = int(math.exp(aBot_x.get(i)))
if idx < sz and idx > n - 5000 and idx >= 0
if firstL
if aBot_x.last() != lastLi
colL := GRY
firstL := false
else
colL := GRE
else
colL := GRE
top = math.exp(a_top * math.log(idx) + b_top)
btm = math.exp(a_btm * math.log(idx) + b_btm)
label.new(idx , 100 *
math.max(-1.5, math.min(1.5, (low - btm)
/ (top - btm)
) ), '●', textcolor = colL, color=INV, size=8
, style = label.style_label_up)
else
top = math.exp(arr.get(0) * math.log(n) + arr.get(1))
btm = math.exp(arr.get(2) * math.log(n) + arr.get(3))
avg = math.avg(top, btm)
vTop := top
vBtm := btm
hi = high, lo = low, cl = close
getC = hi > avg ? hi : lo < avg ? lo : cl
prc_points.push(chart.point.from_index(n, 100 * math.max(-1.5, math.min(1.5, (getC - btm) / (top - btm)))))
for poly in polyline.all
poly.delete()
if barstate.islast
labH.delete(), labH := label.new(n, 100, str.tostring(vTop, format.mintick), color=color.new(chart.fg_color, 85), textcolor=RED, style=label.style_label_lower_left, size=12)
labL.delete(), labL := label.new(n, 0, str.tostring(vBtm, format.mintick), color=color.new(chart.fg_color, 85), textcolor=GRE, style=label.style_label_upper_left, size=12)
polyline.new(prc_points.size() >= 5000 ? prc_points.slice(prc_points.size()-4999, prc_points.size()-1) : prc_points, line_color=chart.fg_color)
________________________________________________________________________________________________________________________ :='
⎞ Variables ⎛
(__---------__) '
//bool trigerring fit
refit = false
var top_points = array.new(0)
var prc_points = array.new(0)
var btm_points = array.new(0)
//Variables arrays
var peaks_y = array.new(0)
var peaks_x = array.new(0)
var peaks_x2 = array.new(0)
var btms_y = array.new(0)
var btms_x = array.new(0)
var btms_x2 = array.new(0)
var tb = table.new(dshLoc, 4, 8
, bgcolor = #1e222d
, border_color = #373a46
, border_width = 1
, frame_color = #373a46
, frame_width = 1)
________________________________________________________________________________________________________________________ :='
⎞ Exec ⎛
(__----__) '
//Top Bottom detection
max = ta.max(high)
var min = low
min := max == high ? low
: math.min(low , min)
barsmax = ta.barssince(high == max)
barsmin = ta.barssince(low == min)
if barsmax == threshold
nmax = n-barsmax
if peaks_x .size() > 0 and peaks_x.last() != lastHi
peaks_y .set(-1, math.log( max) )
peaks_x .set(-1, math.log(nmax) )
peaks_x2.set(-1, math.pow(math.log(nmax), 2))
else
peaks_y .push( math.log(max) )
peaks_x .push( math.log(nmax) )
peaks_x2.push( math.pow(math.log(nmax), 2))
lastHi := math.log(nmax)
refit := true
else
min := math.min(low , min)
if barsmin == threshold
nmin = n-barsmin
if btms_x .size() > 0 and btms_x.last() != lastLi
btms_y .set(-1, math.log(min) )
btms_x .set(-1, math.log(nmin) )
btms_x2 .set(-1, math.pow(math.log(nmin), 2))
else
btms_y .push( math.log( min) )
btms_x .push( math.log(nmin) )
btms_x2.push( math.pow(math.log(nmin), 2))
lastLi := math.log(nmin)
refit := true
chMax = ta.change(max) , chMin = ta.change(min)
if (chMax != 0 or chMin != 0) and proactive and not refit and n > threshold
= log_reg(peaks_x, peaks_x2, peaks_y)
= log_reg( btms_x, btms_x2, btms_y)
top = math.exp(a_top * math.log(n) + b_top)
btm = math.exp(a_btm * math.log(n) + b_btm)
if 100 * ((high - btm) / (top - btm)) > 90
if peaks_x.last() == lastHi
peaks_y .push(math.log(max))
peaks_x .push(math.log(n))
peaks_x2.push(math.log(n)
*math.log(n))
else
peaks_y .set(-1, math.log(max))
peaks_x .set(-1, math.log(n))
peaks_x2.set(-1, math.log(n)
* math.log(n))
arr.set(0, a_top), arr.set(1, b_top)
arr.set(2, a_btm), arr.set(3, b_btm)
refit := true
proActH := true
if 100 * ((low - btm) / (top - btm)) < 10
if btms_x.last() == lastLi
btms_y .push(math.log(min))
btms_x .push(math.log(n))
btms_x2.push(math.log(n)
*math.log(n))
else
btms_y .set(-1, math.log(min))
btms_x .set(-1, math.log(n))
btms_x2.set(-1, math.log(n)
* math.log(n))
arr.set(0, a_top), arr.set(1, b_top)
arr.set(2, a_btm), arr.set(3, b_btm)
refit := true
proActL := true
enough = peaks_x.size() > 1 and btms_x.size() > 1
if enough
draw(peaks_x, peaks_x2, peaks_y, btms_x, btms_x2, btms_y, top_points, prc_points, btm_points, refit)
else
if barstate.islast
txt = ''
if peaks_x.size() < 2
txt += str.format('{0} Top Swing', peaks_x.size())
if btms_x .size() < 2
if txt != ''
txt += ', '
txt += str.format('{0} Bottom Swing', btms_x .size())
txt += ' Change "Threshold" or timeframe for more Swings'
tb.cell(0, 0, txt, text_color=chart.fg_color, text_size=txtSize)
________________________________________________________________________________________________________________________ :='
⎞ Plot ⎛
(__----__) '
plot(n%2==0? 30 : na,'30' , color=color.new(chart.fg_color, 50), style=plot.style_linebr, display=display.pane)
plot(n%2==0? 70 : na,'70' , color=color.new(chart.fg_color, 50), style=plot.style_linebr, display=display.pane)
_100 = plot(100, 'na(100)', display=display.none)
_70 = plot( 70, 'na(70)' , display=display.none)
_60 = plot( 60, 'na(60)' , display=display.none)
_50 = plot( 50, 'na(50)' , display=display.none)
_40 = plot( 40, 'na(40)' , display=display.none)
_30 = plot( 30, 'na(30)' , display=display.none)
_00 = plot( 0, 'na(0)' , display=display.none)
fill(_100, _70, 100, 70, color.new(RED, 50), INV)
fill( _60, _50, 60, 50, INV, color.new(chart.fg_color, 85))
fill( _50, _40, 50, 40, color.new(chart.fg_color, 85), INV)
fill( _30, _00, 30, 0, INV, color.new(GRE, 75))
________________________________________________________________________________________________________________________ :='
⎞ End ⎛
(__---__) '