Price Lag Factor (PLF)📊 Price Lag Factor (PLF) for Crypto Traders: A Comprehensive Breakdown
The Price Lag Factor (PLF) is a momentum indicator designed to identify overextended price movements and gauge market momentum. It is particularly optimized for the crypto market, which is known for its high volatility and rapid trend shifts.
🔎 What is the Price Lag Factor (PLF)?
The PLF measures the difference between long-term and short-term price momentum and scales it dynamically based on recent volatility. This helps traders identify when the market might be overbought or oversold while filtering out noise.
The formula used in the PLF calculation is:
PLF = (Z-Long - Z-Short) / Stdev(PLF)
Where:
Z-long: Z-score of the long-term moving average (50-period by default).
Z-short: Z-score of the short-term moving average (14-period by default).
Stdev(PLF): Standard deviation of the PLF over a longer period (50-period by default).
🧠 How to Interpret the PLF:
1. Trend Direction:
Positive PLF (Green Bars): Indicates bullish momentum. The long-term trend is up, and short-term movements are confirming it.
Negative PLF (Red Bars): Indicates bearish momentum. The long-term trend is down, and short-term movements are consistent with it.
2. Momentum Strength:
PLF near Zero (±0.5): Low momentum; trend direction is not strong.
PLF between ±1 and ±2: Moderate momentum, indicating that the market is moving with strength but not in an overextended state.
PLF beyond ±2: High momentum (overbought/oversold), indicating potential trend exhaustion and a possible reversal.
📈 Trading Strategies:
1. Trend Following:
Bullish Signal:
Enter long when PLF crosses above 0 and remains green.
Confirm with other indicators like RSI or MACD to reduce false signals.
Bearish Signal:
Enter short when PLF crosses below 0 and remains red.
Use trend confirmation (e.g., moving average crossover) for better accuracy.
2. Reversal Trading:
Overbought Signal:
If PLF rises above +2, look for signs of bearish divergence or a reversal pattern to consider a short entry.
Oversold Signal:
If PLF falls below -2, watch for bullish divergence or a support bounce to consider a long entry.
3. Momentum Divergence:
Bullish Divergence:
Price makes a lower low while PLF makes a higher low.
Indicates weakening bearish momentum and a potential bullish reversal.
Bearish Divergence:
Price makes a higher high while PLF makes a lower high.
Signals weakening bullish momentum and a potential bearish reversal.
💡 Best Practices:
Combine with Volume:
Volume spikes during high PLF readings can confirm trend continuation.
Low volume during PLF extremes may hint at false breakouts.
Watch for Extreme Levels:
PLF beyond ±2 suggests overextended price action. Use caution when entering new positions.
Confirm with Other Indicators:
Use with Relative Strength Index (RSI) or Bollinger Bands to get a better sense of overbought/oversold conditions.
Overlay with a moving average to gauge trend consistency.
🚀 Why the PLF Works for Crypto:
Crypto markets are highly volatile and prone to rapid trend changes. The PLF's adaptive scaling ensures it remains relevant regardless of market conditions.
It highlights momentum shifts more accurately than static indicators because it accounts for changing volatility in its calculation.
🚨 Disclaimer for Traders Using the Price Lag Factor (PLF) Indicator:
The Price Lag Factor (PLF) indicator is designed as a technical analysis tool to gauge momentum and identify potential overbought or oversold conditions. However, it should not be relied upon as a sole decision-making factor for trading or investing.
Important Points to Consider:
Market Risk: Trading cryptocurrencies and other financial assets involves significant risk. The PLF may not accurately predict future price movements, especially during unexpected market events.
Indicator Limitations: No technical indicator, including the PLF, is infallible. False signals can occur, particularly in low-volume or highly volatile conditions.
Supplementary Analysis: Always combine PLF insights with other technical indicators, fundamental analysis, and risk management strategies to make informed decisions.
Personal Judgment: Traders should use their own discretion when interpreting PLF signals and never trade based solely on this indicator.
No Guarantees: The PLF is designed for educational and informational purposes only. Past performance is not indicative of future results.
Always perform thorough research and consider consulting with a professional financial advisor before making any trading decisions.
Statistics
Vietnamese Stock Market FTD (Follow Through Day) AlertA Pine Script implementing William O'Neil’s Follow Through Day (FTD) strategy for the Vietnamese stock market. It scans 7 predefined sector groups (Banks, Real Estate, Retail, etc.) to detect momentum breakouts.
Key Features :
Triggers an FTD signal when ≥X groups (default: 3) have ≥Y stocks (default: 2) rising above a Z% threshold (default: 5%) daily.
Highlights qualifying stocks by group in a dynamic label during alerts.
Visualizes strength via histograms and background shading.
Open-source under Mozilla Public License 2.0 .
Purpose : Identify institutional buying and potential market reversals.
Ultimate NATR█ | Overview
This N-ATR (Normalized Average True Range) volatility indicator illustrates the trend of percentage-based candle volatility over a self-defined number of bars (period). The primary objective of the indicator is to highlight periods of high or low volatility, which can be exploited within the cyclical logic of volatility contraction and expansion. If market behavior is inherently cyclical, it naturally follows that candle volatility itself also exhibits cyclical characteristics.
It can therefore be defined as a recurring pattern:
Low Volatility --> High Volatility --> Low Volatility -->
Here is a concrete example of the cyclical phases of volatility, which compresses during Accumulation or Distribution phases, and then explodes with a mark-up or mark-down in price.
█ | Features
🔵 Plots on Overlay false
Smoothed NATR Line
NATR's Fixed Levels
NATR's Standard Deviation Levels (Dynamic)
🔵 Elements, overlapped to the chart
Analytical and Statistical Tables
NATR Information Label
🔵 Customization
Button to calculate fixed or dynamic (auto-calculated) levels
Dark / light mode based on the layout background
Setting of the initial date for the calculation of N-ATR dependent functions
ATR period
Moving Average of the N-ATR
Data sample (number) on which to calculate the standard deviation of the N-ATR
Adjustment of the multiplicative coefficients of the standard deviation σ
Setting of static values L1, L2, L3, and L4 of the N-ATR
Adjustment of the table zoom factor
█ | N-ATR Calculation
The N-ATR function is built upon the ATR (Average True Range), the quintessential volatility indicator.
Once the ATR_period is defined, the N-ATR is calculated using the following formula:
N-ATR = 100 * ATR / close
A moving average of the N-ATR completes the main indicator curve (yellow), making the function smoother and less sensitive to the instantaneous fluctuations of individual candles.
SMA_natr = sum(natr_i) / ATR_period
natr = 100 * ta.atr(periodo_ATR) / close
media_natr = ta.sma(natr, media_len)
█ | Settings
Show selected calc period : allows you to display or hide a background color that extends from the initial calculation date to the current bar, or from the first available bar if the selected date is earlier.
Set data range for ST.DEV : this setting defines the number of bars over which the standard deviation is calculated—an essential foundational element for plotting the upper and lower curves relative to the N-ATR, as well as for defining the statistical ranges in the tables overlaid on the price chart.
Static Levels : these are user-defined input values representing N-ATR value thresholds, used to classify table values within the ranges L1–L2 / L2–L3 / L3–L4 / >L4. To be meaningful, the user is expected to conduct separate statistical analysis using a spreadsheet or external data analysis tools or languages.
Coefficients x, w, y : these are input values used in the code to calculate statistical ranges and the bands above and below the N-ATR. For example, when expressing the statistical range as μ ± nσ, n can take the value of x, w, or y. By default, the values are x=1, w=2, y=3. However, as explained, they can be customized to represent wider or narrower statistical clusters, depending on the user's analytical preference.
█ | Tables
Static Levels : when the boolean button "Fixed Levels" is active, the table counts and distributes the data across five ranges, defined by the custom input values L1, L2, L3, and L4. Studying the table immediately answers the question: "Have I set appropriate values for the L_x levels?"
If the majority of data points fall within the lowest range, it indicates that the levels are spaced too far apart; conversely, if most values are in the "> L4" range, the levels are likely too narrow.
From left to right, the table also displays the probability that the current candle might move from its current range to the next one (Update Prob.); the absolute frequency of each range and the relative frequency are shown in the rightmost column.
Dynamic Levels : alternatively, you can deselect "Fixed Levels" to obtain an auto-calculated / self-adjusting representation of the N-ATR and its bands, based on the standard deviation input settings. In this case, the table takes on a more statistical form, useful for analyzing the frequency of outliers beyond a certain standard deviation, as defined by the largest multiplicative coefficient "y".
This visualization may also be preferred when aiming to study the standard deviation of the N-ATR in greater depth for a given asset, timeframe, and configuration more broadly.
█ | Next-to-Price Label
Information in the label next to the live price: if the first settings button in the indicator, "Fixed levels", is enabled (true), a label appears next to the price showing information about the relative position of the N-ATR associated with the current candle.
Specifically, if:
natr ≤ L1, ⇨ "Minimum-"
natr > L1 and natr ≤ L2, ⇨ "Minimum+"
natr > L2 and natr ≤ L3, ⇨ "Neutral L3"
natr > L3 and natr ≤ L4, ⇨ "Topping L4"
natr > L4, ⇨ "Excess L4: natr > V4"
Additionally, the corresponding N-ATR range is displayed to the right of the evaluated category for the individual candle.
1-Please note: this allows you to avoid constantly checking the N-ATR curve, especially when working in full-screen mode and focusing solely on the price chart for a cleaner view.
2-Please note : unfortunately, the informational label is not available in Dynamic display mode.
█ | Conclusion
• This indicator captures a snapshot of market turbulence. Whether currently unfolding or approaching, the combination of volatility breakout forecasting with price structure analysis—further evaluated based on periods of compression or high turbulence—offers traders a powerful tool for identifying trend-aligned trade opportunities.
• The accompanying analytical tables enhance the indicator by enabling a statistical interpretation of the likelihood that certain excess thresholds will be reached. Based on this data, traders can gain deeper insight into the nature of the asset, identify outlier volatility levels, and strengthen the hedging of their trades. Used as a filter, this indicator significantly improves win rate potential.
Please note : the indicator is shown here on a black background. I suggest you trying it on a white layout as well, so you can decide which visualization best suits your preferences.
Position size Margin & Lot Calculator [Algo Star]Position Size Margin & Lot Calculator is a lightweight Pine v5 indicator that helps you scale into a trade with five incremental “steps.”
What it does:
Takes your total capital and leverage settings
Splits your risk into five proportioned entries
Shows both the USD margin required and the corresponding MT4/MT5 lot size for each entry
Why you’ll love it:
No manual calculations—everything is displayed in a neat on-chart table
Fully configurable: set your account size, leverage, contract size and price source
Ideal for pyramiding or averaging in with controlled risk at each step
Just add it to any chart, tweak your inputs, and immediately see exactly how much margin and how many lots to allocate at each of the five pre-defined steps—perfect for systematic position sizing without the headache.
ETI IndicatorThe Ensemble Technical Indicator (ETI) is a script that combines multiple established indicators into one single powerful indicator. Specifically, it takes a number of technical indicators and then converts them into +1 to represent a bullish trend, or a -1 to represent a bearish trend. It then adds these values together and takes the running sum over the past 20 days.
The ETI is composed of the following indicators and converted to +1 or -1 using the following criteria:
Simple Moving Average (10 days) : When the price is above the 10-day simple moving averaging, +1, when below -1
Weighted Moving Average (10 days) : Similar to the SMA 10, when the the price is above the 10-day weighted moving average, +1, when below -1
Stochastic K% : If the current Stochastic K% is greater than the previous value, then +1, else -1.
Stochastic D% : Similar to the Stochastic K%, when the current Stochastic D% is greater than the previous value, +1, else -1.
MACD Difference : First subtract the MACD signal (i.e. the moving average) from the MACD value and if the current value is higher than the previous value, then +1, else -1.
William's R% : If the current William's R% is greater than the previous one, then +1, else -1.
William's Accumulation/Distribution : If the current William's AD value is greater than the previous value, then +1, else -1.
Commodity Channel Index : If the Commodity Channel Index is greater than 200 (overbought), then -1, if it is less than -200 (oversold) then +1. When it is between those values, if the current value is greater than the previous value then +1, else -1.
Relative Strength Index : If the Relative Strength Index is over 70 (overbought) then -1 and if under 30 (oversold) then +1. If the Relative Strength Indicator is between those values then if the current value is higher than the previous value +1, else -1.
Momentum (9 days) : If the momentum value is greater than 0, then +1, else -1.
Again, once these values have been calculated and converted, they are added up to produce a single value. This single value is then summed across the previous 20 candles to produce a running sum.
By coalescing multiple technical indicators into a single value across time, traders can better understand how multiple inter-related indicators are behaving at once; high scores indicate that numerous indicators are showing bullish signals indicating a potential or ongoing uptrend (and vice-versa with low scores).
Additional Features
Numerous smoothing transformations have also been added (e.g. gaussian smoothing) to remove some of the noise might exist.
Suggested Use
It is recommended that stocks are shorted when the cross below 0, and are bought when the ETI crosses above -40. Arrows can be shown on the indicator to show these points. However feel free to use levels that work best for you.
Traditionally, I have treated values above +50 as overbought and below -40 as undersold (with -80 indicating extremely oversold); however these levels could also indicate either upwards and downwards momentum so taking a position based on where the ETI is (rather than crossing levels) should be done with caution.
Z-Score Trend Monitor [EdgeTerminal]The Z-Score Trend Monitor measures how far the short-term moving average deviates from the long-term moving average using the spread difference of the two — in standardized units. It’s designed to detect overextension, momentum exhaustion, and potential mean-reversion points by converting the spread between two moving averages into a normalized Z-score and tracking its change and direction over time.
The idea behind this is to catch the changes in the direction of a trend earlier than the usual and lagging moving average lines, allowing you to react faster.
The math behind the indicator itself is very simple. We take the simple moving average of the spread between a long term and short term moving average, and divide it by the difference between the spread and spread mean.
This results in a relatively accurate and early acting trend detector that can easily identify overbought and oversold levels in any timeframe. From our own testing, we recommend using this indicator as a trend confirmation tool.
How to Use It:
Keep an eye on the Z-Score or the blue line. When it goes over 2, it indicates an overbought or near top level, and when it goes below -2, it indicates an oversold or near bottom.
When Z-Score returns to zero or grey line, it suggests mean reversion is in progress.
You can also change the Z-Score criteria from 2 and -2 in the settings to any number you’d like for tighter or wider levels.
For scalping and fast trading setups, we recommend shorter SMAs, such as 5 and 20, and for longer trading setups such as swing trades, we recommend 20 and 100.
Settings:
Short SMA: Lookback period of short term simple moving average for the lower side of the SMA spread.
Short Term Weight: Additional weight or multiplier to suppress the short term SMA calculation. This is used to refine the SMA calculation for more granular and edge cases when needed, usually left at 1, meaning it will take the entire given value in the short SMA field.
Long SMA: Lookback period of long term simple moving average for the upper side of the SMA spread.
Long Term Weight: Additional weight or multiplier to suppress the long term SMA calculation. This is used to refine the long SMA calculation for more granular and edge cases when needed, usually left at 1, meaning it will take the entire given value in the long SMA field.
Z-Score Threshold: The threshold for upper (oversold) and lower (overbought) levels. This can also be set individually from the style page.
Z-Score Lookback Window: The lookback period to calculate spread mean and spread standard deviation
Trade Crafted - Banknifty Trend DeciderTrade Crafted - Banknifty Trend Decider
Description:
This indicator offers a quick and insightful snapshot of real-time market sentiment across major Indian banking stocks along with Reliance and Adani. It’s designed as a clean, table-based heatmap that visually tracks intraday percentage movements and trends of key financial instruments.
🔹 What it Shows:
Live % Change: Calculates the percentage difference between the current price and day’s open.
Visual Trend Arrows: See at a glance whether each stock is trending ↑ (positive) or ↓ (negative).
Banking Sector Average: Tracks the average movement of top Indian banks.
Reliance-Adani Grouping: Shows a separate combined average for Reliance and Adani Enterprises.
Total Market Sentiment: Displays overall average and gives a trend remark as “Positive Trend,” “Negative Trend,” or “Sideways” based on total average direction.
🧾 Included Stocks:
HDFC Bank
ICICI Bank
SBI
Axis Bank
Kotak Mahindra Bank (recently added)
Bank of Baroda
Reliance Industries
Adani Enterprises
📌 Use Case:
Perfect for intraday traders and investors who want a compact view of sectoral momentum. This table doesn’t generate buy/sell signals, but acts as a visual guide to current market strength and weakness.
📘 Note:
This tool is meant to support decision-making and should be used with other technical and risk management strategies.
Relative Strength Index with Percentile📈 Relative Strength Index with Percentile Rank (RSI + Percentile)
This advanced RSI indicator adds a powerful percentile ranking system to the classic Relative Strength Index, providing deeper insight into current RSI values relative to recent history.
🔍 Key Features:
Standard RSI Calculation: Identifies overbought/oversold levels using a customizable period.
RSI Percentile (0–100%): Calculates where the current RSI value stands within a user-defined lookback period.
Dynamic Background Coloring:
🟩 Green when RSI percentile is above 80% (strong relative strength)
🟥 Red when RSI percentile is below 20% (strong relative weakness)
Optional Divergence Detection: Spot classic bullish and bearish divergences between price and RSI.
Smoothing Options: Apply various moving averages (SMA, EMA, RMA, etc.) to the RSI, with optional Bollinger Bands.
Flexible Settings: Full control over lookback periods, smoothing type, and band sensitivity.
🧠 Why Use RSI Percentile?
Traditional RSI values can become less informative during trending markets. By ranking the RSI as a percentile, you gain contextual insight into whether the current strength is unusually high or low compared to recent history, rather than just a fixed 70/30 threshold.
Breakout Statistic - Break MasterBreakMaster by Merlin
Description:
BreakMaster 📈🔥 empowers you to track market momentum by analyzing breakout patterns! 🚀 This indicator detects when the price breaks above the previous candle’s high or below its low and calculates how often these breakouts result in bullish or bearish closes. 📊 Results are displayed in a sleek, easy-to-read table, helping you make informed trading decisions! 💡
How It Works (Super Simple! 😎):
1.Breakout Detection 🔎: Checks if the price breaks the high or low of the previous candle.
2.Close Analysis 🟢🔴: Determines if the breakout candle closes bullish (close > open) or bearish (close < open).
3.Statistics Calculation 📉: Counts the breakouts and calculates the percentage of bullish/bearish closes.
4.Visual Display 🖼️: Presents all data in a stylish table at the top-right of your chart, with customizable dark or light mode! 🌙☀️
Why BreakMaster? 🌟
Simple & Clear ✅: No complex formulas—just breakouts and closing stats.
Customizable 🎨: Choose dark or light mode to match your style.
Decision-Friendly 💸: See the reliability of breakouts with percentages to boost your strategy!
How to Use:
Add BreakMaster to your TradingView chart.
Select your preferred theme (Dark/Light).
Watch the table for real-time breakout stats! 📈
Happy trading with BreakMaster! 🚀💪
ETHBTC Z-ScoreETHBTC Z-Score Indicator
Key Features
Z-Score Calculation: Measures how far ETHBTC deviates from its mean over a user-defined period.
Linear Regression Line: Tracks the trend of the Z-score using least squares regression.
Standard Deviation Bands: Plots ±N standard deviations around the regression line to show expected Z-score range.
Dynamic Thresholds: Highlights overbought (e.g. Z > 1) and oversold (e.g. Z < -2) zones using color and background fill.
Visual & Table Display: Color-coded bars, horizontal level fills, and optional table showing regression formula and R².
Usage
Spot overbought/oversold extremes when Z-score crosses defined thresholds.
Use the regression line as a dynamic baseline and its bands as range boundaries.
Monitor R² to gauge how well the regression line fits the recent Z-score trend.
Example
Z > 1: ETHBTC may be overbought — potential caution or mean-reversion.
Z < -2: ETHBTC may be oversold — possible buying opportunity.
Z near regression line: Price is in line with recent trend.
Money Flow based probabilityMoney Flow based probability
This indicator provides a comprehensive correlation and momentum analysis between your main asset and up to three selected correlated assets. It combines correlation, trend, momentum, and overbought/oversold signals into a single, easy-to-read table directly on your chart.
Correlated Asset Selection :
You can select up to three correlated assets (e.g., indices, currencies, bonds) to compare with your main chart symbol. Each asset can be toggled on or off.
Correlation Calculation :
The indicator uses the native Pine Script ta.correlation function to measure the statistical relationship between the closing prices of your asset and each selected pair over a user-defined period.
Technical Analysis Integration :
For each asset (including the main one), the indicator calculates:
Trend direction using EMA (Exponential Moving Average) – optional
Momentum using MACD – optional
Overbought/oversold status using RSI – optional
Probability Scoring :
A weighted scoring system combines correlation, trend, MACD, RSI, and trend exhaustion signals to produce buy and sell probabilities for the main asset.
Visual Table Output :
A customizable table is displayed on the chart, showing:
Asset name
Correlation (as a percentage, -100% to +100%)
Trend (Bullish/Bearish)
MACD status (Bullish/Bearish)
RSI value and status
Buy/Sell probability (with fixed-width formatting for stability)
User Customization :
You can adjust:
Table size, color, and position
Correlation period
EMA, MACD, and RSI parameters
Which assets to display
This indicator is ideal for traders who want to quickly assess the influence of major correlated markets and technical signals on their trading instrument, all in a single glance.
---
Example: Correlation Calculation
corrCurrentAsset1 = ta.correlation(close, asset1Data, correlationPeriod)
Example: Table Output (Buy/Sell %)
buyStr = f_formatPercent(buyProbability) + "%"
sellStr = f_formatPercent(sellProbability) + "%"
cellStr = buyStr + " / " + sellStr
The Echo System🔊 The Echo System – Trend + Momentum Trading Strategy
Overview:
The Echo System is a trend-following and momentum-based trading tool designed to identify high-probability buy and sell signals through a combination of market trend analysis, price movement strength, and candlestick validation.
Key Features:
📈 Trend Detection:
Uses a 30 EMA vs. 200 EMA crossover to confirm bullish or bearish trends.
Visual trend strength meter powered by percentile ranking of EMA distance.
🔄 Momentum Check:
Detects significant price moves over the past 6 bars, enhanced by ATR-based scaling to filter weak signals.
🕯️ Candle Confirmation:
Validates recent price action using the previous and current candle body direction.
✅ Smart Conditions Table:
A live dashboard showing all trade condition checks (Trend, Recent Price Move, Candlestick confirmations) in real-time with visual feedback.
📊 Backtesting & Stats:
Auto-calculates average win, average loss, risk-reward ratio (RRR), and win rate across historical signals.
Clean performance dashboard with color-coded metrics for easy reading.
🔔 Alerts:
Set alerts for trade signals or significant price movements to stay updated without monitoring the chart 24/7.
Visuals:
Trend markers and price movement flags plotted directly on the chart.
Dual tables:
📈 Conditions table (top-right): breaks down trade criteria status.
📊 Performance table (bottom-right): shows real-time stats on win/loss and RRR.🔊 The Echo System – Trend + Momentum Trading Strategy
Overview:
The Echo System is a trend-following and momentum-based trading tool designed to identify high-probability buy and sell signals through a combination of market trend analysis, price movement strength, and candlestick validation.
Key Features:
📈 Trend Detection:
Uses a 30 EMA vs. 200 EMA crossover to confirm bullish or bearish trends.
Visual trend strength meter powered by percentile ranking of EMA distance.
🔄 Momentum Check:
Detects significant price moves over the past 6 bars, enhanced by ATR-based scaling to filter weak signals.
🕯️ Candle Confirmation:
Validates recent price action using the previous and current candle body direction.
✅ Smart Conditions Table:
A live dashboard showing all trade condition checks (Trend, Recent Price Move, Candlestick confirmations) in real-time with visual feedback.
📊 Backtesting & Stats:
Auto-calculates average win, average loss, risk-reward ratio (RRR), and win rate across historical signals.
Clean performance dashboard with color-coded metrics for easy reading.
🔔 Alerts:
Set alerts for trade signals or significant price movements to stay updated without monitoring the chart 24/7.
Visuals:
Trend markers and price movement flags plotted directly on the chart.
Dual tables:
📈 Conditions table (top-right): breaks down trade criteria status.
📊 Performance table (bottom-right): shows real-time stats on win/loss and RRR.
Machine Learning: ARIMA + SARIMADescription
The ARIMA (Autoregressive Integrated Moving Average) and SARIMA (Seasonal ARIMA) are advanced statistical models that use machine learning to forecast future price movements. It uses autoregression to find the relationship between observed data and its lagged observations. The data is differenced to make it more predictable. The MA component creates a dependency between observations and residual errors. The parameters are automatically adjusted to market conditions.
Differences
ARIMA - This excels at identifying trends in the form of directions
SARIMA - Incorporates seasonality. It's better at capturing patterns previously seen
How To Use
1. Model: Determine if you want to use ARIMA (better for direction) or SARIMA (better for overall prediction). You can click on the 'Show Historic Prediction' to see the direction of the previous candles. Green = forecast ending up, red = forecast ending down
2. Metrics: The RMSE% and MAPE are 10 day moving averages of the first 10 predictions made at candle close. They're error metrics that compare the observed data with the predicted data. It is better to use them when they're below 8%. Higher timeframes will be higher, as these models are partly mean-reverting and higher TFs tend to trend more. Better to compare RMSE% and MAPE with similar timeframes. They naturally lag as data is being collected
3. Parameter selection: The simpler, the better. Both are used for ARIMA(1,1,1) and SARIMA(1,1,1)(1,1,1)5. Increasing may cause overfitting
4. Training period: Keep at 50. Because of limitations in pine, higher values do not make for more powerful forecasts. They will only criminally lag. So best to keep between 20 and 80
BTC vs ALT Lag Detector [MEXC Overlay]This indicator monitors the price movement of Bitcoin (BTC) and compares it in real time to a customizable list of major altcoins on the MEXC exchange.
It helps you identify lagging altcoins — tokens that are underperforming or overperforming BTC’s price action over a selected timeframe. These temporary deviations can offer profitable entry or rotation opportunities, especially for scalpers, day traders, and arbitrage-style strategies.
Key Features:
- Real-time deviation detection between BTC and altcoins
- Customizable comparison timeframe: 1m, 6m, 12m, 30m, 1h, 4h, or 1d
- Deviation threshold alert: Highlights coins that lag BTC by more than 0.5%, 1%, 2%, or 3%
- Compact stats table embedded in the price chart
- Fully adjustable layout: Table position (Top/Bottom/Center + Left/Right), Font size (Tiny, Small, Medium)
- Built-in alert system when deviation exceeds your chosen threshold
How to Use It:
Set your desired timeframe for comparison (e.g., 1 hour).
Select a deviation threshold (e.g., 1.0%).
The table will show:
Each altcoin’s % change
BTC’s % change
The delta (deviation) vs BTC
Red highlights indicate alts whose deviation exceeded the threshold.
When at least one alt lags beyond your threshold, the indicator can trigger an alert — helping you capitalize on potential catch-up trades.
Please provide any feedback on it.
Best SMA FinderThis script, Best SMA Finder, is a tool designed to identify the most robust simple moving average (SMA) length for a given chart, based on historical backtest performance. It evaluates hundreds of SMA values (from 10 to 1000) and selects the one that provides the best balance between profitability, consistency, and trade frequency.
What it does:
The script performs individual backtests for each SMA length using either "Long Only" or "Buy & Sell" logic, as selected by the user. For each tested SMA, it computes:
- Total number of trades
- Profit Factor (total profits / total losses)
- Win Rate
- A composite Robustness Score, which integrates Profit Factor, number of trades (log-scaled), and win rate.
Only SMA configurations that meet the user-defined minimum trade count are considered valid. Among all valid candidates, the script selects the SMA length with the highest robustness score and plots it on the chart.
How to use it:
- Choose the strategy type: "Long Only" or "Buy & Sell"
- Set the minimum trade count to filter out statistically irrelevant results
- Enable or disable the summary stats table (default: enabled)
The selected optimal SMA is plotted on the chart in blue. The optional table in the top-right corner shows the corresponding SMA length, trade count, Profit Factor, Win Rate, and Robustness Score for transparency.
Key Features:
- Exhaustive SMA optimization across 991 values
- Customizable trade direction and minimum trade filters
- In-chart visualization of results via table and plotted optimal SMA
- Uses a custom robustness formula to rank SMA lengths
Use cases:
Ideal for traders who want to backtest and auto-select a historically effective SMA without manual trial-and-error. Useful for swing and trend-following strategies across different timeframes.
📌 Limitations:
- Not a full trading strategy with position sizing or stop-loss logic
- Only one entry per direction at a time is allowed
- Designed for exploration and optimization, not as a ready-to-trade system
This script is open-source and built entirely from original code and logic. It does not replicate any closed-source script or reuse significant external open-source components.
CANDLE SCRUTINY | GSK-VIZAG-AP-INDIAIndicator: CANDLE SCRUTINY | GSK-VIZAG-AP-INDIA
1. Overview
The CANDLE SCRUTINY indicator is a candle-by-candle analytical tool designed to dissect and visually represent the behavior of recent candles on a chart. It presents a concise table overlay that summarizes critical candlestick data including price movement, directional trend, volume dynamics, and strength of price sequences — all updated in real time.
2. Purpose / Trading Use Case
This tool is ideal for:
Scalpers and intraday traders needing quick real-time candle insights.
Trend analyzers who want to observe evolving price momentum.
Volume-based decision makers monitoring buyer-seller imbalance.
Traders who scrutinize candles for confirmations before entries or exits.
3. Key Features & Logic Breakdown
Candle Classification: Each candle is categorized as Bullish, Bearish, or Doji based on open-close comparison.
Move Calculation: Calculates and displays net candle move (Close - Open) for each bar.
Trend Count: Tracks the number of consecutive candles of the same type (bullish or bearish).
Sequential Move (Total SM): Aggregates move values when candles of the same type form a sequence.
Volume Breakdown: Approximates buy/sell volume ratio using candle type logic.
Delta Volume: Measures buy-sell imbalance to gauge intrabar strength.
Time Localization: Candle timestamps are shown in the user-selected timezone.
4. User Inputs / Settings
Number of Candles (numCandles): Choose how many recent candles to analyze (1–10).
Table Position (tablePos): Set to top_right by default.
Timezone Selector (tzOption): Choose from multiple global timezones (e.g., IST, UTC, NY, London) to view local candle times.
These settings let traders customize the scope and perspective of candle analysis to fit their trading region and strategy focus.
5. Visual & Plotting Elements
A floating data table appears on the chart (top-right by default), showing:
Time of candle (localized)
Type (Bullish/Bearish/Doji)
Move value with green/red background
Total SM (sequential movement) with trend-based color shading
Trend Count
Buy Volume, Sell Volume, Total Volume
Delta (volume imbalance) with color-coded strength indicator
Color coding makes it visually intuitive to quickly assess strength, direction, and sequence.
6. Effective Usage Tips
Use in 1-minute to 15-minute timeframes for scalping or momentum breakout confirmation.
Monitor Delta and Sequential Move (SM) to confirm strength behind price action.
Trend Count helps gauge sustained direction—useful for short-term trend continuation strategies.
Combine with support/resistance zones or volume profile for stronger confluence.
Great for detecting early signs of exhaustion or continuation.
7. What Makes It Unique
Combines price action + volume behavior + trend memory into one compact visual table.
Allows user-defined timezone adjustment, a rare feature in similar indicators.
Designed to give a story of the last N candles from a momentum and participation viewpoint.
Fully non-intrusive overlay—doesn't clutter chart space.
8. Alerts / Additional Features
Currently no alerts, but future versions may include:
Alert when trend count exceeds a threshold
Alert on strong delta volume shifts
Alert on back-to-back Dojis (sign of indecision)
9. Technical Concepts Used
Candlestick Logic: Bullish, Bearish, Doji classification
Volume Analysis: Approximate buy/sell split based on candle type
Color Coding: For intuitive interpretation of move, trend, and delta
Arrays & Looping Logic: Efficient tracking of trends and sequences
Timezone Handling: Uses hour(time, timezone) and minute(time, timezone) for local display
10. Disclaimer
This script is provided for educational and informational purposes only. It does not constitute financial advice. Always backtest thoroughly and use appropriate risk management when applying this or any indicator in live markets. The author is not responsible for any financial losses incurred.
Bitcoin Monthly Seasonality [Alpha Extract]The Bitcoin Monthly Seasonality indicator analyzes historical Bitcoin price performance across different months of the year, enabling traders to identify seasonal patterns and potential trading opportunities. This tool helps traders:
Visualize which months historically perform best and worst for Bitcoin.
Track average returns and win rates for each month of the year.
Identify seasonal patterns to enhance trading strategies.
Compare cumulative or individual monthly performance.
🔶 CALCULATION
The indicator processes historical Bitcoin price data to calculate monthly performance metrics
Monthly Return Calculation
Inputs:
Monthly open and close prices.
User-defined lookback period (1-15 years).
Return Types:
Percentage: (monthEndPrice / monthStartPrice - 1) × 100
Price: monthEndPrice - monthStartPrice
Statistical Measures
Monthly Averages: ◦ Average return for each month calculated from historical data.
Win Rate: ◦ Percentage of positive returns for each month.
Best/Worst Detection: ◦ Identifies months with highest and lowest average returns.
Cumulative Option
Standard View: Shows discrete monthly performance.
Cumulative View: Shows compounding effect of consecutive months.
Example Calculation (Pine Script):
monthReturn = returnType == "Percentage" ?
(monthEndPrice / monthStartPrice - 1) * 100 :
monthEndPrice - monthStartPrice
calcWinRate(arr) =>
winCount = 0
totalCount = array.size(arr)
if totalCount > 0
for i = 0 to totalCount - 1
if array.get(arr, i) > 0
winCount += 1
(winCount / totalCount) * 100
else
0.0
🔶 DETAILS
Visual Features
Monthly Performance Bars: ◦ Color-coded bars (teal for positive, red for negative returns). ◦ Special highlighting for best (yellow) and worst (fuchsia) months.
Optional Trend Line: ◦ Shows continuous performance across months.
Monthly Axis Labels: ◦ Clear month names for easy reference.
Statistics Table: ◦ Comprehensive view of monthly performance metrics. ◦ Color-coded rows based on performance.
Interpretation
Strong Positive Months: Historically bullish periods for Bitcoin.
Strong Negative Months: Historically bearish periods for Bitcoin.
Win Rate Analysis: Higher win rates indicate more consistently positive months.
Pattern Recognition: Identify recurring seasonal patterns across years.
Best/Worst Identification: Quickly spot the historically strongest and weakest months.
🔶 EXAMPLES
The indicator helps identify key seasonal patterns
Bullish Seasons: Visualize historically strong months where Bitcoin tends to perform well, allowing traders to align long positions with favorable seasonality.
Bearish Seasons: Identify historically weak months where Bitcoin tends to underperform, helping traders avoid unfavorable periods or consider short positions.
Seasonal Strategy Development: Create trading strategies that capitalize on recurring monthly patterns, such as entering positions in historically strong months and reducing exposure during weak months.
Year-to-Year Comparison: Assess how current year performance compares to historical seasonal patterns to identify anomalies or confirmation of trends.
🔶 SETTINGS
Customization Options
Lookback Period: Adjust the number of years (1-15) used for historical analysis.
Return Type: Choose between percentage returns or absolute price changes.
Cumulative Option: Toggle between discrete monthly performance or cumulative effect.
Visual Style Options: Bar Display: Enable/disable and customize colors for positive/negative bars, Line Display: Enable/disable and customize colors for trend line, Axes Display: Show/hide reference axes.
Visual Enhancement: Best/Worst Month Highlighting: Toggle special highlighting of extreme months, Custom highlight colors for best and worst performing months.
The Bitcoin Monthly Seasonality indicator provides traders with valuable insights into Bitcoin's historical performance patterns throughout the year, helping to identify potentially favorable and unfavorable trading periods based on seasonal tendencies.
DEMA HMA Z-score OscillatorThis custom oscillator combines the power of the Hull Moving Average (HMA) with the Z-Score to identify momentum shifts and potential trend reversals. The Z-Score measures how far the current HMA is from its historical mean, helping to spot overbought or oversold conditions.
Uptrend: Long signals are generated when the Z-Score crosses above the defined Long Threshold.
Downtrend: Short signals are triggered when the Z-Score drops below the Short Threshold.
Visuals: The Z-Score is plotted along with background color changes and fills to clearly indicate trend strength. Green fills highlight uptrends, while pink fills indicate downtrends.
Alerts: Alerts are available for both long and short conditions based on Z-Score crossovers.
Customizable Inputs:
HMA Length
Smoothing Length (for DEMA)
Z-Score Length
Long and Short Thresholds
This indicator is ideal for detecting momentum shifts, confirming trend strength, and helping to time entry/exit points in your trading strategy.
The Daily Profiler v2.0This indicator serves as a multi-faceted analysis tool for TradingView, geared towards day traders who need context based on daily cycles and key price levels, especially in markets like futures that follow the NY trading schedule (18:00 ET daily reset).
Core Functionality Breakdown:
Session & Opening Range Analysis:
It defines and visually demarcates four key trading sessions: Asia (ASN: 1800-0230), London (LDN: 0230-0730), NY1 (0730-1130), and NY2 (1130-1615), using the "America/New_York" timezone.
For each session, it identifies an "Opening Range" (OR) period (e.g., 1800-1930 for ASN).
Users can opt to display background boxes for the full sessions and/or the OR periods.
It plots horizontal lines marking the High and Low reached during each session and OR period.
Crucially, it calculates the midpoint of each Opening Range (the "O/U" or Over/Under line) and tracks whether subsequent price action "breaks" this level, updating line styles and status information accordingly.
Key Price Level Plotting:
Previous Day Context: Plots the High (PDH), Low (PDL), and Midpoint (PDM) of the previous trading day, providing immediate reference points.
Daily Anchor Points: Draws lines for the Globex Open (18:00 ET start), the previous day's Settlement price, and the Midnight Open (00:00 ET), offering insight into key daily cycle starting points.
P12 Session (18:00-06:00): Tracks this overnight period and, after 06:00 ET, projects extended lines for its High, Low, and Midpoint.
High/Low of Day (HOD/LOD) Features:
Actual Tracking: Identifies and marks the actual HOD and LOD achieved during the main trading day (18:00-16:15 window) with labels showing the price, time occurred, and percentage move from the open.
User Projections: Allows users to configure multiple sets of potential HOD/LOD target zones (categorized as Long/True, Long/False, Short/True, Short/False). These are defined by specific time windows and percentage ranges from the daily open, displayed as colored projection boxes.
Statistical Projections:
ADR/MDR: Calculates the Average Daily Range (ADR) or Median Daily Range (MDR) over a user-set lookback period. It then plots projected High/Low levels for the current day based on adding/subtracting half this range value from the daily open price.
ASN OR Standard Deviations: Uses the range of the Asian session's OR to calculate and plot standard deviation levels (+/- 1.0, 2.5, 5.0, 8.0). These lines appear after the ASN OR concludes and change appearance if price crosses them.
09:30 NY Open Focus:
Provides specific analysis for the 09:30 ET 1-minute candle, often significant for US equity index futures.
Draws a box around this candle's range, optionally recoloring the bar, and draws internal percentage levels (25/50/75%) and minor offset lines for the subsequent 15 minutes.
Informational Tables:
Model Table: Summarizes the OR breakout dynamics for each session, indicating the initial break direction (Long/Short), whether the session maintained that direction without breaking the opposite side (True/False), and whether the OR midpoint was later broken (Broken/None).
Distribution Table: Presents range and percentage statistics for each session (and the 0930-1000 window). It shows the current day's values alongside historical Average or Median values, which can be filtered by day of the week or shown as a weekly total.
Customization & Management:
Offers extensive inputs to toggle nearly every visual element and feature.
Allows detailed customization of colors, line styles/widths, label content/size, and table appearance/position.
Incorporates logic to clean up drawings from the previous day at the 18:00 ET reset, ensuring chart clarity.
Advanced Trend Insight Panel PRO v3.0Advanced Trend Insight Panel PRO v3.0
Description
The Advanced Trend Insight Panel PRO v3.0 combines multiple proven technical tools into one on-chart dashboard, giving you a 360° view of market dynamics. By fusing EMAs, oscillators, volatility measures, volume analysis, multi-timeframe context, Fibonacci retracements and pivot support/resistance levels, this panel helps you identify high-probability trade setups, confirm momentum, manage risk, and adapt your strategy to any market regime.
1) Components & Rationale
EMAs (Fast 21 / Slow 55 / Super Trend 200): Spot short-, mid- and long-term trend direction and strength via crossovers and distance from price.
RSI (14) & MACD (12/26/9): Filter overbought/oversold extremes and confirm momentum shifts for more reliable entries.
ATR (14) & Bollinger Bands (20, 2σ): Measure volatility’s squeeze vs. expansion phases to time breakouts and gauge risk.
Volume & MFI & ROC: Validate price moves through volume spikes, money flow extremes, and rate-of-change momentum readings.
High-Timeframe Signals: Optionally overlay EMA, RSI, and MACD from a higher timeframe (e.g. 240 min, Daily or Weekly) to align multi-timeframe trends.
Fibonacci Retracements & Pivot S/R: Auto-draw critical support/resistance zones (23.6%, 38.2%, 50%, 61.8%, 78.6% and R1/R2/S1/S2 pivots) for clear entry/exit targets.
Strategy Mode Plans: Scalp, swing, trend-follow, algorithmic or long-term trade ideas generated dynamically based on current conditions.
2) Default Settings
General: Dark theme, top-right panel, width 2, transparency 15%, small text.
EMA: 21/55/200
Oscillators: RSI 14 (70/30), MACD 12/26/9
Volatility: ATR 14, Bollinger 20/2
Volume Filter: 20-bar SMA threshold 1.5×
High-TF: 240 min
Fib Period: 50
Pivot Lookback: 20 bars
Alerts: EMA cross, RSI extremes, volume spikes, Fibonacci touches—all toggleable.
3) How to Use
Apply the indicator “⚡ RolinLong – Trend Panel PRO ⚡” on your chart.
Review each row of the panel:
Trend Status & Strength (EMA crossover + distance %)
Volatility Level (ATR % / Bollinger width)
Momentum Text (ROC/RSI/Stochastic signals)
Volume Condition & Flow
HTF Trend & Strength
Warnings (RSI/Bollinger squeeze or expansion alerts)
Strategy Plan (Scalp/Swing/Trend/Algo/Long-Term suggestions)
Alternative Scenario & Risk Guidance
Tune your own parameters to match your timeframe and instrument: adjust EMAs, oscillator thresholds, volatility limits, and strategy mode.
Follow color cues: green for bullish/confirmation, red for bearish/warnings, gray for neutral.
Enable Alerts in settings to get notified of key events without staring at the screen.
4) Warnings & Disclaimer
This panel is for educational and analytical purposes only. It does not execute trades automatically. Always combine its signals with your own analysis and solid risk management (e.g. limit max 2% risk per trade, account for commission/slippage). Past indicator behavior does not guarantee future market performance—use responsibly.
Ticker DataThis script mostly for Pine coders but may be useful for regular users too.
I often find myself needing quick access to certain information about a ticker — like its full ticker name, mintick, last bar index and so on. Usually, I write a few lines of code just to display this info and check it.
Today I got tired of doing that manually, so I created a small script that shows the most essential data in one place. I also added a few extra fields that might be useful or interesting to regular users.
Description for regular users (from Pine Script Reference Manual)
tickerid - full ticker name
description - description for the current symbol
industry - the industry of the symbol. Example: "Internet Software/Services", "Packaged software", "Integrated Oil", "Motor Vehicles", etc.
country - the two-letter code of the country where the symbol is traded
sector - the sector of the symbol. Example: "Electronic Technology", "Technology services", "Energy Minerals", "Consumer Durables", etc.
session - session type (regular or extended)
timezone - timezone of the exchange of the chart
type - the type of market the symbol belongs to. Example: "stock", "fund", "index", "forex", "futures", "spread", "economic", "fundamental", "crypto".
volumetype - volume type of the current symbol.
mincontract - the smallest amount of the current symbol that can be traded
mintick - min tick value for the current symbol (the smallest increment between a symbol's price movements)
pointvalue - point value for the current symbol
pricescale - a whole number used to calculate mintick (usually (when minmove is 1), it shows the resolution — how many decimal places the price has. For example, a pricescale 100 means the price will have two decimal places - 1 / 100 = 0.01)
bar index - last bar index (if add 1 (because indexes starts from 0) it will shows how many bars available to you on the chart)
If you need some more information at table feel free to leave a comment.
Central Bank Assets YoY % with StdDev BandsCentral Bank Assets YoY % with StdDev Bands - Indicator Documentation
Overview
This indicator tracks the year-over-year (YoY) percentage change in combined central bank assets using a custom formula. It displays the annual growth rate along with statistical bands showing when the growth is significantly above or below historical norms.
Formula Components
The indicator is based on a custom symbol combining multiple central bank balance sheets:
Federal Reserve balance sheet (FRED)
Bank of Japan assets converted to USD (FX_IDC*FRED)
European Central Bank assets converted to USD (FX_IDC*FRED)
Subtracting Fed reverse repo operations (FRED)
Subtracting Treasury General Account (FRED)
Calculations
Year-over-Year Percentage Change: Calculates the percentage change between the current value and the value from exactly one year ago (252 trading days).
Formula: ((current - year_ago) / year_ago) * 100
Statistical Measures:
Mean (Average): The 252-day simple moving average of the YoY percentage changes
Standard Deviation: The 252-day standard deviation of YoY percentage changes
Display Components
The indicator displays:
Main Line: YoY percentage change (green when positive, red when negative)
Zero Line: Reference line at 0% (gray dashed)
Mean Line: Average YoY change over the past 252 days (blue)
Standard Deviation Bands: Shows +/- 1 standard deviation from the mean
Upper band (+1 StdDev): Green, line with breaks style
Lower band (-1 StdDev): Red, line with breaks style
Interpretation
Values above zero indicate YoY growth in central bank assets
Values below zero indicate YoY contraction
Values above the +1 StdDev line indicate unusually strong growth
Values below the -1 StdDev line indicate unusually severe contraction
Crossing above/below the mean line can signal shifts in central bank policy trends
Usage
This indicator is useful for:
Monitoring global central bank liquidity trends
Identifying unusual periods of balance sheet expansion/contraction
Analyzing correlations between central bank activity and market performance
Anticipating potential market impacts from changes in central bank policy
The 252-day lookback period (approximately one trading year) provides a balance between statistical stability and responsiveness to changing trends in central bank behavior.
MTS📊 MTS (Murrey Math System) Trading Strategy for TradingView 📊
Introduction:
This script implements the Murrey Math System (MTS), a market analysis tool based on a set of pivot points and price ranges, designed to help traders identify key levels of support and resistance.
MTS calculates key price levels based on historical price swings and helps identify price targets, stop-loss levels, and potential breakout zones.
The strategy also includes an adaptive bias panel, showing buy or sell suggestions based on current price action relative to Murrey Math levels.
Key Components:
1. Pivot Calculation and Conditions:
Pivot Lookback & Spikeyness Index:
The pivots: lookback/forward input defines how far back (and forward) the script looks to identify potential pivot points (high and low). A smaller value focuses on more recent swings, while larger values consider a broader range.
The Spikeyness Index (atrMult) allows you to adjust sensitivity to market spikes, utilizing the Average True Range (ATR) to detect sharp price movements that could indicate potential turning points.
Pivot Conditions:
isPivHigh and isPivLow detect local high and low pivot points, respectively.
Spiky Conditions: The spikyH and spikyL conditions filter out pivots that do not meet the spikiness criteria, which is based on ATR and moving averages.
2. Swing High and Swing Low Identification:
The script identifies and stores previous swing highs (HR_prev) and lows (LR_prev), updating them based on the current market structure.
3. Proprietary Calculation:
The propCalc input enables a proprietary calculation method for determining higher or lower levels beyond the typical Murrey Math levels, offering a more adaptive approach to price targets and support/resistance levels.
4. Murrey Math Lines (MML):
MML Calculation:
The code calculates a set of Murrey Math Lines (EightEight, FourEight, ZeroEight), which are key price levels based on the range of the price over a given time period. These levels represent major support and resistance zones, with the EightEight line indicating extremely overbought conditions and ZeroEight signaling deeply oversold conditions.
Level and Extension Lines:
The script also plots additional levels and extensions based on the range between HR and LR, representing key support/resistance levels. These levels are dynamically drawn on the chart, offering clear insights into where price might reverse or break out.
Strategy Logic:
- Breakout and Breakdown:
The Bias Box panel dynamically displays a trade bias, either suggesting to "Buy on Dip" or "Sell on Rise," depending on whether the current price is above or below the midpoint of the Murrey Math range (BEP). This bias is calculated using the market's relationship to the Murrey Math Levels.
- Buy on Dip: When the price is below the midpoint (BEP), suggesting the market is in a buying zone.
- Sell on Rise: When the price is above the midpoint, suggesting the market is in a selling zone.
- Stop-Loss and Target Hints:
The stop-loss (SL) and target levels are dynamically set based on the position relative to HR and LR:
For Buy on Dip: SL is set at LR Low, Target is set at HR High.
For sell on Rise: SL is set at HR Low, Target is set at LR High.
2. Historical and Current Levels:
The script compares the most recent Murrey Math levels with historical levels. This helps identify any shifts or changes in the market structure, enhancing the trader's ability to adapt to new trends.
- Current Levels:
The current levels are drawn from the most recent HR and LR values, with corresponding extensions showing possible breakout or breakdown zones.
- Historical Levels:
Historical levels are drawn in a "ghost" style, helping traders visualize past market conditions and potential support/resistance zones that could still influence price movement.
- Trade Examples:
Example 1: Buy on Dip
a. Scenario:
Price is below the midpoint (BEP), and the bias suggests a buy on dip.
The trader looks for a rebound from the LR Low level, with a target at the HR High.
b. Entry:
Buy when the price reaches the LR Low level.
c. Exit:
Take profit when the price hits the HR High.
d. Stop-Loss:
Place stop-loss at the LR Low.
Example 2: Sell on Rise
a. Scenario:
Price is above the midpoint (BEP), and the bias suggests a sell on rise.
The trader looks for a pullback to the HR Low, with a target at the LR High.
b. Entry:
Sell when the price reaches the HR High level.
c. Exit:
Take profit when the price hits the LR Low.
d. Stop-Loss:
Place stop-loss at the HR Low.
Key Features:
Bias Panel: A table in the top-right corner showing the current market bias (Buy on Dip, Sell on Rise, or Neutral).
Displays real-time trade direction and risk information, such as stop-loss and target hints.
Dynamic Level Adjustment: As the price moves, the script dynamically updates the key levels (HR, LR, and Murrey Math lines), keeping traders aware of the most recent market structure.
Visualization Tools:
The chart is populated with a series of lines and labels that indicate the critical price levels for trading.
Support/Resistance Lines: Each key level is marked with different colors for quick recognition.
Extensions: Additional lines are plotted based on price projections, indicating where the market could potentially move.
Note:
Please note that this is an educational purpose idea, any action/trade taken will be user's own responsibility.
Enjoy!
Regards.
Bitcoin Power Law Bayesian Fit with Residual HistogramTitle: Bayesian Bitcoin Power Law Indicator with Residuals Histogram
Description:
This Pine Script implements a Bitcoin (BTC) price indicator based on a power-law relationship between BTC price and time, modeled using Bayesian regression.
Bayesian regression is one of the most robust regression methods.
The indicator provides a robust framework for understanding BTC price trends, highlighting key statistical levels, based on deviation from the power law trend and visualizing the bimodal nature of BTC price behavior through a residual distribution histogram (distribution of the deviation from the Bayesian power law trend).
Features:
Power Law Model with Confidence Levels:
Models BTC price as a power-law function of time using Bayesian regression, displaying the median trendline.
Includes multiple confidence intervals to reflect statistical uncertainty.
Plots a support power-law line, set at 2 standard deviations below the median trend, serving as a critical lower bound for price expectations.
Bimodal Residual Histogram:
Displays a histogram in a lower panel, illustrating the distribution of model residuals (difference between actual BTC price and the power-law model) over a default 100-day window (user-configurable). This is one of the most innovative components of this indicator because it highlights the current shape of the distribution of recent deviations.
Highlights the bimodal nature of BTC price behavior, with two distinct regimes:
Core Power Law: Represents periods (approximately 2 years) when BTC price closely follows the power-law trend, typically when below the median power-law line.
Turbulent Flow BTC: Captures periods when BTC price is above the median power-law line, exhibiting more chaotic, bull-run behavior.
The histogram provides a range of possible prices based on the observed residual distribution, aiding in probabilistic price forecasting.
These analogies with fluid dynamics are part of the power law framework based on parallels in financial physics.
Purpose:
This indicator is designed for traders and analysts seeking to understand BTC price dynamics through a statistically grounded power-law model. The confidence levels and support line offer clear benchmarks for trend and support analysis, while the bimodal histogram provides insight into whether BTC is in a stable "Core Power Law" phase or a volatile "Turbulent Flow" phase, enabling better decision-making based on market regime.
Usage Notes:
Use the histogram to determine whether BTC is in the Core Power Law (below the power-law trend) or Turbulent Flow (above the trend) regime to contextualize price behavior.
Adjust the residual window (default 100 days) to analyze different timeframes for the distribution.
The support power-law line (2 standard deviations below) serves as a critical level for identifying potential price floors.