Volume candle intraday 90% valid - with alertThe candle with the highest volume of the day and that creates a new daily high or low.
- Only usable on M15 timeframes;
- You can set a range of bars (from the beginning of the day) to ignore;
- "90% valid" means a candle with volume greater than 90% of the last candle with the highest volume of the day (in the script you can change the percentage of valid volumes to define the candle volume, replacing all the "90" with the desired percentage);
- Long volumes are compared to longs and short volumes are compared to shorts;
- Script created with ChatGpt;
The psychology behind this pattern is the following: on the daily high/low, a lot of volumes will enter in a short time, either by absorption: buyers or sellers enter en masse following the trend when it is too late; or by exhaustion: buyers or sellers who entered en masse and late have no more strength to continue pushing the price, they cause a volume peak to buy/sell as much as they could, then their enemies take over forming a high/low).
Happy trading everyone! :)
###################################################################################
La candela con il volume più alto della giornata e che crea un nuovo massimo o minimo giornaliero.
- Utilizzabile solo su timeframe M15;
- Si può impostare un range di barre(da inizio giornata) da ignorare;
- "90% valida" sta per candela con volume superiore del 90% dell'ultima candela con volume più alto della giornata(nello script si può cambiare percentuale di volumi validi per definire candela volume, sostituendo tutti i "90" con la percentuale desiderata);
- I volumi long vengono confrontati con i long e i volumi short con gli short;
- Script creato con ChatGpt;
La psicologia dietro questo pattern è la seguente: sul massimo/minimo giornaliero entreranno tanti volumi in breve tempo, sia per assorbimento: buyers o sellers entrano in massa seguendo il trend quando è troppo tardi; sia per esaurimento: buyers o sellers entrati in massa e in ritardo non hanno più forza per continuare a spingere il prezzo, causano un picco volumetrico per comprare/vendere più che potevano, quindi i loro nemici prendono il sopravvento formando un massimo/minimo).
Buon trading a tutti! :)
Indicadores e estratégias
Logarithmischer Trendkanal (sichtbar, in Preisskala + Stilwahl)Verbesserter Trendkanal Indikator. Flexibel einstellbar für log Charts
Range Expansion Index (REI)Introduction and History
I'm sharing an indicator today that I have developed: the Range Expansion Index (REI). This powerful oscillator was developed by the renowned technical analyst Thomas DeM., known for his unique approach to market timing and price exhaustion. The REI was introduced as part of his comprehensive suite of technical tools, detailed in his influential work, such as "The New Science of Technical Analysis."
DeM. designed the REI to be a more refined momentum oscillator. His goal was to create an indicator that could accurately reflect the underlying strength or weakness of price movements while minimizing the false signals often generated by traditional oscillators during sideways or choppy markets. The REI achieves this by focusing on significant price expansions and contractions, comparing recent price behavior to the overall price changes over a specified lookback period.
You can find more information and the basis for this indicator here:
QuantifiedStrategies: www.quantifiedstrategies.com
Infront Help Center: infront-portfolio-manager.helpcenter.infront.co
How the REI Works
The core of the REI's calculation lies in identifying and quantifying "strong" price changes within a given period (typically 8 bars). It does this by evaluating specific price relationships and conditions between current and past bars. The indicator then computes a ratio comparing the sum of these "strong" price changes to the sum of the absolute total price changes over the lookback period, scaling the result to oscillate between -100 and +100.
The key levels for interpreting the REI are generally:
+60: Overbought Zone
-60: Oversold Zone
Unlike oscillators that might simply signal overbought/oversold upon entering these zones, the REI's interpretation, according to DeM., often focuses on the exit from these extreme areas.
Traditional Trading Signals
Based on DeM.'s methodology and the descriptions in the provided links, the primary trading signals generated by the REI occur when the indicator crosses back from an extreme zone:
Sell Signal: The REI moves above the +60 level and then crosses back down below +60. This suggests potential price weakness after a period of strong upward momentum.
Buy Signal: The REI moves below the -60 level and then crosses back up above -60. This indicates potential price strength after a period of strong downward momentum.
Duration Analysis: An Optional Signal Filter
The QuantifiedStrategies link highlights the concept of "Duration Analysis," suggesting that the amount of time (number of bars) the REI spends in the overbought or oversold region can add crucial context. A brief stay might precede a reversal, while a prolonged stay could indicate a strong, persistent trend.
The indicator incorporates this concept as an optional filter. You can enable this feature and specify a number of bars. When enabled, a buy or sell signal will only be triggered if the REI crosses the respective overbought/oversold level AND the duration of the REI being in that extreme zone precisely matches the number of bars you specify in the input settings.
Indicator Features in This Pine Script
The Pine Script code I have developed provides a comprehensive implementation of the REI with additional trading utilities:
REI Calculation: Implements the core REI formula based on conditional price changes and summations over a defined period.
Configurable REI Period: Easily adjust the main lookback period for the REI calculation.
Customizable Lookback Parameters: Fine-tune the specific lookback periods used in the internal conditions (n1L, n2L, n3L) as described in the calculation method.
Plotting: Displays the REI line in a separate pane, along with horizontal lines at +60 (Overbought), -60 (Oversold), and 0 (Zero Line) for clear visual analysis.
Configurable Alerts: Set up Buy and Sell alerts that trigger when the REI crosses the +60/-60 levels. Control global alert enabling, and specifically enable/disable Buy and Sell alerts.
Plot Shapes for Signals: Optionally display visual triangle shapes directly on the price chart (red triangle down for Sell above the bar, green triangle up for Buy below the bar) to easily spot signal occurrences. Control global shape enabling and specifically enable/disable Buy/Sell shapes.
Optional Duration Analysis Filter: Activate a filter that requires the REI to have spent an exact number of consecutive bars in the overbought/oversold zone at the moment of the cross for a signal to be considered valid. Configure the required number of bars.
How to Use This Code in TradingView
Open TradingView and navigate to the Pine Editor (usually the icon on the left sidebar or via the bottom panel).
Delete any existing code in the editor and paste the REI code.
Save the script (you can name it "Range Expansion Index with Duration Filter" or similar).
Add the indicator to your chart by clicking the "Add to Chart" button in the Pine Editor.
Access the indicator's settings on your chart to adjust the REI Period, Lookbacks, and enable/disable Alerts, Plot Shapes, and the optional Duration Filter (including setting the number of bars).
To receive actual notifications: You must set up alerts manually through the TradingView platform's alert system (right-click on the indicator -> Add alert on Range Expansion Index (REI)...). Select the specific conditions "REI Sell Signal" or "REI Buy Signal" from the dropdown menu and configure your desired notification methods (popup, email, etc.).
Disclaimer:
Trading financial markets involves risk, and past performance is not indicative of future results. This indicator is a tool for analysis and should be used as part of a comprehensive trading strategy, always combined with other techniques and proper risk management. Always conduct your own research and backtest the indicator to understand its behavior on the markets and timeframes you trade.
BTC Mining Income Oscillator Z-ScoreBTC Mining Income Oscillator (Z-Score)
Overview
The BTC Mining Income Oscillator (Z-Score) is a custom technical indicator that analyzes Bitcoin mining income to help traders identify overbought and oversold conditions. The indicator uses a Z-Score to track deviations in mining income, highlighting periods of high or low mining profitability.
This indicator is made up of:
Z-Score Line (Blue): Measures how far the current mining income deviates from its historical mean.
Mining Income Oscillator (Orange): A scaled value of mining income that oscillates within a specific range to indicate overbought and oversold conditions.
How the Indicator Works
1. Mining Income Calculation
The BTC Mining Income is determined using two main factors:
Block Reward: The number of BTC miners earn for each block mined (currently 3.125 BTC, adjustable in settings).
Transaction Fees: The average transaction fees per block (default is 0.3 BTC).
Blocks per Day: The number of blocks mined per day (default is 144).
The daily mining income in BTC is calculated as:
Mining Income
=
(
Block Reward
+
Transaction Fees
)
×
Blocks per Day
Mining Income=(Block Reward+Transaction Fees)×Blocks per Day
This value is then converted to USD by multiplying it by the current Bitcoin price.
2. Z-Score Calculation
The Z-Score measures how far the current mining income deviates from its mean over a set period (default is 90 days). The Z-Score helps identify when mining income is unusually high or low:
A high Z-Score indicates that the mining income is significantly above the historical mean, signaling overbought conditions.
A low Z-Score indicates that the mining income is significantly below the historical mean, signaling oversold conditions.
The Z-Score is calculated as follows:
Z-Score
=
(
Current Mining Income
−
Mean Income
)
Standard Deviation
Z-Score=
Standard Deviation
(Current Mining Income−Mean Income)
The result is then smoothed over a period (default is 5) to reduce noise and provide a more stable value.
3. Mining Income Oscillator
The mining income is scaled to oscillate between +20 and +90. This oscillation makes it easy to track overbought and oversold conditions in the market:
Values between 85 and 90 indicate overbought conditions (high mining profitability).
Values between 20 and 22 indicate oversold conditions (low mining profitability).
Values between 22 and 85 indicate neutral conditions, where mining profitability is normal.
The mining income oscillator helps traders spot extreme conditions (overbought or oversold) in mining profitability.
How to Read the Indicator
1. Z-Score Line (Blue)
The Z-Score represents how far current mining income is from the historical average.
Above +2: The mining income is unusually high, indicating an overbought market.
Below -2: The mining income is unusually low, indicating an oversold market.
Between -2 and +2: This range is neutral, where the mining income is within the average historical range.
2. Mining Income Oscillator (Orange)
The Mining Income Oscillator is scaled between 20 and 90.
85–90: Overbought conditions, indicating high mining profitability.
20–22: Oversold conditions, indicating low mining profitability.
22–85: Neutral conditions, indicating moderate mining profitability.
3. Background Shading
Red Shading (85–90): Indicates overbought conditions (mining income is unusually high).
Green Shading (20–22): Indicates oversold conditions (mining income is unusually low).
The shaded regions provide a visual guide to spot periods when the market is overbought or oversold.
4. Key Horizontal Lines
0 Line: Represents the neutral level for the Z-Score, where the mining income is at the historical mean.
+2 and -2 Lines: Indicate overbought and oversold conditions for the Z-Score.
90 and 20 Lines: Indicate the upper and lower bounds for the mining income oscillator.
Where the Data Comes From
Bitcoin Price: The current Bitcoin price is pulled directly from the chart.
Block Reward and Transaction Fees: These values are set manually by the user or can be updated dynamically.
Mining Income: Calculated based on the block reward, transaction fees, and current Bitcoin price.
Z-Score and Oscillator Calculations: Both are calculated based on mining income in USD over a defined look-back period.
Best Timeframe for This Indicator
This indicator is designed to work best on the 2-day chart (2D) timeframe. On the 2-day chart, the mining income data, Z-Score, and the oscillator are less sensitive to noise and short-term volatility, providing more reliable signals. While it can be used on other timeframes, the 2-day chart offers the clearest and most stable analysis.
VWAP Indicator Channel | Multi Timeframe by Osbrah📊 Multi-Timeframe VWAP Indicator (Session / Weekly / Monthly)
This powerful indicator plots the Volume Weighted Average Price (VWAP) across multiple timeframes: intraday session, weekly, and monthly. It's designed to give traders a clear understanding of the market’s fair value over different horizons.
Key Features:
* Display Session VWAP (resets daily)
* Enable Weekly and Monthly VWAPs for broader market context
* Customize colors, styles, and visibility for each VWAP
* Toggle between standard VWAP or anchored to session opens
Use Cases:
* Identify value zones where price tends to gravitate
* Spot institutional levels of interest and potential reversal points
* Align entries with VWAP bounces or breaks
* Combine with EMAs or price action for high-probability setups
Perfect for day traders, swing traders, and institutional-style strategies, this VWAP tool helps you stay aligned with volume-based price dynamics across all market phases.
Triple EMA Bundle (50, 100, 200) - Osbrah CRG📈 Advanced EMA Indicator – 50/100/200
This custom-built indicator displays the 50, 100, and 200 Exponential Moving Averages (EMAs), giving traders a powerful visual tool to identify key trend directions, dynamic support/resistance levels, and potential market reversals.
Designed for both beginners and advanced users, this tool offers extensive customization options:
* Select which EMAs to display (50, 100, 200)
* Adjust colors, line styles, and thickness
* Choose between different price sources (close, open, hl2, etc.)
* Set custom EMA lengths to fit your strategy
Use Cases:
* Spot trend direction and strength at a glance
* Identify key zones of support and resistance
* Confirm entries/exits based on EMA crossovers or rejections
* Align your trades with higher timeframe trends
Whether you're a swing trader or a scalper, this indicator helps you stay in sync with the market by bringing clarity to long-term momentum zones.
XAUUSD Scalping IndicatorKey Features:
Moving Averages: The script calculates two simple moving averages (SMA) for price.
Trade Signals:
Buy signals are generated when the fast MA crosses above the slow MA.
Sell signals occur when the fast MA crosses below the slow MA.
Labels: Displays "BUY" and "SELL" labels on the chart next to the respective candles.
Stop Loss and Take Profit: The script calculates these based on a 1% movement from the entry price for illustrative purposes.
Important Considerations:
You can adjust the percentage for stop loss and take profit to fit your trading strategy.
Make sure to test this indicator on the appropriate time frame (like 5-minute or 15-minute) for scalping XAUUSD.
Triple BBThis is an indicator of BB (Bollinger Band) that allows you to put three standard deviations in one go.
RSI 7 Divergence Signals [BUY/SELL]This indicator automatically identifies bullish and bearish RS divergences
ATR ComboA Collection of three ATRs.
The whole idea of this indicator is to easily visualise the relationship of volatility to the current price action.
The default settings are:
5 Moving Average (Pink)
50 Moving Average (Blue)
1000 Moving Average (Yellow)
Using the default settings, the Yellow line represents the larger-scale volatility average.
the Blue line represents more recent volatility and the Pink lien represents the very recent average.
Using this indicator is possible in a number of ways:
If volatility is high and directional, you will see a sharp increase in the Pink line.
If volatility is high and choppy, the Pink line will be well above the Blue line and will oscillate up and down.
If volatility is starting to cool down, the Pink line will approach the Blue and Yellow lines.
Previous Day/Week/Month - High/Lows (BHUVANESH Rajendran)Previous Day/Week/Month - High/Lows (BHUVANESH Rajendran)
Sideways + Buy + Sell DetectionSure! Here's the plain-language description of your script without using any code.
---
### 📘 **Script Purpose**
This script is designed to detect three different types of market conditions:
1. **Sideways (range-bound) market** — useful for non-directional strategies like strangles or straddles.
2. **Bullish trend** — provides a signal to consider buying.
3. **Bearish trend** — provides a signal to consider selling.
---
### 🔧 **Indicators Used**
* **RSI (Relative Strength Index)**: Measures market momentum. It's used to determine whether the market is in a bullish, bearish, or neutral zone.
* **ADX (Average Directional Index)** along with **DI+ and DI-**: Measures the strength and direction of a trend.
* **MACD (Moving Average Convergence Divergence)**: Confirms momentum and trend direction based on moving averages.
---
### 🟪 **Sideways Market Signal**
A sideways (non-trending) signal is shown when:
* RSI indicates the market is neither overbought nor oversold (in the middle range).
* ADX shows weak trend strength.
* The ADX value is lower than both DI+ and DI-, suggesting indecision or lack of clear trend.
A purple label appears below the bar when this condition is met.
---
### 🟩 **Buy Signal**
A buy signal is generated when:
* RSI shows strong upward momentum.
* ADX confirms there is a strong trend.
* MACD confirms bullish conditions with both the MACD and signal lines above zero and in the correct crossover direction.
A green label appears below the bar when these bullish conditions align.
---
### 🟥 **Sell Signal**
A sell signal appears when:
* RSI shows strong downward momentum.
* ADX confirms a strong trend.
* MACD confirms bearish conditions, with both MACD and signal lines below zero and in the correct crossover direction.
A red label appears — currently also plotted below the bar (which you may want to move above the bar for better clarity).
---
### ✅ **Use Case**
This script is suitable for:
* Deciding when to deploy **strangle/straddle** strategies in sideways markets.
* Identifying strong **bullish or bearish trends** for directional trades.
* Filtering out weak or indecisive conditions.
RSI 7 Divergence Signals [BUY/SELL]This indicator identifies bearish and bullish divergences only on the rsi
Super Strategy Indicator Zeenu This indicator predicts the continuous 20 % price moves and this is created for educational purpose only.
Goldman Sachs Risk Appetite ProxyRisk appetite indicators serve as barometers of market psychology, measuring investors' collective willingness to engage in risk-taking behavior. According to Mosley & Singer (2008), "cross-asset risk sentiment indicators provide valuable leading signals for market direction by capturing the underlying psychological state of market participants before it fully manifests in price action."
The GSRAI methodology aligns with modern portfolio theory, which emphasizes the importance of cross-asset correlations during different market regimes. As noted by Ang & Bekaert (2002), "asset correlations tend to increase during market stress, exhibiting asymmetric patterns that can be captured through multi-asset sentiment indicators."
Implementation Methodology
Component Selection
Our implementation follows the core framework outlined by Goldman Sachs research, focusing on four key components:
Credit Spreads (High Yield Credit Spread)
As noted by Duca et al. (2016), "credit spreads provide a market-based assessment of default risk and function as an effective barometer of economic uncertainty." Higher spreads generally indicate deteriorating risk appetite.
Volatility Measures (VIX)
Baker & Wurgler (2006) established that "implied volatility serves as a direct measure of market fear and uncertainty." The VIX, often called the "fear gauge," maintains an inverse relationship with risk appetite.
Equity/Bond Performance Ratio (SPY/IEF)
According to Connolly et al. (2005), "the relative performance of stocks versus bonds offers significant insight into market participants' risk preferences and flight-to-safety behavior."
Commodity Ratio (Oil/Gold)
Baur & McDermott (2010) demonstrated that "gold often functions as a safe haven during market turbulence, while oil typically performs better during risk-on environments, making their ratio an effective risk sentiment indicator."
Standardization Process
Each component undergoes z-score normalization to enable cross-asset comparisons, following the statistical approach advocated by Burdekin & Siklos (2012). The z-score transformation standardizes each variable by subtracting its mean and dividing by its standard deviation: Z = (X - μ) / σ
This approach allows for meaningful aggregation of different market signals regardless of their native scales or volatility characteristics.
Signal Integration
The four standardized components are equally weighted and combined to form a composite score. This democratic weighting approach is supported by Rapach et al. (2010), who found that "simple averaging often outperforms more complex weighting schemes in financial applications due to estimation error in the optimization process."
The final index is scaled to a 0-100 range, with:
Values above 70 indicating "Risk-On" market conditions
Values below 30 indicating "Risk-Off" market conditions
Values between 30-70 representing neutral risk sentiment
Limitations and Differences from Original Implementation
Proprietary Components
The original Goldman Sachs indicator incorporates additional proprietary elements not publicly disclosed. As Goldman Sachs Global Investment Research (2019) notes, "our comprehensive risk appetite framework incorporates proprietary positioning data and internal liquidity metrics that enhance predictive capability."
Technical Limitations
Pine Script v6 imposes certain constraints that prevent full replication:
Structural Limitations: Functions like plot, hline, and bgcolor must be defined in the global scope rather than conditionally, requiring workarounds for dynamic visualization.
Statistical Processing: Advanced statistical methods used in the original model, such as Kalman filtering or regime-switching models described by Ang & Timmermann (2012), cannot be fully implemented within Pine Script's constraints.
Data Availability: As noted by Kilian & Park (2009), "the quality and frequency of market data significantly impacts the effectiveness of sentiment indicators." Our implementation relies on publicly available data sources that may differ from Goldman Sachs' institutional data feeds.
Empirical Performance
While a formal backtest comparison with the original GSRAI is beyond the scope of this implementation, research by Froot & Ramadorai (2005) suggests that "publicly accessible proxies of proprietary sentiment indicators can capture a significant portion of their predictive power, particularly during major market turning points."
References
Ang, A., & Bekaert, G. (2002). "International Asset Allocation with Regime Shifts." Review of Financial Studies, 15(4), 1137-1187.
Ang, A., & Timmermann, A. (2012). "Regime Changes and Financial Markets." Annual Review of Financial Economics, 4(1), 313-337.
Baker, M., & Wurgler, J. (2006). "Investor Sentiment and the Cross-Section of Stock Returns." Journal of Finance, 61(4), 1645-1680.
Baur, D. G., & McDermott, T. K. (2010). "Is Gold a Safe Haven? International Evidence." Journal of Banking & Finance, 34(8), 1886-1898.
Burdekin, R. C., & Siklos, P. L. (2012). "Enter the Dragon: Interactions between Chinese, US and Asia-Pacific Equity Markets, 1995-2010." Pacific-Basin Finance Journal, 20(3), 521-541.
Connolly, R., Stivers, C., & Sun, L. (2005). "Stock Market Uncertainty and the Stock-Bond Return Relation." Journal of Financial and Quantitative Analysis, 40(1), 161-194.
Duca, M. L., Nicoletti, G., & Martinez, A. V. (2016). "Global Corporate Bond Issuance: What Role for US Quantitative Easing?" Journal of International Money and Finance, 60, 114-150.
Froot, K. A., & Ramadorai, T. (2005). "Currency Returns, Intrinsic Value, and Institutional-Investor Flows." Journal of Finance, 60(3), 1535-1566.
Goldman Sachs Global Investment Research (2019). "Risk Appetite Framework: A Practitioner's Guide."
Kilian, L., & Park, C. (2009). "The Impact of Oil Price Shocks on the U.S. Stock Market." International Economic Review, 50(4), 1267-1287.
Mosley, L., & Singer, D. A. (2008). "Taking Stock Seriously: Equity Market Performance, Government Policy, and Financial Globalization." International Studies Quarterly, 52(2), 405-425.
Oppenheimer, P. (2007). "A Framework for Financial Market Risk Appetite." Goldman Sachs Global Economics Paper.
Rapach, D. E., Strauss, J. K., & Zhou, G. (2010). "Out-of-Sample Equity Premium Prediction: Combination Forecasts and Links to the Real Economy." Review of Financial Studies, 23(2), 821-862.
TK47 36 ChambersTK47 36 Chambers is a precision-crafted EMA (Exponential Moving Average) tool designed to help traders align with multi-timeframe trends while keeping price action clear and uncluttered. Built around the powerful 36 EMA, this script plots the current timeframe’s high, low, and median EMAs as a visual "chamber" or cloud, giving instant feedback on intrabar dynamics.
Shoutout to Insilico, who introduced the 36 EMA as a core trend-following tool — this indicator wouldn’t exist without that spark.
How It Works
Core EMA:
The central element is the 36-period EMA, applied to close, high, and low prices on your current chart.
These three EMAs form a channel or “chamber” that acts as a dynamic zone of control.
The cloud between the high and low EMA can optionally be filled to help visualize volatility.
Higher Timeframe EMAs (HTF EMAs):
Optionally displays Daily, Weekly, 4H, and 1H EMAs (all using the same configurable EMA length, default: 36).
These are interpolated smoothly between HTF candles, creating elegant transitions and avoiding jumpy plotting.
Helps traders spot broader trend bias directly on lower timeframe charts without switching views.
Customizations
Adjustable colors for each EMA layer (current + HTFs).
Toggle cloud fill on/off.
Toggle visibility of each HTF line.
Option to show labels at the edge of the chart (e.g., “W” for Weekly) for clarity.
Use Cases
Confirming trend direction across multiple timeframes.
Identifying pullback entries or mean reversion zones.
Combining with candlestick patterns, liquidity sweeps, or oscillator divergence for high-probability entries.
Notes
All EMAs use the same configurable length to keep things clean and consistent.
Interpolation ensures the HTF EMAs remain smooth and aligned with the LTF candles.
The fill between high and low EMA gives a visual representation of the market’s breathing room — useful for spotting expansions and contractions.
Logarithmischer Trendkanal (sichtbar, in Preisskala + Stilwahl)3. verbesserte Version des frei konfigurierbaren Trendkanals für log Charts
75-min RSI-EMA Crossover Alertnsdjcnisdncjsndcncnscj
dcsdcjsbcjbccbsc
dncjbsdscbscbshb
ncjsdcbsdhc sdc
Hurst Exponent Oscillator [PhenLabs]📊 Hurst Exponent Oscillator -
Version: PineScript™ v5
📌 Description
The Hurst Exponent Oscillator (HEO) by PhenLabs is a powerful tool developed for traders who want to distinguish between trending, mean-reverting, and random market behaviors with clarity and precision. By estimating the Hurst Exponent—a statistical measure of long-term memory in financial time series—this indicator helps users make sense of underlying market dynamics that are often not visible through traditional moving averages or oscillators.
Traders can quickly know if the market is likely to continue its current direction (trending), revert to the mean, or behave randomly, allowing for more strategic timing of entries and exits. With customizable smoothing and clear visual cues, the HEO enhances decision-making in a wide range of trading environments.
🚀 Points of Innovation
Integrates advanced Hurst Exponent calculation via Rescaled Range (R/S) analysis, providing unique market character insights.
Offers real-time visual cues for trending, mean-reverting, or random price action zones.
User-controllable EMA smoothing reduces noise for clearer interpretation.
Dynamic coloring and fill for immediate visual categorization of market regime.
Configurable visual thresholds for critical Hurst levels (e.g., 0.4, 0.5, 0.6).
Fully customizable appearance settings to fit different charting preferences.
🔧 Core Components
Log Returns Calculation: Computes log returns of the selected price source to feed into the Hurst calculation, ensuring robust and scale-independent analysis.
Rescaled Range (R/S) Analysis: Assesses the dispersion and cumulative deviation over a rolling window, forming the core statistical basis for the Hurst exponent estimate.
Smoothing Engine: Applies Exponential Moving Average (EMA) smoothing to the raw Hurst value for enhanced clarity.
Dynamic Rolling Windows: Utilizes arrays to maintain efficient, real-time calculations over user-defined lengths.
Adaptive Color Logic: Assigns different highlight and fill colors based on the current Hurst value zone.
🔥 Key Features
Visually differentiates between trending, mean-reverting, and random market modes.
User-adjustable lookback and smoothing periods for tailored sensitivity.
Distinct fill and line styles for each regime to avoid ambiguity.
On-chart reference lines for strong trending and mean-reverting thresholds.
Works with any price series (close, open, HL2, etc.) for versatile application.
🎨 Visualization
Hurst Exponent Curve: Primary plotted line (smoothed if EMA is used) reflects the ongoing estimate of the Hurst exponent.
Colored Zone Filling: The area between the Hurst line and the 0.5 reference line is filled, with color and opacity dynamically indicating the current market regime.
Reference Lines: Dash/dot lines mark standard Hurst thresholds (0.4, 0.5, 0.6) to contextualize the current regime.
All visual elements can be customized for thickness, color intensity, and opacity for user preference.
📖 Usage Guidelines
Data Settings
Hurst Calculation Length
Default: 100
Range: 10-300
Description: Number of bars used in Hurst calculation; higher values mean longer-term analysis, lower values for quicker reaction.
Data Source
Default: close
Description: Select which data series to analyze (e.g., Close, Open, HL2).
Smoothing Length (EMA)
Default: 5
Range: 1-50
Description: Length for smoothing the Hurst value; higher settings yield smoother but less responsive results.
Style Settings
Trending Color (Hurst > 0.5)
Default: Blue tone
Description: Color used when trending regime is detected.
Mean-Reverting Color (Hurst < 0.5)
Default: Orange tone
Description: Color used when mean-reverting regime is detected.
Neutral/Random Color
Default: Soft blue
Description: Color when market behavior is indeterminate or shifting.
Fill Opacity
Default: 70-80
Range: 0-100
Description: Transparency of area fills—higher opacity for stronger visual effect.
Line Width
Default: 2
Range: 1-5
Description: Thickness of the main indicator curve.
✅ Best Use Cases
Identifying if a market is regime-shifting from trending to mean-reverting (or vice versa).
Filtering signals in automated or systematic trading strategies.
Spotting periods of randomness where trading signals should be deprioritized.
Enhancing mean-reversion or trend-following models with regime-awareness.
⚠️ Limitations
Not predictive: Reflects current and recent market state, not future direction.
Sensitive to input parameters—overfitting may occur if settings are changed too frequently.
Smoothing can introduce lag in regime recognition.
May not work optimally in markets with structural breaks or extreme volatility.
💡 What Makes This Unique
Employs advanced statistical market analysis (Hurst exponent) rarely found in standard toolkits.
Offers immediate regime visualization through smart dynamic coloring and zone fills.
🔬 How It Works
Rolling Log Return Calculation:
Each new price creates a log return, forming the basis for robust, non-linear analysis. This ensures all price differences are treated proportionally.
Rescaled Range Analysis:
A rolling window maintains cumulative deviations and computes the statistical “range” (max-min of deviations). This is compared against the standard deviation to estimate “memory”.
Exponent Calculation & Smoothing:
The raw Hurst value is translated from the log of the rescaled range ratio, and then optionally smoothed via EMA to dampen noise and false signals.
Regime Detection Logic:
The smoothed value is checked against 0.5. Values above = trending; below = mean-reverting; near 0.5 = random. These control plot/fill color and zone display.
💡 Note:
Use longer calculation lengths for major market character study, and shorter ones for tactical, short-term adaptation. Smoothing balances noise vs. lag—find a best fit for your trading style. Always combine regime awareness with broader technical/fundamental context for best results.
Candle % Move Highlighter (Up/Down)Candle % Move Highlighter (Up/Down with Labels)
This indicator highlights candles that move up or down by a specific percentage from their open price.
🔹 Key Features:
Highlight candles that move up or down by a user-defined %.
Set separate thresholds for up moves and down moves.
Choose to show only up, only down, or both types of candles.
Optional triangle markers above or below highlighted candles.
% Move labels shown directly on the chart above (or below) the candle.
💡 Use this to:
Spot strong momentum candles.
Identify breakout or breakdown moves.
Visually monitor extreme price movement days.
Customize thresholds and display options from the settings panel.
Olas21 BUY SELL TREND 1. Use Only Strong Buy/Sell Signals
The script already filters for "Strong BUY" (with Supertrend support). Use only:
🚀 Strong BUY when Supertrend is downtrend (direction < 0)
☄️ Strong SELL when Supertrend is uptrend (direction > 0)
Why?
These signals are filtered and more reliable.
2. Enable Trend Confirmation: EMA Filter
Make sure you enable the EMA filter (already in the script):
plaintext
Copy
Edit
✅ Use EMA Trend Filter = True
📈 Buy only if price is above EMA200 (bull trend)
📉 Sell only if price is below EMA200 (bear trend)
This ensures you only trade with the trend.
3. Add Confirmation Indicators
Here are the top options:
Indicator Use It For Recommended Settings
RSI Avoid overbought/oversold traps RSI(14) < 70 for buy, > 30 for sell
ADX Confirm strong trend ADX > 20 or 25
MACD Confirm momentum direction MACD line > Signal line for buy
Volume Spike Confirm market interest Volume > 20-period avg volume
4. Avoid Trading in Choppy Conditions
Stay out if:
Price is sideways near EMAs
Low volume or no trend confirmation
No clear higher high / lower low structure
5. Best Timeframes for High Win Rate
Use higher timeframes for cleaner signals:
1H, 4H, 1D (especially for swing trading)
5M–15M only if scalping with strict rules and fast exits
6. Backtest and Tune Your SL/TP
Use:
SL = 0.5–1.5%
TP = 1.5–2.5%
Tight stops + quick profits = higher win rate
👉 Use the strategy.tester in TradingView and adjust these values.
🔧 Sample Confirmation Logic (Optional Additions)
You can edit the script to add confirmations like RSI or MACD:
pinescript
Copy
Edit
rsi = ta.rsi(close, 14)
rsiBuyOk = rsi < 70
rsiSellOk = rsi > 30
adx = ta.adx(14)
trendStrong = adx > 20
finalLong = longCondition and rsiBuyOk and trendStrong
finalShort = shortCondition and rsiSellOk and trendStrong
Then replace your strategy.entry conditions with:
pinescript
Copy
Edit
if finalLong
strategy.entry("Long", strategy.long)
if finalShort
strategy.entry("Short", strategy.short)
✅ Summary: Your Confirmation Checklist
Filter Confirmed?
Supertrend alignment (Strong Buy/Sell) ✅
EMA trend filter (price above/below EMA200) ✅
RSI overbought/oversold ✅
ADX showing trend strength ✅
Volume above average ✅
RSI Phan Ky FullThe RSI divergence indicator is like a magnifying glass that spots gaps between price swings and momentum. When price keeps climbing but RSI quietly sags, it’s a flashing U‑turn sign: the bulls are winded, and the bears are lacing up their boots. Flip it around—price is sliding yet RSI edges higher—and you’ve got bulls secretly stockpiling. Hidden divergences shore up the trend; regular divergences hint at a pivot. Blend those signals with overbought/oversold zones, support‑resistance, and volume, and RSI divergence turns into a radar that helps traders jump in with swagger and bail out just in time.