EMA 9/21/50 + VWAP + MACD + RSI Pro [v7]Updated to make table update on bar close, any time frame. Removed RSI plots
Indicators and strategies
Adaptive Hurst Exponent Regime FilterAdaptive Hurst Exponent Regime Filter (AHERF)
█ OVERVIEW
The Adaptive Hurst Exponent Regime Filter (AHERF) is designed to identify the prevailing market regime—be it Trending, Mean-Reverting, or a Random Walk/Transition phase. While the Hurst Exponent is a well-known tool for this purpose, AHERF introduces a key innovation: an adaptive threshold . Instead of relying solely on the traditional fixed 0.5 Hurst value, this indicator's threshold dynamically adjusts based on current market volatility, aiming to provide more nuanced and responsive regime classifications.
This tool can assist traders in:
Gauging the current character of the market.
Tailoring trading strategies to the identified regime (e.g., deploying trend-following systems in Trending markets or mean-reversion tactics in Mean-Reverting conditions).
Filtering out trades that may be counterproductive to the dominant market behavior.
█ HOW IT WORKS
The indicator operates through the following key calculations:
1. Hurst Exponent Calculation:
The script computes an approximate Hurst Exponent (H). It utilizes log price changes as its input series.
The `calculateHurst` function implements a variance scaling approach:
It defines three sub-periods based on the main `Hurst Lookback Period`.
It calculates the standard deviation of the input series over these sub-periods.
The Hurst Exponent is then estimated from the slope of a log-log regression between the standard deviations and their respective sub-period lengths. A simplified calculation using the first and last sub-periods is performed: `H = (log(StdDev3) - log(StdDev1)) / (log(N3) - log(N1))`.
Theoretically, a Hurst Exponent:
H > 0.5 suggests persistence (trending behavior).
H < 0.5 suggests anti-persistence (mean-reverting behavior).
H ≈ 0.5 suggests a random walk (unpredictable movement).
Pine Script® Snippet (Hurst Calculation Call):
float logPriceChange = math.log(close) - math.log(close );
// ... ensure logPriceChange is not na on first bar ...
float hurstValue = calculateHurst(logPriceChange, hurstLookbackInput);
2. Volatility Proxy Calculation:
To enable the adaptive nature of the threshold, a volatility proxy is calculated.
Users can select the `Volatility Metric` to be either:
Average True Range (ATR), normalized by the closing price.
Standard Deviation (StdDev) of simple price returns.
This proxy quantifies the current degree of price activity or fluctuation in the market.
Pine Script® Snippet (Volatility Proxy Call):
float volatilityProxy = getVolatilityProxy(volatilityMetricInput, volatilityLookbackInput);
3. Adaptive Threshold Calculation:
This is the core of AHERF's adaptability. Instead of a static 0.5 line as the sole determinant, the script computes a dynamic threshold.
The adaptive threshold is calculated as: `0.5 + (Threshold Sensitivity * Volatility Proxy)`.
This means the threshold starts at the baseline 0.5 level and then adjusts upwards or downwards based on the current `volatilityProxy` scaled by the `Threshold Sensitivity (k)` input.
Pine Script® Snippet (Adaptive Threshold Calculation):
float adaptiveThreshold = 0.5 + sensitivityInput * nz(volatilityProxy, 0.0);
4. Regime Identification:
The prevailing market regime is determined by comparing the `hurstValue` to this `adaptiveThreshold`, incorporating a `Threshold Buffer` to reduce noise and clearly delineate zones:
Trending: `hurstValue > adaptiveThreshold + bufferInput`
Mean-Reverting: `hurstValue < adaptiveThreshold - bufferInput`
Random/Transition: Otherwise (Hurst value is within the buffer zone around the adaptive threshold).
Pine Script® Snippet (Regime Determination Logic):
if not na(hurstValue) and not na(adaptiveThreshold)
if hurstValue > adaptiveThreshold + bufferInput
currentRegimeColor := TRENDING_COLOR
regimeText := "Trending"
else if hurstValue < adaptiveThreshold - bufferInput
currentRegimeColor := MEAN_REVERTING_COLOR
regimeText := "Mean-Reverting"
// else remains Random/Transition
█ HOW TO USE IT
Interpreting the Visuals:
Observe the plotted `Hurst Exponent (H)` line (White) relative to the `Adaptive Threshold` line (Orange).
The background color provides an immediate indication of the current regime: Green for Trending, Red for Mean-Reverting, and Gray for Random/Transition.
The fixed `0.5 Level` (Dashed Gray) is plotted for reference against traditional Hurst interpretation.
Labels "T", "M", and "R" appear below bars to signal new entries into Trending, Mean-Reverting, or Random/Transition regimes, respectively.
Inputs Customization:
Hurst Exponent Calculation
Hurst Lookback Period: Defines the number of bars used for the Hurst Exponent calculation. Longer periods generally yield smoother Hurst values, reflecting longer-term market memory. Shorter periods are more responsive.
Adaptive Threshold Settings
Volatility Metric: Choose "ATR" or "StdDev" to drive the adaptive threshold. Experiment to see which best suits the asset.
Volatility Lookback: The lookback period for the selected volatility metric.
Threshold Sensitivity (k): A crucial multiplier determining how strongly volatility influences the adaptive threshold. Higher values mean volatility has a greater impact, potentially widening or shifting the regime bands more significantly.
Threshold Buffer: Creates a neutral zone around the adaptive threshold. This helps prevent overly frequent regime shifts due_to minor Hurst fluctuations.
█ ORIGINALITY AND USEFULNESS
The AHERF indicator distinguishes itself by:
Implementing an adaptive threshold mechanism for Hurst Exponent analysis. This threshold dynamically responds to changes in market volatility, offering a more flexible approach than a fixed 0.5 reference, potentially leading to more contextually relevant regime detection.
Providing clear, at-a-glance visualization of market regimes through background coloring and distinct plot shapes.
Offering user-configurable parameters for both the Hurst calculation and the adaptive threshold components, allowing for tuning across various assets and timeframes.
Traders can leverage AHERF to better align their chosen strategies with the prevailing market character, potentially enhancing trade filtering and decision-making processes.
█ VISUALIZATION
The indicator plots the following in a separate pane:
Hurst Exponent (H): A white line representing the calculated Hurst value.
Adaptive Threshold: An orange line representing the dynamic threshold.
Fixed 0.5 Level: A dashed gray horizontal line for traditional Hurst reference.
Background Color: Changes based on the identified regime:
Green: Trending regime.
Red: Mean-Reverting regime.
Gray: Random/Transition regime.
Regime Entry Shapes: Plotted below the price bars (forced overlay for visibility):
"T" (Green Label): Signals entry into a Trending regime.
"M" (Teal Label): Signals entry into a Mean-Reverting regime.
"R" (Cyan Label): Signals entry into a Random/Transition regime.
█ ALERTS
The script provides alert conditions for changes in the market regime:
Regime Shift to Trending: Triggers when the Hurst Exponent crosses above the adaptive threshold into a Trending state.
Regime Shift to Mean-Reverting: Triggers when the Hurst Exponent crosses below the adaptive threshold into a Mean-Reverting state.
Regime Shift to Random/Transition: Triggers when the Hurst Exponent enters the Random/Transition zone around the adaptive threshold.
These can be configured directly from the TradingView alerts panel.
█ NOTES & DISCLAIMERS
The Hurst Exponent calculation is an approximation; various methods exist, each with its nuances.
The performance and relevance of the identified regimes can differ across financial instruments and timeframes. Parameter tuning is recommended.
This indicator is intended as a decision-support tool and should not be the sole basis for trading decisions. Always integrate its signals within a broader analytical framework.
Past performance of any trading system or indicator, including those derived from AHERF, is not indicative of future results.
█ CREDITS & LICENSE
Author: mastertop ( Twitter: x.com )
Color Palette: Uses the `MaterialPalette` library by MASTERTOP_ASTRAY.
This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
© mastertop, 2025
Strike Price selection by GoldenJetThis script is designed to assist options traders in selecting appropriate strike prices based on the latest prices of two financial instruments. It retrieves the latest prices, rounds them to the nearest significant value, and calculates potential strike prices for both call and put options. The results are displayed in a customizable table, allowing traders to quickly see the relevant strike prices for their trading decisions.
The strike prices shown are In-The-Money (ITM), which helps options traders in several ways:
Saving from Theta Decay: On expiry day, ITM options experience less time decay (Theta), which can help preserve the option's value.
Capturing Good Points: ITM options have a higher Delta, meaning they move more in line with the underlying asset's price. This can help traders capture a good amount of points as the underlying asset's price changes.
In essence, this tool simplifies the process of determining strike prices, making it easier for traders to make informed decisions and potentially improve their trading outcomes.
VOL & AVG OverlayCustom Session Volume Versus Average Volume
Description:
This indicator will create an overlay on your chart that will show you the following information:
Custom Session Volume
Average For Selected Session
Percentage Comparison
Options:
Set Custom Time Frame For Calculations
Set Custom Time Frame For Average Comparison
Set Custom Time Zone
Enable / Disable Each Value
Change Text Color
Change Background Color
Change Table location
Example:
Set indicator to 30 period average. Set custom time frame to 9:30am to 10:30am Eastern/New York.
When the time frame for the calculation is closed , the indicator will provide a comparison of the current days volume compared to the average of 30 previous days for that same time frame and display it as a percentage in the table.
In this example you could compare how the first hour of the trading day compares to the previous 30 day's average, aiding in evaluating the potential volume for the remainder of the day.
Notes:
Times must be entered in 24 hour format. (1pm = 13:00 etc.)
This indicator is for Intra-day time frames, not > Day.
If you prefer data in this format as opposed to a plotted line, check out my other indicator: ADR & ATR Overlay
Mogambo ScalpingJUST SCALP with the SIGNALS. Make little entries take your profit and enjoy the trades.
JDXBT Monthly VWAPIt calculates the average price for each month, weighted by trading volume, and automatically resets the calculation at the start of each new month. The VWAP line changes colour based on direction: black if rising, fuchsia if falling — helping traders quickly identify monthly price trends with volume context. It’s a useful tool for spotting key levels and momentum shifts on a monthly basis.
reversionXreversionX is a mean reversion indicator designed to identify high-probability reversal points based on extreme price behavior and momentum exhaustion. It combines classic Bollinger Band behavior with oscillator confirmations (StochRSI and RSI) for cleaner entries and reduced noise.
To further improve signal quality, reversionX can be combined with "Beardy Squeeze Pro" and MACD as a filtering mechanism—helping you avoid false setups during periods of high momentum. This filter ensures that signals are aligned with momentum shifts and breakout potential, increasing confidence in both bullish and bearish reversals.
Anchored VWAP with Bands DebugAnchored VWAP with ±1% Bands Starting at 9:00 AM
This indicator calculates an Anchored Volume Weighted Average Price (VWAP) starting precisely at 9:00 AM each trading day (customizable). It plots the VWAP line alongside two dynamic bands set at ±1% above and below the VWAP. The bands help visualize potential support and resistance zones relative to the intraday VWAP anchored at market open.
Key Features:
Anchors VWAP calculation to user-defined start time (default 9:00 AM)
Displays VWAP line in orange for easy tracking
Shows upper and lower dashed bands at ±1% of VWAP in green and red, respectively
Bands update dynamically with each new bar throughout the trading day
Designed for intraday charts (1-minute, 5-minute, etc.)
Use this tool to better assess intraday price action around VWAP and identify potential trading opportunities based on price deviations from the anchored VWAP.
📊 Portfolio TrackerPortfolio Tracker
🧠 How This Script Works
This Pine Script generates a dynamic portfolio table in the upper-right corner of your chart. It:
Monitors your positions in: BTC, SOL, ADA, XRP, and XAU (Gold).
Calculates for each asset:
Current value,
Profit/Loss in your currency ,
Percentage change.
Color-coded output:
🟢 Green = Profit
🔴 Red = Loss
Automatically updates every few candles.
Tracks total portfolio value, PnL, and % return.
Triggers custom alerts when:
Total portfolio profit exceeds +5% or +10%.
🛠️ How to Customize It for Your Own Portfolio
🔹 1. Update your personal asset data
Inside the // === INPUTS === section of the code, modify these lines:
btc1_qty = 0.0013
btc1_entry = 72831.80
Repeat for each asset you own:
Replace xxx_qty with your amount.
Replace xxx_entry with your buy price (in your currency).
Make sure the request.security(...) line fetches the correct symbol.
🔹 2. Add more assets (optional)
Duplicate any block like ADA and change the variable names and symbols:
new_qty = ...
new_entry = ...
new_price = request.security("BINANCE:NEWTOKENUSD", timeframe.period, close)
Also include the new asset in:
total_pnl += ...
total_value_now += ...
total_cost += ...
The table.cell(...) block to show it in the table.
Why This Tool Rocks
Tracks all your holdings in one chart panel.
Requires no API or external data feed.
Real-time updates based on TradingView chart prices.
Fully editable and extendable to any other token or asset.
SD finalhi, this is the best indicator i have written from my past experience, hope you will like it. do send your feedback
Squeeze Momentum Indicator Version3This is a corrected version of Squeeze Indicator that initially was authored by LazyBear and modified by lemongeek
BUY when Blue crosses ABOVE the RED signal line
SELL when Blue crosses BELOW the RED signal line
UNITED TRADING COMMUNITY WaterMarkWATER MARK indicator. Will allow you to improve the order of the entries you need on the chart.
1. Name and date for the traded instrument
2. Watermarks to protect your charts (in the center and around the perimeter of the chart)
3. The new "notes" option will allow you to keep focus on the factors that are important to you on the chart.
Very flexible settings for any notes, labels, watermarks on the chart that are important to you.
Индикатор WATER MARK . Даст возможность вам улучшить порядок нужных вам записей на графике.
1. Название и дата для торгуемого инструмента
2. Водные знаки для защиты ваших графиков ( в центре и по периметру графика)
3. Новая опция "заметки" позволит вам держать фокус на важных для вас факторах на графике.
Очень гибкая настройка , любых значимых для вас заметок , лейблов , вотермарк на графике.
RSI Crossover with RSI EMAdfsffefdfnsdbhavddd
dnadghvadudvhbdasbdjadd
sdcasdvscdhgasvxdhzvjx
sasvhx zhxvjhx
Pivot Reversal Markers (3-bar strength)### Pivot Reversal Markers (3-Bar Strength)
**Overview:**
This indicator identifies and marks pivot high and pivot low reversal points on your chart using a customizable pivot strength. Ideal for traders seeking clear visual signals of potential reversals.
**Settings:**
* **Pivot Strength:** Number of bars checked before and after to confirm a pivot (default = 3).
**Signals:**
* 🔺 **Red Triangle (Pivot High):** Potential short entry or reversal from upward to downward trend.
* 🔻 **Green Triangle (Pivot Low):** Potential long entry or reversal from downward to upward trend.
**Usage:**
Combine these pivot signals with other technical analysis tools or indicators for optimal results.
Script fexivelScript created to be a flexible filter to market movements! Predicting possible movements
Key Candle Re-Entry ZonesTime zone markups for the 1:25 & 9:25 times. This helps build identity for the pre-market and market analysis
CANSLIM Từng Bước"CANSLIM Step-by-Step" Indicator Description for TradingView
CANSLIM Step-by-Step - Your Companion for Evaluating Stocks with the CANSLIM Methodology
Welcome, investors, to "CANSLIM Step-by-Step"! This indicator is designed to assist you in analyzing and evaluating stocks based on the seven core criteria of William J. O'Neil's renowned CANSLIM investment methodology.
Purpose of the Indicator:
This tool is not intended to provide fully automated buy/sell recommendations. Instead, it focuses on "digitizing" and visualizing each step in the CANSLIM evaluation process, helping you gain a more comprehensive and detailed overview of potential stocks.
Key Features:
Evaluation of 7 CANSLIM Criteria:
C (Current Quarterly Earnings): Allows manual input for the latest quarterly EPS growth (%) and positive EPS status. It also attempts to fetch data automatically (which may not be stable for all symbols) for comparison.
A (Annual Earnings & ROE): Prioritizes manual input for annual EPS growth rate (CAGR) and current ROE to ensure accuracy.
N (New Highs): Automatically analyzes price action from the chart to determine if the stock is near or making a new 52-week high.
S (Supply and Demand - Volume): Automatically analyzes current trading volume against its average to detect significant surges.
L (Leader or Laggard): You evaluate and input whether the stock is a market or industry leader.
I (Institutional Sponsorship): You evaluate and input the quality and quantity of significant institutional ownership.
M (Market Direction): Automatically analyzes the trend of a reference market index (e.g., VNINDEX) using moving averages.
Prioritized Manual Input for Financial Data: For criteria C and A, the indicator allows and encourages manual input to ensure the highest accuracy, given the inherent limitations of automatically accessing consistently updated financial data via Pine Script.
"Super Compact" Summary Table:
Clearly displays the status (Pass/Fail/N/A) of each criterion using color codes.
Provides specific values for each criterion (e.g., growth percentage, distance to 52-week high, volume ratio).
Aggregates a total score (out of 7) and a star rating (0 to 7 stars) for a quick overview of the stock's CANSLIM compliance.
Customizable Thresholds: You can adjust the evaluation thresholds for various criteria (e.g., minimum EPS growth %, minimum ROE %) to suit your risk appetite and personal standards.
How to Use Effectively:
Step 1: Select the stock symbol you wish to analyze.
Step 2: Open the indicator's settings:
Manually input your research findings for criteria C, A, L, and I.
Adjust thresholds and parameters for N, S, and M if needed.
Select the appropriate market index symbol for criterion M.
Step 3: Observe the summary table in the bottom-right corner of your screen for the overall assessment and detailed breakdown of each criterion.
"CANSLIM Step-by-Step" is a companion tool designed to help you systematize your stock evaluation process according to one of the most successful investment methodologies. Combine this indicator with your knowledge and experience to make informed investment decisions!
Commitment to Ongoing Development
We wish to share that the current "CANSLIM Step-by-Step" indicator is the initial version in our journey to build a more comprehensive CANSLIM stock evaluation support tool.
Our vision is to continuously develop and enhance this indicator with the following goals:
Increase Automation Capabilities: Explore solutions to automatically update certain basic financial data (for criteria C, A) more reliably and consistently, within the technical limits of Pine Script and available data sources.
Add Deeper Analytical Features: Such as visualizing changes in criteria over time, or comparisons with industry peers (where feasible).
Improve User Interface: Make data input and tracking even more intuitive and convenient.
Listen to and Integrate Community Feedback: We highly value all user feedback, bug reports, and feature suggestions to make "CANSLIM Step-by-Step" an increasingly useful tool.
This is a dedicated project, and we are committed to continually working to make "CANSLIM Step-by-Step" an even more powerful assistant for investors following the CANSLIM philosophy.
Granger Causality Flow IndicatorGranger Causality Flow Indicator (GC Flow)
█ OVERVIEW
The Granger Causality Flow Indicator (GC Flow) attempts to quantify the potential predictive relationship between two user-selected financial instruments (Symbol X and Symbol Y). In essence, it explores whether the past values of one series (e.g., Symbol X) can help explain the current value of another series (e.g., Symbol Y) better than Y's own past values alone.
This indicator provides a "Granger Causality Score" (GC Score) for both directions (X → Y and Y → X). A higher score suggests a stronger statistical linkage where one series may lead or influence the other. The indicator visualizes this "flow" of potential influence through background colors and on-chart text.
Important Note: "Granger Causality" does not imply true economic or fundamental causation. It is a statistical concept indicating predictive power or information flow. This implementation also involves simplifications (notably, using AR(1) models) due to the complexities of full Vector Autoregression (VAR) models in Pine Script®.
█ HOW IT WORKS
The indicator's methodology is based on comparing the performance of Autoregressive (AR) models:
1. Data Preprocessing:
Fetches historical close prices for two user-defined symbols (X and Y).
Optionally applies first-order differencing (`price - price `) to the series. Differencing is a common technique to achieve a proxy for stationarity, which is an underlying assumption for Granger Causality tests. Non-stationary series can lead to spurious correlations.
2. Autoregressive (AR) Models (Simplified to AR(1)):
Due to Pine Script's current limitations for complex multivariate time series models, this indicator uses simplified AR(1) models (where the current value is predicted by its immediately preceding value).
Restricted Model (for Y → Y): Predicts the target series (e.g., Y) using only its own past value (Y ).
`Y = c_R + a_R * Y + residuals_R`
The variance of `residuals_R` (Var_R) is calculated.
Unrestricted Model (Proxy for X → Y): To test if X Granger-causes Y, the indicator examines if the past values of X (X ) can explain the residuals from the restricted model of Y.
`residuals_R = c_UR' + b_UR * X + residuals_UR`
The variance of these final `residuals_UR` (Var_UR) is calculated.
The same process is repeated to test if Y Granger-causes X.
3. Granger Causality (GC) Score Calculation:
The GC Score quantifies the improvement in prediction from adding the other series' past values. It's calculated as:
`GC Score = 1 - (Var_UR / Var_R)`
A score closer to 1 suggests that the "causing" series significantly reduces the unexplained variance of the "target" series (i.e., Var_UR is much smaller than Var_R), indicating stronger Granger causality.
A score near 0 (or capped at 0 if Var_UR >= Var_R) suggests little to no improvement in prediction.
The score is calculated over a rolling `Calculation Window`.
Pine Script® Snippet (Conceptual GC Score Logic):
// Conceptual representation of GC Score calculation
// var_R: Variance of residuals when Y is predicted by Y
// var_UR: Variance of residuals when Y's AR(1) residuals are predicted by X
score = 0.0
if var_R > 1e-9 // Avoid division by zero
score := 1.0 - (var_UR / var_R)
score := score < 0 ? 0 : score // Ensure score is not negative
4. Determining Causal Flow:
The calculated GC Scores for X → Y and Y → X are compared against a user-defined `Significance Threshold for GC Score`.
If GC_X→Y > threshold AND GC_Y→X > threshold: Bidirectional flow.
If GC_X→Y > threshold only: X → Y flow.
If GC_Y→X > threshold only: Y → X flow.
Otherwise: No significant flow.
█ HOW TO USE IT
Interpreting the Visuals:
Background Color:
Green: Indicates X → Y (Symbol 1 potentially leads Symbol 2).
Orange: Indicates Y → X (Symbol 2 potentially leads Symbol 1).
Blue: Indicates Bidirectional influence.
Gray: No significant Granger causality detected based on the threshold.
Data Window Plots: The actual GC Scores for X → Y (blue) and Y → X (red) are plotted and visible in TradingView's Data Window. A dashed gray line shows your `Significance Threshold`.
On-Chart Table (Last Bar): Displays the currently detected causal direction text (e.g., "BTCUSDT → QQQ").
Potential Applications:
Intermarket Analysis: Explore potential lead-lag relationships between different asset classes (e.g., commodities and equities, bonds and currencies).
Pair Trading Components: Identify if one component of a potential pair tends to lead the other.
Confirmation Tool: Use alongside other analyses to see if a move in one asset might foreshadow a move in another.
Considerations:
Symbol Choice: Select symbols that have a plausible economic or market relationship.
Stationarity: Granger Causality tests ideally require stationary time series. The `Use Differencing` option is a simple proxy. True stationarity testing is complex. Non-stationary data can yield misleading results.
Lag Order (p): This indicator is fixed at p=1 due to Pine Script® limitations. In rigorous analysis, selecting the optimal lag order is crucial.
Calculation Window: Shorter windows are more responsive but may be noisier. Longer windows provide smoother scores but lag more.
Significance Threshold: Adjust this based on your desired sensitivity for detecting causal links. There's no universally "correct" threshold; it depends on the context and noise level of the series.
█ INPUTS
Symbol 1 (X): The first symbol in the analysis.
Symbol 2 (Y): The second symbol (considered the target when testing X → Y).
Use Differencing: If true, applies first-order differencing to both series as a proxy for stationarity.
Calculation Window (N): Lookback period for AR model coefficient estimation and variance calculations.
Lag Order (p): Currently fixed at 1. This defines the lag used (e.g., X , Y ) in the AR models.
Significance Threshold for GC Score: A value between 0.01 and 0.99. The calculated GC Score must exceed this to be considered significant.
█ VISUALIZATION
Background Color: Dynamically changes based on the detected Granger causal flow (Green for X → Y, Orange for Y → X, Blue for Bidirectional, Gray for None).
GC Scores (Data Window):
Blue Plot: GC Score for X → Y.
Red Plot: GC Score for Y → X.
Significance Threshold Line: A dashed gray horizontal line plotted at the level of your input threshold.
On-Chart Table: Displayed on the top-right (on the last bar), showing the current causal direction text.
█ ALERTS
The indicator can generate alerts for:
Emergence of X → Y causality.
Emergence of Y → X causality.
General change or cessation of a previously detected causal relationship.
█ IMPORTANT DISCLAIMERS & LIMITATIONS
Correlation vs. Causation: Granger causality measures predictive power, not true underlying economic causation. A strong GC Score doesn't prove one asset *causes* another to move, only that its past values improve predictions.
Stationarity Assumption: While differencing is offered, it's a simplified approach. Non-stationary data can lead to spurious (false) Granger causality detection.
Model Simplification (AR(1)): This script uses AR(1) models for simplicity. Real-world relationships can involve more complex dynamics and higher lag orders. The fixed lag of p=1 is a significant constraint.
Sensitivity to Parameters: Results can be sensitive to the chosen symbols, calculation window, differencing option, and significance threshold.
No Statistical Significance Testing (p-values): This indicator uses a direct threshold on the GC Score itself, not a formal statistical test (like an F-test producing p-values) typically found in econometric software.
Use this indicator as an exploratory tool within a broader analytical framework. Do not rely on it as a standalone basis for trading decisions.
█ CREDITS & LICENSE
Author: mastertop ( Twitter: x.com )
Version: 1.0 (Released: 2025-05-08)
This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
© mastertop, 2025
Trader’s One-Liner Reminder⚠️ このインジケーターは日本語でのメッセージ表示に特化しています。英語でのリマインドは含まれていません。
This script displays reminders only in Japanese.
【日本語説明】
本インジケーターは、日本時間(JST)8:00〜翌1:00までの時間帯に合わせて、15分刻みで一言メッセージを表示します。
トレード中の焦りや過信を防ぐための心理的リマインダーとして設計されています。
- 「Frankモード」では、関西弁風のユーモアあるメッセージを自動表示
- 「Customモード」では、全時間帯のメッセージを自分で自由に設定可能
- メッセージはチャート上部中央に、大きな文字・黄色背景で表示され、視認性にも配慮
💡ポジポジ病対策、メンタル強化、時間管理などに最適です。
---
【English Description】
This indicator displays motivational reminders in Japanese every 15 minutes from 8:00 JST to 1:00 JST (the next day).
It is designed to support traders mentally during market hours.
- “Frank mode” automatically shows prewritten humorous messages (in Kansai dialect tone)
- “Custom mode” lets users input their own message for each 15-minute time block
- Messages are shown in large text at the top-center of the chart with a yellow background for clear visibility
💡 Ideal for discipline, overtrading prevention, and improving trading psychology.
---
🔔 This indicator is intended for Japanese-speaking users. If you'd like an English version, feel free to fork and customize it!
Ehlers Ultimate Bands (UBANDS)UBANDS: ULTIMATE BANDS
🔍 OVERVIEW AND PURPOSE
Ultimate Bands, developed by John F. Ehlers, are a volatility-based channel indicator designed to provide a responsive and smooth representation of price boundaries with significantly reduced lag compared to traditional Bollinger Bands. Bollinger Bands typically use a Simple Moving Average for the centerline and standard deviations from it to establish the bands, both of which can increase lag. Ultimate Bands address this by employing Ehlers' Ultrasmooth Filter for the central moving average. The bands are then plotted based on the volatility of price around this ultrasmooth centerline.
The primary purpose of Ultimate Bands is to offer traders a clearer view of potential support and resistance levels that react quickly to price changes while filtering out excessive noise, aiming for nearly zero lag in the indicator band.
🧩 CORE CONCEPTS
Ultrasmooth Centerline: Employs the Ehlers Ultrasmooth Filter as the basis (centerline) for the bands, aiming for minimal lag and enhanced smoothing.
Volatility-Adaptive Width: The distance between the upper and lower bands is determined by a measure of price deviation from the ultrasmooth centerline. This causes the bands to widen during volatile periods and contract during calm periods.
Dynamic Support/Resistance: The bands serve as dynamic levels of potential support (lower band) and resistance (upper band).
🧮 CALCULATION AND MATHEMATICAL FOUNDATION
Ehlers' Original Concept for Deviation:
John Ehlers describes the deviation calculation as: "The deviation at each data sample is the difference between Smooth and the Close at that data point. The Standard Deviation (SD) is computed as the square root of the average of the squares of the individual deviations."
This describes calculating the Root Mean Square (RMS) of the residuals:
Smooth = UltrasmoothFilter(Source, Length)
Residuals = Source - Smooth
SumOfSquaredResiduals = Sum(Residuals ^2) for i over Length
MeanOfSquaredResiduals = SumOfSquaredResiduals / Length
SD_Ehlers = SquareRoot(MeanOfSquaredResiduals) (This is the RMS of residuals)
Pine Script Implementation's Deviation:
The provided Pine Script implementation calculates the statistical standard deviation of the residuals:
Smooth = UltrasmoothFilter(Source, Length) (referred to as _ehusf in the script)
Residuals = Source - Smooth
Mean_Residuals = Average(Residuals, Length)
Variance_Residuals = Average((Residuals - Mean_Residuals)^2, Length)
SD_Pine = SquareRoot(Variance_Residuals) (This is the statistical standard deviation of residuals)
Band Calculation (Common to both approaches, using their respective SD):
UpperBand = Smooth + (NumSDs × SD)
LowerBand = Smooth - (NumSDs × SD)
🔍 Technical Note: The Pine Script implementation uses a statistical standard deviation of the residuals (differences between price and the smooth average). Ehlers' original text implies an RMS of these residuals. While both measure dispersion, they will yield slightly different values. The Ultrasmooth Filter itself is a key component, designed for responsiveness.
📈 INTERPRETATION DETAILS
Reduced Lag: The primary advantage is the significant reduction in lag compared to standard Bollinger Bands, allowing for quicker reaction to price changes.
Volatility Indication: Widening bands indicate increasing market volatility, while narrowing bands suggest decreasing volatility.
Overbought/Oversold Conditions (Use with caution):
• Price touching or exceeding the Upper Band may suggest overbought conditions.
• Price touching or falling below the Lower Band may suggest oversold conditions.
Trend Identification:
• Price consistently "walking the band" (moving along the upper or lower band) can indicate a strong trend.
• The Middle Band (Ultrasmooth Filter) acts as a dynamic support/resistance level and indicates the short-term trend direction.
Comparison to Ultimate Channel: Ehlers notes that the Ultimate Band indicator does not differ from the Ultimate Channel indicator in any major fashion.
🛠️ USE AND APPLICATION
Ultimate Bands can be used similarly to how Keltner Channels or Bollinger Bands are used for interpreting price action, with the main difference being the reduced lag.
Example Trading Strategy (from John F. Ehlers):
Hold a position in the direction of the Ultimate Smoother (the centerline).
Exit that position when the price "pops" outside the channel or band in the opposite direction of the trade.
This is described as a trend-following strategy with an automatic following stop.
⚠️ LIMITATIONS AND CONSIDERATIONS
Lag (Minimized but Present): While significantly reduced, some minimal lag inherent to averaging processes will still exist. Increasing the Length parameter for smoother bands will moderately increase this lag.
Parameter Sensitivity: The Length and StdDev Multiplier settings are key to tuning the indicator for different assets and timeframes.
False Signals: As with any band indicator, false signals can occur, particularly in choppy or non-trending markets.
Not a Standalone System: Best used in conjunction with other forms of analysis for confirmation.
Deviation Calculation Nuance: Be aware of the difference in deviation calculation (statistical standard deviation vs. RMS of residuals) if comparing directly to Ehlers' original concept as described.
📚 REFERENCES
Ehlers, J. F. (2024). Article/Publication where "Code Listing 2" for Ultimate Bands is featured. (Specific source to be identified if known, e.g., "Stocks & Commodities Magazine, Vol. XX, No. YY").
Ehlers, J. F. (General). Various publications on advanced filtering and cycle analysis. (e.g., "Rocket Science for Traders", "Cycle Analytics for Traders").
Customizable Disparity Index (Short EMA + Mid SMA, Base 100%)This indicator plots the Disparity Index (%) from both a short-term EMA and a mid-term SMA, using 100% as the baseline.
1. How to use:
- Disparity above 100% means price is above the selected moving average.
- Disparity below 100% indicates the price is below the moving average.
- This can help identify overbought/oversold conditions or mean-reversion opportunities.
Fully customizable periods for both EMA and SMA. Suitable for fast-moving markets like crypto.
2. Practical Interpretation of the 100% Baseline Disparity Index
100%: Price is equal to the moving average (neutral baseline)
100–103%: Normal bullish movement, price riding above MA support
105%+: Potential short-term overbought, especially after a sharp rise
110–115%+: Strong overbought signal, often followed by pullback or consolidation
95% or lower: Possible oversold condition, potential bounce or reversal zone
Use in combination with volume, RSI, or candlestick patterns for confirmation.