FunctionSurvivalEstimationLibrary "FunctionSurvivalEstimation"
The Survival Estimation function, also known as Kaplan-Meier estimation or product-limit method, is a statistical technique used to estimate the survival probability of an individual over time. It's commonly used in medical research and epidemiology to analyze the survival rates of patients with different treatments, diseases, or risk factors.
What does it do?
The Survival Estimation function takes into account censored observations (i.e., individuals who are still alive at a certain point) and calculates the probability that an individual will survive beyond a specific time period. It's particularly useful when dealing with right-censoring, where some subjects are lost to follow-up or have not experienced the event of interest by the end of the study.
Interpretation
The Survival Estimation function provides a plot of the estimated survival probability over time, which can be used to:
1. Compare survival rates between different groups (e.g., treatment arms)
2. Identify patterns in the data that may indicate differences in mortality or disease progression
3. Make predictions about future outcomes based on historical data
4. In a trading context it may be used to ascertain the survival ratios of trading under specific conditions.
Reference:
www.global-developments.org
"Beyond GDP" ~ www.aeaweb.org
en.wikipedia.org
www.kdnuggets.com
survival_probability(alive_at_age, initial_alive)
Kaplan-Meier Survival Estimator.
Parameters:
alive_at_age (int) : The number of subjects still alive at a age.
initial_alive (int) : The Total number of initial subjects.
Returns: The probability that a subject lives longer than a certain age.
utility(c, l)
Captures the utility value from consumption and leisure.
Parameters:
c (float) : Consumption.
l (float) : Leisure.
Returns: Utility value from consumption and leisure.
welfare_utility(age, b, u, s)
Calculate the welfare utility value based age, basic needs and social interaction.
Parameters:
age (int) : Age of the subject.
b (float) : Value representing basic needs (food, shelter..).
u (float) : Value representing overall well-being and happiness.
s (float) : Value representing social interaction and connection with others.
Returns: Welfare utility value.
expected_lifetime_welfare(beta, consumption, leisure, alive_data, expectation)
Calculates the expected lifetime welfare of an individual based on their consumption, leisure, and survival probability over time.
Parameters:
beta (float) : Discount factor.
consumption (array) : List of consumption values at each step of the subjects life.
leisure (array) : List of leisure values at each step of the subjects life.
alive_data (array) : List of subjects alive at each age, the first element is the total or initial number of subjects.
expectation (float) : Optional, `defaut=1.0`. Expectation or weight given to this calculation.
Returns: Expected lifetime welfare value.
Penunjuk dan strategi
ADX with Shaded ZoneThe ADX with Shaded Zone indicator is a momentum-based tool that visualizes trend strength using the Average Directional Index (ADX) along with the +DI and -DI lines. This indicator enhances the traditional ADX setup by adding a shaded zone between ADX levels 20 and 25, helping traders easily identify the transition area between non-trending and trending market conditions.
It plots:
+DI (Green): Positive Directional Indicator
−DI (Red): Negative Directional Indicator
ADX (Blue): Measures the strength of the trend
Shaded Zone: Highlights the indecisive range where ADX is below 25 (gray background between levels 20 and 25)
⚙️ How to Use:
✅ Trend Identification:
ADX < 20: Weak or no trend. Avoid trend-following strategies.
ADX 20–25 (Shaded Zone): Transition zone. Potential trend forming — stay cautious.
ADX > 25: Stronger trend. Favor trend-following strategies.
✅ Direction Confirmation:
If +DI > -DI and ADX > 25 → Uptrend confirmation.
If -DI > +DI and ADX > 25 → Downtrend confirmation.
Crossovers between +DI and -DI can be used as early signals.
✅ Shaded Zone Use:
The gray shaded area helps visually filter out low-trend strength conditions.
Useful for trend traders to wait before entering until ADX breaks above 25.
TuxTune - Dynamic Vertical LineVisual aid. The vertical line moves dynamically with the last candle of the selected time frame.
The middle of the line moves with the latest price.
The line range (height) can be set to any value to aid in quickly gauging the size of the candles without having to keep looking at the numbers on the vertical axis to determine how big the candles are.
Line width, color, and distance from the last candle can also be set.
The label can be turned off/on.
RSI Oversold ScannerPine Script Description for TradingView Publication
Title: RSI Oversold Scanner (1m, 5m, 15m)
Description:
The RSI Oversold Scanner is a powerful tool designed to identify stocks that are simultaneously oversold on the 1-minute, 5-minute, and 15-minute timeframes, based on the Relative Strength Index (RSI). This script is ideal for traders seeking short-term reversal or momentum opportunities across multiple intraday timeframes.
Key Features:
Multi-Timeframe RSI Analysis: Calculates RSI (default length: 14) on the 1m, 5m, and 15m timeframes and checks if all are below the oversold threshold (default: 30).
Visual Output: Displays a table in the top-right corner showing RSI values and oversold status ("Yes" or "No") for each timeframe, making it easy to verify conditions.
Scan Result: Plots a value of 1 when all three timeframes are oversold, or 0 otherwise, enabling quick identification of matching stocks.
Alert Support: Includes an alert condition that triggers when a stock is oversold on all timeframes, with a customizable message for real-time notifications.
User-Friendly: Built with Pine Script v6 for compatibility and reliability, with clear visual feedback for traders of all levels.
How It Works:
The script uses ta.rsi to compute RSI on the current chart’s timeframe (1m) and request.security to fetch RSI data for the 5m and 15m timeframes.
It checks if RSI is below the oversold level (default: 30) on all three timeframes.
A table displays the RSI values and oversold status for easy debugging.
The Scan Result plot (1 or 0) indicates whether the stock meets the oversold criteria, which can be used for manual scanning or alerts.
Usage Instructions:
Add the script to your chart via Pine Editor.
Use a watchlist to switch between stocks and check the table or Scan Result for oversold conditions.
Set alerts by selecting the script’s Scan Result condition (value = 1) to get notified when a stock is oversold on all timeframes.
Customize the RSI length or oversold level in the script’s code if needed (e.g., change rsiLength or oversoldLevel).
Notes:
Best used on intraday charts (e.g., 1m or higher) with a watchlist for manual scanning, as TradingView’s Stock Screener does not directly support custom Pine Scripts.
Real-time alerts and intraday data may require a TradingView paid plan.
The script uses only two request.security calls, staying well within Pine Script’s limits.
Ideal For:
Day traders and swing traders looking for oversold stocks across multiple intraday timeframes.
Users who want to combine technical analysis with visual and alert-based confirmation.
Consolidation Zones + OI Change %The script finds consolidation zones (flats) on the chart and analyzes the behavior of the Open Interest during these zones to understand:
whether a position is being built up (OI growth - green),
or whether players are unloading/exiting (OI fall - red),
and gives visual and text signals when the range is broken.
Скрипт находит зоны консолидации (флеты) на графике и анализирует поведение открытого интереса (Open Interest) во время этих зон, чтобы понять:
идёт ли набор позиции (рост OI — зелёный),
или разгрузка / выход игроков (падение OI — красный),
и даёт визуальные и текстовые сигналы при пробое диапазона.
Trend Breakout [Uncle Sam Trading]Trend Breakout Indicator
Overview
The Trend Breakout Indicator is a powerful, non-repainting tool designed to help traders identify high-probability breakout and trend reversal setups on any market and timeframe. By leveraging pivot points, this indicator draws dynamic support and resistance channels, highlights counter-trend breakouts, and provides visual cues for market direction. It’s ideal for traders looking to simplify their analysis while targeting key price levels for entries and exits.
Key Features
Pivot-Based Channels: Draws a red upper channel (resistance) and a green lower channel (support) by connecting recent pivot highs and lows.
Counter-Trend Breakout Signals:
Blue “CT Breakup” signal (▲) when the price breaks above the upper channel during a downtrend, indicating a potential reversal or pullback.
Orange “CT Breakdown” signal (▼) when the price breaks below the lower channel during an uptrend, signaling a potential downmove.
Trend Visualization: Background color shifts to green for uptrends and red for downtrends, making it easy to gauge market direction.
Customizable Settings: Adjust pivot detection sensitivity with “Pivot Left Bars” (default: 5) and “Pivot Right Bars” (default: 1), and control channel extension with “Channel Extension Bars” (default: 50).
Optional Trend Signals: Enable “Show Trend Change Signals” to display trend shifts with green (uptrend) or red (downtrend) arrows.
Alert Conditions: Set alerts for counter-trend breakouts and trend changes directly on TradingView.
Example Performance (BTCUSDT, 1-Hour Chart)
On the BTCUSDT 1-hour chart:
A “CT Breakdown” signal appeared on April 6 at 8:00 AM at $82,700, followed by a drop to $74,400 within hours—a 10% move.
A “CT Breakup” signal occurred on April 9 at 1:00 AM at $76,600, leading to a rally to $86,600 in a few hours—a 9% gain.
These examples highlight the indicator’s ability to spot significant price movements, though results depend on market conditions, your trading style, and risk management.
Settings
Pivot Left Bars (default: 5): Number of bars to the left for pivot detection.
Pivot Right Bars (default: 1): Number of bars to the right for pivot confirmation (ensures non-repainting signals).
Channel Extension Bars (default: 50): How far the channels extend to the right.
Show Pivot Points (default: true): Displays small triangles at pivot highs (maroon) and lows (navy).
Show Counter-Trend Breakout Signals (default: true): Shows CT Breakup and CT Breakdown signals.
Show Trend Change Signals (default: false): Displays trend shift arrows when enabled.
How to Use
Add the indicator to your chart via TradingView’s indicator library.
Adjust the settings to match your trading style and timeframe.
Watch for “CT Breakup” and “CT Breakdown” signals to identify potential trade setups.
Use the background color (green/red) to confirm the current trend.
Set alerts for breakouts or trend changes to stay updated on key signals.
Always combine with proper risk management and your own analysis—past performance is not a guarantee of future results.
Notes
The indicator is non-repainting, meaning signals are confirmed and won’t disappear after they form.
Works on any market (crypto, forex, stocks) and timeframe, such as the BTCUSDT 1-hour chart shown.
Performance varies based on market volatility and your trading strategy.
This is a free tool created to support the TradingView community—feedback is welcome in the comments!
Disclaimer
Trading involves risk, and this indicator is not a guaranteed predictor of future price movements. Always conduct your own analysis and manage risk appropriately. The examples provided (e.g., BTCUSDT signals) are for educational purposes only and reflect past performance, which may not repeat.
Statistical Trailing Stop [LuxAlgo]The Statistical Trailing Stop tool offers traders a way to lock in profits in trending markets with four statistical levels based on the log-normal distribution of volatility.
The indicator also features a dashboard with statistics of all detected signals.
🔶 USAGE
The tool works out of the box, traders can adjust the data used with two parameters: data & distribution length.
By default, the tool takes volatility measures of groups of 10 candles, and statistical measures of the last 100 of these groups then traders can adjust the base level to use as trailing, the larger the level, the more resistant the tool will be to moves against the trend.
🔹 Base Levels
Traders can choose up to 4 different levels of trailing, all based on the statistical distribution of volatility.
As we can see in the chart above, each higher level is more resistant to market movements, so level 0 is the most reactive and level 3 the least.
It is up to the trader to determine the best level for each underlying, time frame and market conditions.
🔹 Dashboard
The tool provides a dashboard with the statistics of all trades, making it very easy to assess the performance of the parameters used for any given market.
As we can see on the chart, all Daily BTC signals with default parameters but different base levels, level 2 is the best performing of all four, giving a positive expectation of $2435 per trade, taking into account all long and short trades.
Of note are the long trades with a win rate of 76.47% and a risk-to-reward of 3.34, giving a positive expectation of $4839 per trade, with winners having an average duration of 210 days and losers 32 days.
This, compared to short trades with negative expectation, speaks to the uptrend bias of this particular market.
🔶 SETTINGS
Data Length: Select how many bars to use per data point
Distribution Length: Select how many data points the distribution will have
Base Level: Choose between 4 different trailing levels
🔹 Dashboard
Show Statistics: Enable/disable dashboard
Position: Select dashboard position
Size: Select dashboard size
Collatz Conjecture - DolphinTradeBot1️⃣ Overview
Every positive number follows its own unique path to reach 1 according to the Collatz rule.
Some numbers reach the end quickly and directly.
Others rise significantly before crashing down sharply.
Some get stuck within a certain range for a while before finally reaching 1.
Each number follows a different pattern — the number of steps it takes, how high it climbs, or which values it passes through cannot be predicted in advance.
This is a structure that appears chaotic but ultimately leads to order:
Every number reaches 1, but the way it gets there is entirely uncertain.
2️⃣ How Is It Work?
The rule is simple:
▪️ If the number is even → divide it by two.
▪️ If it’s odd → multiply it by three and add one.
Repeat this process at each step.
Example :
Let’s say the starting number is 7:
7 → 22 → 11 → 34 → 17 → 52 → 26 → 13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1
It reaches 1 in 17 steps.
And from there, it always enters the same cycle:
4 → 2 → 1 → 4 → 2 → 1...
3️⃣ Why Is It Worth Learning?
🎯 This indicator isn’t just mathematical fun—it’s a thought experiment for those who dare to question market behavior.
▪️ It’s fun.
Watching numbers behave in unpredictable ways from a simple rule set is surprisingly enjoyable.
▪️ It shows how hard it is to teach a computer what randomness really is .
The Collatz process can be used to simulate chaotic behavior and may even inspire creative ways to introduce complexity into your code.
▪️ It makes you think — especially in financial markets.
The patternless, yet rule-based structure of Collatz can help train your mind to recognize that not all unpredictability is random. It’s a great mental model for navigating complex systems like price action.
▪️ Just like price movements in financial markets, this ancient problem remains unsolved.
Despite its simplicity, the Collatz conjecture has resisted proof for decades — a reminder that even the most basic-looking systems can hide deep complexity.
4️⃣ How To Use?
Super easy — in the indicator’s settings, there’s just one input field.
Enter any positive number, and you’ll see the pattern it follows on its way to 1.
You can also observe how many steps it takes and which values it visits in the info box at the top center of the chart.
5️⃣ Some Examples
You Can Observe the Chaos in the Following Examples⤵️
For Input Number → 12
For Input Number → 13
For Input Number → 14
For Input Number → 32768
For Input Number → 47
VWAP Separation w/ StDev (LEX)---
## VWAP Separation with Standard Deviation Bands
**Overview**
This indicator measures and visualizes the raw distance (separation) between a chosen price source (like `hlc3` or `close`) and its corresponding Volume Weighted Average Price (VWAP) for a selected anchor period. It helps traders gauge how far the current price has deviated from its volume-weighted average.
To provide context on the magnitude of this separation, the indicator also calculates and plots dynamic bands representing +/- 1 standard deviation of the separation value itself, calculated over a user-defined lookback period.
**How it Works**
1. **VWAP Calculation:** The indicator first calculates the VWAP based on the user-selected `Anchor Period` (e.g., Session, Week, Month) and `Source` price. The VWAP calculation resets at the beginning of each new anchor period.
2. **Separation Calculation:** It then subtracts the calculated VWAP from the source price for each bar (`Separation = Source - VWAP`).
3. **Plotting Separation:** This raw separation value is plotted as a line in a separate indicator pane.
* Positive values indicate the source price is above the VWAP.
* Negative values indicate the source price is below the VWAP.
4. **Zero Line & Crossings:** A horizontal line at zero is plotted for easy reference. Small circles are plotted on the zero line whenever the separation value crosses it (using `ta.cross`), highlighting moments when the price crosses its VWAP.
5. **Standard Deviation Bands:**
* The indicator calculates the rolling Simple Moving Average (SMA) of the `Separation` value over a specified `StDev Length` using `ta.sma`.
* It then calculates the rolling standard deviation of the `Separation` value over the same length using `ta.stdev`.
* Finally, it plots two dynamic lines: `SMA + 1 StDev` and `SMA - 1 StDev`. These bands represent the typical range of the separation's volatility based on the lookback period.
**How to Use / Interpretation**
* **Magnitude of Separation:** The primary line directly shows how far, in price terms, the market is currently trading away from its VWAP for the chosen anchor period. Large absolute values suggest a significant deviation.
* **Zero Line:** Crossing the zero line indicates the price is moving from one side of the VWAP to the other. The indicator staying consistently above/below zero shows price trending relative to its VWAP.
* **Standard Deviation Bands:** These bands help contextualize the separation.
* When the separation line touches or exceeds the upper band, it suggests the price is unusually far *above* the VWAP compared to its recent behavior.
* When the separation line touches or exceeds the lower band, it suggests the price is unusually far *below* the VWAP compared to its recent behavior.
* These "unusual" deviations *might* indicate over-extended conditions potentially leading to mean reversion back towards the VWAP, *or* they could signal the start of a strong move away from the VWAP. Always use in conjunction with other analysis methods.
* The width of the bands indicates the recent volatility *of the separation value itself*. Wider bands mean the separation has been more volatile; narrower bands mean it's been more stable.
**Key Features**
* Flexible VWAP calculation based on various anchor periods (Session, Week, Month, Earnings, etc.).
* Plots the raw price separation from VWAP.
* Clear zero line reference.
* Visual markers for zero-line crossings.
* Dynamic +/- 1 Standard Deviation bands based on the separation's volatility.
* User-configurable inputs for anchor period, price source, and standard deviation length.
**Settings**
* **Anchor Period:** Determines the calculation period for VWAP (Session, Week, Month, Quarter, Year, Decade, Century, Earnings, Dividends, Splits). Default: `Session`.
* **Source:** The price data used for calculating VWAP and separation (e.g., hlc3, close, open). Default: `hlc3`.
* **StDev Length:** The lookback period (number of bars) used to calculate the moving average and standard deviation of the separation value. Default: `20`.
**Disclaimer**
This indicator is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to trade. Trading financial markets involves significant risk. Always perform your own due diligence and test any indicator thoroughly before using it in live trading. Past performance is not indicative of future results.
---
HG StdDevThe HG StdDev indicator provides a dynamic view of market volatility by calculating the standard deviation of a selected price source over a customizable period. Additionally, it plots a threshold line representing the highest standard deviation over a secondary lookback window.
Red Line: Current standard deviation (volatility) of the price.
Gray Line: Highest standard deviation value within the lookback range, serving as a reference for recent peak volatility.
Use this tool to identify periods of increasing or extreme volatility, potential breakout zones, or to filter signals based on volatility thresholds.
Pivot Levels with EMA Trend📌 Trend Change Levels with EMA Trend
✨ Description:
This TradingView script identifies clean trend change levels based on 1-hour structure shifts and filters them to keep only those not invalidated. It follows the "Jake Ricci" method, each level is printed at the beginning of the candle that changes the trend, on a 1 hour chart. For precision, make sure to exclude after/pre market and only use the levels on regular hours charts.
It includes dynamic EMAs (9, 50, 200), intraday VWAP, the daily open level printed, and a visual trend label based on EMA(9) slope.
Designed for intermediate traders, it helps build bias, manage entries, and avoid false setups by focusing on clean, reactive levels that the market respects.
🔧 Core Logic:
On the 1H chart, the script compares current and previous closes to detect trend direction. If the trend flips (e.g., up to down), the open of the candle that caused the flip becomes a candidate level.
Only levels that remain untouched by future candle closes are plotted — this filters out “weak” levels that price already violated (which means, a candle closes after passing through the level).
These levels become key S/R zones and often act as reaction points during pullbacks, traps, and liquidity sweeps.
The idea is to check how the price reacts to those levels. Usually there's a clean retest of the level. After that, if the price continues in that direction, it tends to reach the following level.
🔹 Included Tools:
🟣 Trend Change Levels (1H):
Fixed horizontal lines based on confirmed shifts in trend, shown only when not broken.
📉 EMAs (9 / 50 / 200):
Visibility can be set per timeframe. Use for trend context.
📍 EMA Trend Label:
Shows \"UP\", \"DOWN\", or \"RANGE\" based on EMA(9) slope.
🔵 VWAP (Intraday Reset):
Real-time volume-weighted average price that resets daily. Useful for fair value zones and reversion plays.
🟠 Daily Open Line:
Plot of the current day’s open. Used for intraday directional bias. Usually: DO NOT take longs below the Open Print, DO NOT take shorts above it.
📊 ATR Table:
Displays current ATR multiplier on the chart. It's useful to understand if the market is expanding or not.
📈 How to Use It (Strategy):
1. Start on the 1H chart to generate levels.
Only the open of candles that reversed trend are considered — and only if future candles didn’t close through them. I suggest manually adding horizontal lines to mark again the levels, so that they stick to all the timeframes.
2. Use the trend label to decide your bias — \"UP\" for long setups, \"DOWN\" for shorts. Avoid trading against the slope.
3. Switch to the 5m chart and wait for price to approach a plotted level. These are often used for manipulation, retests, or clean reversals.
4. Look for confirmation: rejection candles, break-and-retest, strong engulfing candles, or traps above/below the level. ALWAYS check the price action around the level, along with the volume.
5. Check if VWAP or an EMA is near the level. If yes, the confluence strengthens the trade idea.
6. Use the ATR value to understand if the market is expanding (candles are bigger than the ATR). You don't want to stay in a slow and ranging trade.
✅ Example Entry Flow:
1. On the 1H chart, note a trend change level printed recently.
2. Check the current trend label — if it says \"UP,\" prefer longs.
3. Wait for price to retrace toward the level.
4. On the 5m, look for a bullish engulfing candle or trap setup at the level.
5. Check if VWAP and EMA(50) are near. If yes, execute the trade.
6. Set stop just under the low of the candle prior to your entry. Ideally, a retracing candle.
To be clear: imaging to be LONG, you wait for a retracement that should touch your level. You wait for a candle that resumes the LONG trend, enter when it breaks the high of the previous candle (sill in retracement), you place your stop under the candle prior to your entry.
Notes:
No repainting — levels only show up after confirmed shifts.
Removes broken levels for chart clarity and reliability.
Helps spot high-probability pullback zones and fakeouts.
Perfect confluence tool to support price action, SMC, or EMA strategies.
Works across multiple timeframes with customizable inputs.
👤 Ideal For:
Intraday traders looking for reactive entry points and direction confirmation.
Swing traders wanting to pinpoint continuation zones or reversal pivots.
🚨 Final Note: This indicator doesn’t generate buy/sell signals. It improves your trade filtering by identifying areas the market already respected and reacting to them with price action. Combine it with your own system , test it in replay, and use screenshots to document setups.
📌 If used with discipline, this becomes a precision tool — not a signal generator.
Noxon Cycles Session High/Low Indicator
This powerful indicator automatically marks the Highs and Lows of the Asian, London, and New York trading sessions directly on your chart. It helps traders identify key liquidity zones, potential reversals, and breakout points with precision. Whether you're scalping or swing trading, this tool enhances your market structure analysis and timing for better entries and exits. Perfect for intraday strategies and institutional trading insights.
Ethergy ChronosThe Ethergy Chronos indicator displays major time-based pivot points such as:
Monthly, weekly and daily - previous highs, previous lows, and current opens.
It also displays the separators for each month, week and day.
What makes it original is the fact that it is completely TIME-ZONE customizable, meaning that all specified pivots and separators are calculated and displayed according to the time-zone set.
For instance, if -4 UTC is selected, and the user chart is set to NY time as a default, all mentioned pivots and separators will reference 00:00 (midnight), months will start on the first Monday of that month at 00:00, weeks will start on Monday at 00:00 and daily will follow the same logic. if time-zone is set to -5 UTC then it will be at 01:00 and so forth.
Enjoy.
Ethergy
Choppiness Index [CHOP]🧠 How to Use It
CHOP > 61.8: Likely a sideways/choppy market. Consider sitting out or scalping.
CHOP < 38.2: Strong trend developing — good for trend-following or breakout trades.
Hovering around 50? It’s in a neutral zone, so be cautious.
VWAP + EMA Retracement Indicator SwiftEdgeVWAP + EMA Retracement Indicator
Overview
The VWAP + EMA Retracement Indicator is a powerful and visually engaging tool designed to help traders identify high-probability buy and sell opportunities in trending markets. By combining the Volume Weighted Average Price (VWAP) with two Exponential Moving Averages (EMAs) and a unique retracement-based signal logic, this indicator pinpoints moments when the price pulls back to a key zone before resuming its trend. Its modern, AI-inspired visuals and customizable features make it both intuitive and adaptable for traders of all levels.
What It Does
This indicator generates buy and sell signals based on a sophisticated yet straightforward strategy:
Buy Signals: Triggered when the price is above VWAP, has recently retraced to the zone between two EMAs (default 12 and 21 periods), and a strong bullish candle closes above both EMAs.
Sell Signals: Triggered when the price is below VWAP, has retraced to the EMA zone, and a strong bearish candle closes below both EMAs.
Signal Filtering: A customizable cooldown period ensures that only the first signal in a sequence is shown, reducing noise while preserving opportunities for new trends.
Confidence Scores: Each signal includes an AI-inspired confidence score (0-100%), calculated from candle strength and price distance to VWAP, helping traders gauge signal reliability.
The indicator’s visuals enhance decision-making with dynamic gradient lines, a highlighted retracement zone, and clear signal labels, all customizable to suit your preferences.
How It Works
The indicator integrates several components that work together to create a cohesive trading tool:
VWAP: Acts as a dynamic support/resistance level, reflecting the average price weighted by volume. It filters signals to ensure buys occur in uptrends (price above VWAP) and sells in downtrends (price below VWAP).
Dual EMAs: Two EMAs (default 12 and 21 periods) define a retracement zone where the price is likely to consolidate before continuing its trend. Signals are generated only after the price exits this zone with conviction.
Retracement Logic: The indicator looks for price pullbacks to the EMA zone within a user-defined lookback window (default 5 candles), ensuring signals align with trend continuation patterns.
Candle Strength: Signals require strong candles (bullish for buys, bearish for sells) with a minimum body size based on the Average True Range (ATR), filtering out weak or indecisive moves.
Cooldown Mechanism: A unique feature that prevents signal clutter by allowing only the first signal within a user-defined period (default 3 candles), balancing responsiveness with clarity.
Confidence Score: Combines candle body size and price distance to VWAP to assign a score, giving traders an at-a-glance measure of signal strength without needing external analysis.
These components are carefully combined to capture high-probability setups while minimizing false signals, making the indicator suitable for both short-term and swing trading.
How to Use It
Add to Chart: Apply the indicator to a 15-minute chart (recommended) or your preferred timeframe.
Customize Settings:
VWAP Source: Choose the price source (default: hlc3).
EMA Periods: Adjust the fast and slow EMA periods (default: 12 and 21).
Retracement Window: Set how many candles to look back for retracement (default: 5).
ATR Period & Body Size: Define candle strength requirements (default: 14 ATR period, 0.3 multiplier).
Cooldown Period: Control the minimum candles between signals (default: 3; set to 0 to disable).
Candle Requirements: Toggle whether signals require bullish/bearish candles or entire candle above/below EMAs.
Visuals: Enable/disable gradient colors, retracement zone, confidence scores, and choose a color scheme (Neon, Light, or Dark).
Interpret Signals:
Buy: A green "Buy" label with a confidence score appears below the candle when conditions are met.
Sell: A red "Sell" label with a confidence score appears above the candle.
Use the confidence score to prioritize higher-probability signals (e.g., above 80%).
Trade Management: Combine signals with your risk management strategy, such as setting stop-loss below the retracement zone and targeting a 1:2 risk-reward ratio.
Why It’s Unique
The VWAP + EMA Retracement Indicator stands out due to its thoughtful integration of classic indicators with modern enhancements:
Balanced Signal Filtering: The cooldown mechanism ensures clarity without missing key opportunities, unlike many indicators that overwhelm with frequent signals.
AI-Inspired Confidence: The confidence score simplifies decision-making by quantifying signal strength, mimicking advanced analytical tools in an accessible way.
Elegant Visuals: Dynamic gradients, a highlighted retracement zone, and customizable color schemes (Neon, Light, Dark) create a sleek, futuristic interface that’s both functional and visually appealing.
Flexibility: Extensive customization options let traders tailor the indicator to their style, from conservative swing trading to aggressive scalping.
RSI Forecast [Titans_Invest]RSI Forecast
Introducing one of the most impressive RSI indicators ever created – arguably the best on TradingView, and potentially the best in the world.
RSI Forecast is a visionary evolution of the classic RSI, merging powerful customization with groundbreaking predictive capabilities. While preserving the core principles of traditional RSI, it takes analysis to the next level by allowing users to anticipate potential future RSI movements.
Real-Time RSI Forecasting:
For the first time ever, an RSI indicator integrates linear regression using the least squares method to accurately forecast the future behavior of the RSI. This innovation empowers traders to stay one step ahead of the market with forward-looking insight.
Highly Customizable:
Easily adapt the indicator to your personal trading style. Fine-tune a variety of parameters to generate signals perfectly aligned with your strategy.
Innovative, Unique, and Powerful:
This is the world’s first RSI Forecast to apply this predictive approach using least squares linear regression. A truly elite-level tool designed for traders who want a real edge in the market.
⯁ SCIENTIFIC BASIS LINEAR REGRESSION
Linear Regression is a fundamental method of statistics and machine learning, used to model the relationship between a dependent variable y and one or more independent variables 𝑥.
The general formula for a simple linear regression is given by:
y = β₀ + β₁x + ε
Where:
y = is the predicted variable (e.g. future value of RSI)
x = is the explanatory variable (e.g. time or bar index)
β0 = is the intercept (value of 𝑦 when 𝑥 = 0)
𝛽1 = is the slope of the line (rate of change)
ε = is the random error term
The goal is to estimate the coefficients 𝛽0 and 𝛽1 so as to minimize the sum of the squared errors — the so-called Random Error Method Least Squares.
⯁ LEAST SQUARES ESTIMATION
To minimize the error between predicted and observed values, we use the following formulas:
β₁ = /
β₀ = ȳ - β₁x̄
Where:
∑ = sum
x̄ = mean of x
ȳ = mean of y
x_i, y_i = individual values of the variables.
Where:
x_i and y_i are the means of the independent and dependent variables, respectively.
i ranges from 1 to n, the number of observations.
These equations guarantee the best linear unbiased estimator, according to the Gauss-Markov theorem, assuming homoscedasticity and linearity.
⯁ LINEAR REGRESSION IN MACHINE LEARNING
Linear regression is one of the cornerstones of supervised learning. Its simplicity and ability to generate accurate quantitative predictions make it essential in AI systems, predictive algorithms, time series analysis, and automated trading strategies.
By applying this model to the RSI, you are literally putting artificial intelligence at the heart of a classic indicator, bringing a new dimension to technical analysis.
⯁ VISUAL INTERPRETATION
Imagine an RSI time series like this:
Time →
RSI →
The regression line will smooth these values and extend them n periods into the future, creating a predicted trajectory based on the historical moment. This line becomes the predicted RSI, which can be crossed with the actual RSI to generate more intelligent signals.
⯁ SUMMARY OF SCIENTIFIC CONCEPTS USED
Linear Regression Models the relationship between variables using a straight line.
Least Squares Minimizes the sum of squared errors between prediction and reality.
Time Series Forecasting Estimates future values based on historical data.
Supervised Learning Trains models to predict outputs from known inputs.
Statistical Smoothing Reduces noise and reveals underlying trends.
⯁ WHY THIS INDICATOR IS REVOLUTIONARY
Scientifically-based: Based on statistical theory and mathematical inference.
Unprecedented: First public RSI with least squares predictive modeling.
Intelligent: Built with machine learning logic.
Practical: Generates forward-thinking signals.
Customizable: Flexible for any trading strategy.
⯁ CONCLUSION
By combining RSI with linear regression, this indicator allows a trader to predict market momentum, not just follow it.
RSI Forecast is not just an indicator — it is a scientific breakthrough in technical analysis technology.
⯁ Example of simple linear regression, which has one independent variable:
⯁ In linear regression, observations ( red ) are considered to be the result of random deviations ( green ) from an underlying relationship ( blue ) between a dependent variable ( y ) and an independent variable ( x ).
⯁ Visualizing heteroscedasticity in a scatterplot against 100 random fitted values using Matlab:
⯁ The data sets in the Anscombe's quartet are designed to have approximately the same linear regression line (as well as nearly identical means, standard deviations, and correlations) but are graphically very different. This illustrates the pitfalls of relying solely on a fitted model to understand the relationship between variables.
⯁ The result of fitting a set of data points with a quadratic function:
_______________________________________________________________________
🥇 This is the world’s first RSI indicator with: Linear Regression for Forecasting 🥇_______________________________________________________________________
_________________________________________________
🔮 Linear Regression: PineScript Technical Parameters 🔮
_________________________________________________
Forecast Types:
• Flat: Assumes prices will remain the same.
• Linreg: Makes a 'Linear Regression' forecast for n periods.
Technical Information:
ta.linreg (built-in function)
Linear regression curve. A line that best fits the specified prices over a user-defined time period. It is calculated using the least squares method. The result of this function is calculated using the formula: linreg = intercept + slope * (length - 1 - offset), where intercept and slope are the values calculated using the least squares method on the source series.
Syntax:
• Function: ta.linreg()
Parameters:
• source: Source price series.
• length: Number of bars (period).
• offset: Offset.
• return: Linear regression curve.
This function has been cleverly applied to the RSI, making it capable of projecting future values based on past statistical trends.
______________________________________________________
______________________________________________________
⯁ WHAT IS THE RSI❓
The Relative Strength Index (RSI) is a technical analysis indicator developed by J. Welles Wilder. It measures the magnitude of recent price movements to evaluate overbought or oversold conditions in a market. The RSI is an oscillator that ranges from 0 to 100 and is commonly used to identify potential reversal points, as well as the strength of a trend.
⯁ HOW TO USE THE RSI❓
The RSI is calculated based on average gains and losses over a specified period (usually 14 periods). It is plotted on a scale from 0 to 100 and includes three main zones:
• Overbought: When the RSI is above 70, indicating that the asset may be overbought.
• Oversold: When the RSI is below 30, indicating that the asset may be oversold.
• Neutral Zone: Between 30 and 70, where there is no clear signal of overbought or oversold conditions.
______________________________________________________
______________________________________________________
⯁ ENTRY CONDITIONS
The conditions below are fully flexible and allow for complete customization of the signal.
______________________________________________________
______________________________________________________
🔹 CONDITIONS TO BUY 📈
______________________________________________________
• Signal Validity: The signal will remain valid for X bars .
• Signal Sequence: Configurable as AND or OR .
📈 RSI Conditions:
🔹 RSI > Upper
🔹 RSI < Upper
🔹 RSI > Lower
🔹 RSI < Lower
🔹 RSI > Middle
🔹 RSI < Middle
🔹 RSI > MA
🔹 RSI < MA
📈 MA Conditions:
🔹 MA > Upper
🔹 MA < Upper
🔹 MA > Lower
🔹 MA < Lower
📈 Crossovers:
🔹 RSI (Crossover) Upper
🔹 RSI (Crossunder) Upper
🔹 RSI (Crossover) Lower
🔹 RSI (Crossunder) Lower
🔹 RSI (Crossover) Middle
🔹 RSI (Crossunder) Middle
🔹 RSI (Crossover) MA
🔹 RSI (Crossunder) MA
🔹 MA (Crossover) Upper
🔹 MA (Crossunder) Upper
🔹 MA (Crossover) Lower
🔹 MA (Crossunder) Lower
📈 RSI Divergences:
🔹 RSI Divergence Bull
🔹 RSI Divergence Bear
📈 RSI Forecast:
🔮 RSI (Crossover) MA Forecast
🔮 RSI (Crossunder) MA Forecast
______________________________________________________
______________________________________________________
🔸 CONDITIONS TO SELL 📉
______________________________________________________
• Signal Validity: The signal will remain valid for X bars .
• Signal Sequence: Configurable as AND or OR .
📉 RSI Conditions:
🔸 RSI > Upper
🔸 RSI < Upper
🔸 RSI > Lower
🔸 RSI < Lower
🔸 RSI > Middle
🔸 RSI < Middle
🔸 RSI > MA
🔸 RSI < MA
📉 MA Conditions:
🔸 MA > Upper
🔸 MA < Upper
🔸 MA > Lower
🔸 MA < Lower
📉 Crossovers:
🔸 RSI (Crossover) Upper
🔸 RSI (Crossunder) Upper
🔸 RSI (Crossover) Lower
🔸 RSI (Crossunder) Lower
🔸 RSI (Crossover) Middle
🔸 RSI (Crossunder) Middle
🔸 RSI (Crossover) MA
🔸 RSI (Crossunder) MA
🔸 MA (Crossover) Upper
🔸 MA (Crossunder) Upper
🔸 MA (Crossover) Lower
🔸 MA (Crossunder) Lower
📉 RSI Divergences:
🔸 RSI Divergence Bull
🔸 RSI Divergence Bear
📉 RSI Forecast:
🔮 RSI (Crossover) MA Forecast
🔮 RSI (Crossunder) MA Forecast
______________________________________________________
______________________________________________________
🤖 AUTOMATION 🤖
• You can automate the BUY and SELL signals of this indicator.
______________________________________________________
______________________________________________________
⯁ UNIQUE FEATURES
______________________________________________________
Linear Regression: (Forecast)
Signal Validity: The signal will remain valid for X bars
Signal Sequence: Configurable as AND/OR
Condition Table: BUY/SELL
Condition Labels: BUY/SELL
Plot Labels in the Graph Above: BUY/SELL
Automate and Monitor Signals/Alerts: BUY/SELL
Linear Regression (Forecast)
Signal Validity: The signal will remain valid for X bars
Signal Sequence: Configurable as AND/OR
Condition Table: BUY/SELL
Condition Labels: BUY/SELL
Plot Labels in the Graph Above: BUY/SELL
Automate and Monitor Signals/Alerts: BUY/SELL
______________________________________________________
📜 SCRIPT : RSI Forecast
🎴 Art by : @Titans_Invest & @DiFlip
👨💻 Dev by : @Titans_Invest & @DiFlip
🎑 Titans Invest — The Wizards Without Gloves 🧤
✨ Enjoy!
______________________________________________________
o Mission 🗺
• Inspire Traders to manifest Magic in the Market.
o Vision 𐓏
• To elevate collective Energy 𐓷𐓏
Volume Pulse: Mobile-Optimized Candle Volume Viewer✨ Description ✨
Sleek. Simple. Sexy.
A modern, minimal volume tracker designed for mobile and desktop users who want clean data without clutter.
✅ Displays the volume of the last N candles with intuitive green/red background colors based on candle direction (bullish/bearish).
✅ Automatically converts numbers into K/M/B format for quick understanding.
✅ Comes with a text size setting, so it's fully readable whether you're on a phone or desktop.
Perfect for traders who want to:
Spot volume spikes at a glance
Quickly compare recent candle volumes
Stay mobile-friendly with a visual style that actually fits
4 EMAs with Entry and Exit Strategy🔍 Purpose of the Script:
This strategy is designed to identify bullish trends using a combination of Exponential Moving Averages (EMAs) and the Relative Strength Index (RSI), and execute long entries and exits accordingly.
📈 Key Technical Indicators Used:
EMAs (Exponential Moving Averages):
ema9, ema21, ema63, and ema200 are calculated to determine short-, mid-, and long-term trends.
An unused ema126 is mentioned but commented out.
RSI (Relative Strength Index):
A 14-period RSI is calculated and used to avoid entries when the stock is overbought.
🟢 Entry Logic (Long):
The strategy enters a long position when:
A bullish trend is confirmed by EMA alignment:
ema9 > ema21 > ema63 > ema200
The closing price is above ema9
RSI is ≤ 60, to avoid entering overbought conditions
🔴 Exit Logic (Long Exit):
The strategy exits a long position when:
ema21 crosses below ema63 (bearish signal)
There are commented-out conditions like:
RSI > 80 (overbought)
Close > 1.4 × ema126 (price extended far above average)
🎨 Visualization:
EMAs are plotted in different colors for trend visibility.
Background color turns:
Light green in bullish trend
Light red in bearish trend
⚙️ Strategy Configuration:
Capital: ₹10,00,000
Position size: 10% of equity
Commission: 0.75% per trade (roundtrip)
Overlay: true (indicators and trades plotted on price chart)
✅ Highlights:
Clear trend detection with layered EMA logic
Avoids overbought entries using RSI ≤ 60
Customizable and extendable (e.g., you can uncomment EMA126 and add price-overextension logic)
Multi-Timeframe RSIMultiple Time Frame RSI (1 minute, 5 minute, 1 hour, 4 hour, 1 day)
Background Gradient Colouring with Custom Threshold Levels for Sensitivity
Ability to Choose Time Frames
Higher timeframes are only plotted when they are above 60 or below 20.
21 EMA Multi-Timeframe + VWAPMultiple timeframe EMA for 21 EMA. allows you to see 5, 15, 30m and 1 hr 4hr + daily on one chart. Benefit to this is you can easily see when your means are stacked bearish. And if you are on mobile and only have one screen
Kitty PMO [theUltimator5]Kitty PMO is a momentum analysis tool designed to visually track and interpret the Price Momentum Oscillator (PMO) — with stylistic influence inspired by the charting approach made popular by “theRoaringKitty.” It aims to offer clear, actionable momentum signals directly overlaid on the chart without clutter or ambiguity, making it ideal for traders who prioritize simplicity and signal clarity.
At its core, the indicator calculates the PMO by applying a custom recursive smoothing function to the rate of change (ROC) of price. This smoothed momentum measure is then:
Amplified by a scaling factor (×10),
Further smoothed using user-defined parameters,
Compared against a signal line (EMA of PMO),
And tracked with a secondary moving average (PMO MA) to capture medium-term trend inflections.
While the PMO and its associated signal lines can optionally be plotted, the indicator primarily emphasizes crossovers between the PMO MA and the other two components. When the PMO MA crosses above both the PMO and signal line, a green upward arrow (↑) is plotted below the price. When it crosses below both, a red downward arrow (↓) appears above the price — making it easy to spot potential turning points in momentum.
Additionally, a floating info table can be toggled on to display all current user-defined parameters in a clean, resizable format. This makes the script ideal not just for technical execution but also for real-time strategy tuning and tracking across multiple timeframes.
The script includes optional alerts so you can be notified the moment a key crossover signal is triggered, without needing to keep your eyes glued to the screen.
GME Bond Tracker [theUltimator5]This indicator tracks when GME 0.0% convertible notes, ticker GME6042202 sees trade volume and plots it on the chart.
This indicator is used to track bond-equity arbitrage between GME and the convertible notes. When the bonds trade, there is generally a large qualified contingent trade block at the same time, so the underlying stock volume can be matched against the bond trading.
This is used to help predict future movements of GME, as well as perform trend and reaction analysis on the bond/equity arbitrage events.
Gap & Reversal Signals (Normal vs Heikin-Ashi)🔍 Gap & Reversal Signals (Normal vs Heikin-Ashi) — by
This script is designed to help traders identify key market signals by comparing Normal Candlestick Patterns with Heikin-Ashi values to highlight potential:
✅ Gap Up Opportunities (Strong Bullish Continuation)
🔻 Gap Down Alerts (Strong Bearish Continuation)
🔄 Bullish Reversal Zones (Possible Trend Reversal from Bearish to Bullish)
🔁 Bearish Reversal Zones (Possible Trend Reversal from Bullish to Bearish)
🧠 How it Works:
Gap Up: Normal candle is bullish, Heikin-Ashi is also bullish, and price closes higher than the HA close.
Gap Down: Normal candle is bearish, Heikin-Ashi is also bearish, and price closes lower than the HA close.
Bullish Reversal: Normal candle is bullish, but Heikin-Ashi shows bearish — potential reversal signal.
Bearish Reversal: Normal candle is bearish, but Heikin-Ashi shows bullish — potential reversal signal.
📊 Plot Details:
💚 Gap Up → Green Label Below Bar
❤️ Gap Down → Red Label Above Bar
💙 Bullish Reversal → Blue Label Below Bar
🧡 Bearish Reversal → Orange Label Above Bar
🚀 Use Cases:
Swing and positional traders looking for high-probability reversal setups
Intraday traders spotting early momentum shifts
Backtesters combining HA + candlestick logic for more robust strategies
Fractal Wave MarkerFractal Wave Marker is an indicator that processes relative extremes of fluctuating prices within 2 periodical aspects. The special labeling system detects and visually marks multi-scale turning points, letting you visualize fractal echoes within unfolding cycles dynamically.
What This Indicator Does
Identifies major and minor swing highs/lows based on adjustable period.
Uses Phi in power exponent to compute a higher-degree swing filter.
Labels of higher degree appear only after confirmed base swings — no phantom levels, no hindsight bias. What you see is what the market has validated.
Swing points unfold in a structured, alternating rhythm . No two consecutive pivots share the same hierarchical degree!
Inspired by the Fractal Market Hypothesis, this script visualizes the principle that market behavior repeats across time scales, revealing structured narrative of "random walk". This inherent sequencing ensures fractal consistency across timeframes. "Fractal echoes" demonstrate how smaller price swings can proportionally mirror larger ones in both structure and timing, allowing traders to anticipate movements by recursive patterns. Cycle Transitions highlight critical inflection points where minor pivots flip polarity such as a series of lower highs progress into higher highs—signaling the birth of a new macro trend. A dense dense clusters of swing points can indicate Liquidity Zones, acting as footprints of institutional accumulation or distribution where price action validates supply and demand imbalances.
Visualization of nested cycles within macro trend anchors - a main feature specifically designed for the chartists who prioritize working with complex wave oscillations their analysis.