Hippo Battlefield - Bulls VS Bears 20 bars## Hippo Battlefield – Bulls VS Bears (20 Bars)
**What it is**
A multi-dimensional momentum-and-sentiment oscillator that combines classic Bull/Bear Power with ATR- or peak-normalization, then layers on RSI and MACD-derived metrics into:
1. **A colored bar series** showing net Bull+Bear Power strength over the last 20 bars,
2. **A dynamic table** of each of those 20 BBP values (grouped into four 5-bar “quartals”), with symbols, per-bar change, and rolling averages, and
3. **A composite “Weighted BBP” histogram** blending normalized RSI, MACD, and BBP into a single view.
---
### Key Inputs
- **Length (EMA)** – look-back for the underlying EMA (default 60)
- **Normalization Length** – look-back window for peak-normalization (default 60)
- **Use ATR for Norm.** – toggle ATR-based normalization vs. highest-abs(BBP)
- **Show Tables** – toggle the bottom-right 21×11 grid of raw and average BBP values
---
### What You See
#### 1. Colored Bars (Overlay = false)
- Bars are colored by normalized BBP intensity:
- Extreme Bull (≥+10): deep blue
- Strong Bull (+5 to +10): green/yellow
- Weak Bull (+0 to +5): dark green
- Weak Bear (–0 to –5): dark red
- Strong Bear (–5 to –10): pink/red
- Extreme Bear (<–10): magenta
#### 2. Bottom-Right Table (20 Bars of Data)
- Divided into four columns (0–4, 5–9, 10–14, 15–19 bars ago) and one “average” row.
- Each cell shows:
1. Bar index (1–20),
2. Normalized BBP value (to four decimals),
3. Direction symbol (↑/↓/=),
4. Bar-to-bar change (± value),
5. A separator “|”.
- At the very bottom, each column’s 5-bar average is displayed as “Avg: X.XXXX” with a dot marker.
#### 3. Top-Center Mini-Table
- When ≥20 bars have elapsed, shows the date at 20 bars ago and the average BBP across the full 20-bar window.
#### 4. Normalized RSI Line
- Rescales the classic 14-period RSI into a –20…+20 band to align with BBP.
#### 5. MACD Lines (Hidden) & Composite Histogram
- MACD and signal lines are calculated but not plotted by default.
- A “Weighted BBP” histogram combines:
- 20% normalized RSI,
- 20% average of (MACD + signal + normalized BBP),
- 60% normalized BBP
- Plotted as columns, color-coded by strength using the same palette as the main bars.
#### 6. Middle Reference Line
- A horizontal zero line to anchor over/under-zero readings.
---
### How to Use It
- **Trend confirmation**: Strong blue/green bars alongside a rising histogram suggest bull conviction; strong reds/magentas signal bear dominance.
- **Divergence spotting**: Watch for price making new highs/lows while BBP or the histogram fails to follow.
- **Quartal analysis**: The 5-bar group averages can reveal whether recent momentum is accelerating or waning.
- **Cross-indicator weighting**: Because RSI, MACD, and raw BBP all feed into the final histogram, you get a smoothed, blended view of momentum shifts.
---
**Tip:** Tweak the EMA and normalization length to suit your preferred timeframe (e.g. shorter for intraday scalps, longer for swing trades). Enable/disable the table if you prefer a cleaner pane.
Oscillators
COT3 - Flip Strength Index - Invincible3This indicator uses the TradingView COT library to visualize institutional positioning and potential sentiment or trend shifts. It compares the long% vs short% of commercial and non-commercial traders for both Pair A and Pair B, helping traders identify trend strength, market overextension, and early reversal signals.
🔷 COT RSI
The COT RSI normalizes the net positioning difference between non-commercial and commercial traders over (N=13, 26, and 52)-week periods. It ranges from 0 to 100, highlighting when sentiment is at bullish or bearish extremes.
COT RSI (N)= ((NC - C)−min)/(max-min) x100
🟡 COT Index
The COT Index tracks where the current non-commercial net position lies within its 1-year and 3-year historical range. It reflects institutional accumulation or distribution phases.
Strength represents the magnitude of that positioning bias, visualized through normalized RSI-style metrics.
COT Index (N)= (NC net)/(max-min) x100
🔁 Flip Detection
Flip refers to the crossovers between long% and short%, indicating a change in directional bias among trader groups. When long positions exceed shorts (or vice versa), it signals a possible market flip in sentiment or trend.
For example, Pair B commercial flip is calculated as:
Long% = (Long/Open Interest)×100
Short% = (Short/Open Interest)×100
Flip = Long%−Short%
A bullish flip occurs when long% overtakes short%, and vice versa for a bearish flip. These flips often precede price trend changes or confirm sentiment breakouts.
Flip captures how far current positioning deviates from historical norms — highlighting periods of institutional overconfidence or exhaustion, often leading to significant market turns.
This combination offers a multi-layered edge for identifying when smart money is flipping direction, and whether that flip has strong conviction or is likely to fade.
..........................................................................................................................................................
RTB - Momentum Breakout Strategy V3
📈 RTB - Momentum Breakout Strategy V3 is a directional breakout strategy based on momentum. It combines exponential moving averages (EMAs), RSI, and recent support/resistance levels to detect breakout entries with trend confirmation. The system includes dynamic risk management using ATR-based stop-loss and trailing stop levels. Webhook alerts are supported for external automated trading integrations.
🔎 The strategy was backtested using default parameters on BTCUSDT Futures (Bybit) with 4-hour timeframe and a 0.05% commission per trade.
⚠️ This script is for educational purposes only and does not constitute financial advice. Always do your own research before trading.
KDJ IndicatorThe KDJ indicator is a technical analysis tool used to identify overbought and oversold conditions in the market, as well as potential trend reversals. It consists of three lines: the K line, D line, and J line. The K line is derived from the Exponential Moving Average (EMA) of the Relative Strength Value (RSV), which measures the closing price relative to the high and low over a user-defined period. The D line is the EMA of the K line, smoothing its movements. The J line, calculated as K + (K - D) × 2, amplifies the difference between K and D, making it more sensitive to price changes. Traders often use the KDJ indicator to spot divergences, crossovers, and extreme values (e.g., above 80 for overbought, below 20 for oversold) to make informed trading decisions. All parameters, including the RSV, K, and D periods, are customizable to suit different trading strategies.
3-Day Breakout Strategy with Trend Change Exit//@version=5
strategy("3-Day Breakout Strategy with Trend Change Exit", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// === Calculate 3-day high/low (excluding current bar) ===
high3 = ta.highest(high , 3)
low3 = ta.lowest(low , 3)
// === Entry conditions ===
longEntry = close > high3
shortEntry = close < low3
// === Track position state ===
isLong = strategy.position_size > 0
isShort = strategy.position_size < 0
wasLong = nz(strategy.position_size > 0)
wasShort = nz(strategy.position_size < 0)
// === Exit conditions ===
// Exit on trend reversal (new signal)
longExit = shortEntry // Exit long position when a short signal occurs
shortExit = longEntry // Exit short position when a long signal occurs
// === Execute entries ===
buySignal = longEntry and not isLong and not isShort
sellSignal = shortEntry and not isLong and not isShort
if (buySignal)
strategy.entry("Long", strategy.long)
if (sellSignal)
strategy.entry("Short", strategy.short)
// === Execute exits on opposite signal (trend change) ===
if (isLong and longExit)
strategy.close("Long")
if (isShort and shortExit)
strategy.close("Short")
// === Exit markers (on actual exit bar only) ===
exitLongSignal = wasLong and not isLong
exitShortSignal = wasShort and not isShort
// === Plot entry signals only on the entry bar ===
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// === Plot exit signals only on the exit bar ===
plotshape(exitLongSignal, title="Exit Long", location=location.abovebar, color=color.orange, style=shape.labeldown, text="EXIT")
plotshape(exitShortSignal, title="Exit Short", location=location.belowbar, color=color.orange, style=shape.labelup, text="EXIT")
RSI SR OB Breakouts Strategy PRO (coffeshopcrypto)This was originally an indicator that I took from coffeshopcrypto, all credit to them. I simply turned it into a strategy. Only additions are TP/SL Levels based off of ticks and an optional EMA Filter
Original Script:
Color Changing MAs📌 Indicator: Color Changing Moving Averages
This script plots up to four customizable moving averages, each with dynamic color changes based on price positioning and optional RSI filtering.
🧩 Key Features:
✅ 4 independent moving averages (SMA or EMA)
✅ Custom inputs for:
Length
Source (e.g. close, OHLC4, etc.)
Offset
Bullish/Bearish color
✅ Toggle visibility for each MA
✅ Global RSI filter to enhance trend signals:
User-defined RSI length
Adjustable Bullish/Bearish thresholds
Universal neutral color for flat/unclear momentum
✅ Global timeframe control — all MAs and RSI are calculated on a single timeframe of your choice (e.g. D, W, M)
🎯 Color Logic:
Bullish color = MA is below both open and close, and RSI is above threshold
Bearish color = MA is above both open and close, and RSI is below threshold
Neutral gray = MA is trending but RSI contradicts the move (filtered out)
🛠️ Use Cases:
Spot trend changes with visual clarity
Identify pullbacks within strong RSI-confirmed trends
Apply higher-timeframe signals while on lower-timeframe charts
⚠️ Notes:
This version uses request.security() to support global timeframe selection — higher timeframes on lower TF charts will display step-like behavior (as per TradingView architecture).
No smoothing/interpolation is applied to preserve raw signal accuracy.
Schaff Trend Cycle (STC) - t0rdn3Schaff Trend Cycle (STC)
By t0rdn3 (original STC by , now with more descriptive naming)
Description
The Schaff Trend Cycle (STC) is a momentum-based oscillator that combines the speed of a fast EMA crossover with cyclical normalization. Developed by Doug Schaff, it identifies market turning points more responsively than MACD or RSI.
How It Works
1. EMA Difference : Calculates the difference between two EMAs of the source series (default: close).
2. Cycle Percentage : Normalizes that difference to a 0–100 range over the cycle period.
3. Smoothing : Applies exponential smoothing twice—first to the cycle percentage, then to its normalized cycles—to reduce noise.
4. Final STC Line : Produces a smoothed oscillator oscillating between 0 and 100.
Alerts
- "STC turned down above 75" : Fires once when STC makes a local peak above the upper threshold ( 75 ).
- "STC turned up below 25" : Fires once when STC makes a local trough below the lower threshold ( 25 ).
Inputs
Cycle Period : 12 — Lookback in bars for normalization
Fast EMA Length : 26 — Period of the fast EMA
Slow EMA Length : 50 — Period of the slow EMA
Smoothing Factor : 0.5 — Exponential smoothing coefficient (0–1)
Usage
Readings above 75 indicate an overbought cycle; readings below 25 indicate an oversold cycle. Crossings of the 50 midline can confirm trend direction:
- STC rising through 50 → bullish shift
- STC falling through 50 → bearish shift
Combine STC with price action or other trend filters to improve signal quality. You can adjust the cycle period and EMA lengths to match different timeframes or instruments.
Gold/Silver RatioOverview
This indicator displays the Gold/Silver Ratio by dividing the price of gold (XAUUSD) by the price of silver (XAGUSD) on the same timeframe. It is a widely used tool in macroeconomic and precious metals analysis, helping traders and investors evaluate the relative value of gold compared to silver.
📈 What it does
Plots the ratio between gold and silver prices as a line on the chart.
Displays two key horizontal levels:
Overbought level at 90 (dashed red line).
Oversold level at 70 (dashed green line).
Highlights the chart background to show extreme conditions:
Red shading when the ratio exceeds 90 (gold is likely overvalued relative to silver).
Green shading when the ratio drops below 70 (silver is likely overvalued relative to gold).
🧠 How to Use
When the ratio exceeds 90, it suggests that gold may be overbought or silver may be undervalued. Historically, these have been good times to consider shifting exposure from gold to silver.
When the ratio falls below 70, it may indicate silver is overbought or gold is undervalued.
This tool is best used in conjunction with technical analysis, macroeconomic trends, or RSI/Bollinger Bands applied to the ratio.
⚙️ Inputs
This version of the script uses OANDA's XAUUSD and XAGUSD pairs for spot gold and silver prices. You may edit the request.security() calls to change data sources (e.g., FXCM, FOREXCOM, or CFD tickers from your broker).
✅ Best For:
Macro traders
Commodity investors
Ratio and spread traders
Long-term portfolio reallocators
Rate of Change HistogramExplanation of Modifications
Converting ROC to Histogram:
Original ROC: The ROC is calculated as roc = 100 * (source - source ) / source , plotted as a line oscillating around zero.
Modification: Instead of plotting roc as a line, it’s now plotted as a histogram using style=plot.style_columns. This makes the ROC values visually resemble the MACD histogram, with bars extending above or below the zero line based on momentum.
Applying MACD’s Four-Color Scheme:
Logic: The histogram’s color is determined by:
Above Zero (roc >= 0): Bright green (#26A69A) if ROC is rising (roc > roc ), light green (#B2DFDB) if falling (roc < roc ).
Below Zero (roc < 0): Bright red (#FF5252) if ROC is falling (roc < roc ), light red (#FFCDD2) if rising (roc > roc ).
Implementation: Used the exact color logic and hex codes from the MACD code, applied to the ROC histogram. This highlights momentum ebbs (falling ROC, fading waves) and flows (rising ROC, strengthening waves).
Removing Signal Line:
Unlike the previous attempt, no signal line is added. The histogram is purely the ROC value, ensuring it directly reflects price change momentum without additional smoothing, making it faster and more responsive to pulse waves, as you indicated ROC performs better than other oscillators.
Alert Conditions:
Added alerts to match the MACD’s logic, triggering when the ROC histogram crosses the zero line:
Rising to Falling: When roc >= 0 and roc < 0, signaling a potential wave peak (e.g., end of Wave 3 or C).
Falling to Rising: When roc <= 0 and roc > 0, indicating a potential wave bottom (e.g., start of Wave 1 or rebound).
These alerts help identify transitions in 3-4 wave pulse patterns.
Plotting:
Histogram: Plotted as columns (plot.style_columns) with the four-color scheme, directly representing ROC momentum.
Zero Line: Kept the gray zero line (#787B86) for reference, consistent with the MACD.
Removed ROC Line/Signal Line: Since you want the ROC to act as the histogram itself, no additional lines are plotted.
Inputs:
Retained the original length (default 9) and source (default close) inputs for consistency.
Removed signal-related inputs (e.g., signal_length, sma_signal) as they’re not needed for a pure ROC histogram.
How This ROC Histogram Works for Wave Pulses
Wave Alignment:
Above Zero (Bullish Momentum): Positive ROC bars indicate flows (e.g., impulse Waves 1, 3, or rebounds in Wave B/C). Bright green bars show accelerating momentum (strong pulses), while light green bars suggest fading momentum (potential wave tops).
Below Zero (Bearish Momentum): Negative ROC bars indicate ebbs (e.g., corrective Waves 2, 4, A, or C). Bright red bars show increasing bearish momentum (strong pullbacks), while light red bars suggest slowing declines (potential wave bottoms).
3-4 Wave Pulses:
In a 3-wave A-B-C correction: Wave A (down) shows bright red bars (falling ROC), Wave B (up) shows bright/light green bars (rising ROC), and Wave C (down) shifts back to red bars.
In a 4-wave consolidation: Alternating green/red bars highlight the rhythmic ebbs and flows as momentum oscillates.
Timing:
Zero-line crossovers mark wave transitions (e.g., from Wave 2 to Wave 3).
Color changes (e.g., bright to light green) signal momentum shifts within waves, helping identify pulse peaks/troughs.
Advantages Over MACD:
The ROC histogram is more responsive than the MACD histogram because ROC directly measures price change percentage, while MACD relies on moving average differences, which introduce lag. This makes the ROC histogram better for capturing rapid 3-4 wave pulses, as you noted.
Example Usage
For a stock with 3-4 wave pulses on a 5-minute chart:
Wave 1 (Flow): ROC rises above zero, histogram turns bright green (rising momentum), indicating a strong bullish pulse.
Wave 2 (Ebb): ROC falls below zero, histogram shifts to bright red (falling momentum), signaling a corrective pullback.
Wave 3 (Flow): ROC crosses back above zero, histogram becomes bright green again, confirming a powerful pulse.
Wave 4 (Ebb): ROC dips slightly, histogram turns light green (falling momentum above zero) or light red (rising momentum below zero), indicating consolidation.
Alerts trigger on zero-line crosses (e.g., from Wave 2 to Wave 3), helping time trades.
Settings Recommendations
Default (length=9): Works well for most time frames, balancing sensitivity and smoothness.
Intraday Pulses: Use length=5 or length=7 for faster signals on 5-minute or 15-minute charts.
Daily Charts: Try length=12 or length=14 for broader wave cycles.
Testing: Apply to a stock with clear wave patterns (e.g., tech stocks like AAPL or TSLA) and adjust length to match the pulse frequency you observe.
Notes
Confirmation: Pair the ROC histogram with price action (e.g., Fibonacci retracements, support/resistance) to validate wave counts, as momentum oscillators can be noisy in choppy markets.
Divergences: Watch for divergences (e.g., price makes a higher high, but ROC histogram bars are lower) to spot wave reversals, especially at Wave 3 or C ends.
Comparison to MACD: The ROC histogram is faster and more direct, making it ideal for short-term pulse waves, but it may be more volatile, so use with technical levels for precision.
RSI Yüzdelik Türev GöstergesiThe derivative of the RSI indicates the acceleration in momentum.
On the chart, you can see where Ethereum began to start rising.
At the start of a commodity trend, it typically exhibits a significant RSI change.
Situations where the RSI value changes this dramatically are hard to liquidate and tend to trigger a rally.
RSI Trend Label (Top Right)This is an RSI indicator showing if its rising over last 20 days or falling with the value.
Simple ScreenerThis is a basic easy to use screener.
In the code you will find an area with all the tickers and you can add your own it will look like this.
It uses the RSI, TSI, ADX, AND SUPER TREND! The code is open source if you would like to tinker and make it better with it. please message me if you have any questions or request.
s01 = input.symbol('AMD', group = 'Symbols', inline = 's01')
s02 = input.symbol('GOOG', group = 'Symbols', inline = 's02')
s03 = input.symbol('BKNG', group = 'Symbols', inline = 's03')
s04 = input.symbol('NIO', group = 'Symbols', inline = 's04')
s05 = input.symbol('NVDA', group = 'Symbols', inline = 's05')
s06 = input.symbol('SPY', group = 'Symbols', inline = 's06')
s07 = input.symbol('QQQ', group = 'Symbols', inline = 's07')
s08 = input.symbol('DIA', group = 'Symbols', inline = 's08')
s09 = input.symbol('IWM', group = 'Symbols', inline = 's09')
s10 = input.symbol('LCID', group = 'Symbols', inline = 's10')
s11 = input.symbol('PTON', group = 'Symbols', inline = 's11')
s12 = input.symbol('PLUG', group = 'Symbols', inline = 's12')
s13 = input.symbol('PLTR', group = 'Symbols', inline = 's13')
s14 = input.symbol('TSLA', group = 'Symbols', inline = 's14')
s15 = input.symbol('AMZN', group = 'Symbols', inline = 's15')
s16 = input.symbol('AAPL', group = 'Symbols', inline = 's16')
s17 = input.symbol('BA', group = 'Symbols', inline = 's17')
s18 = input.symbol('VXX', group = 'Symbols', inline = 's18')
s19 = input.symbol('OXY', group = 'Symbols', inline = 's19')
s20 = input.symbol('JNJ', group = 'Symbols', inline = 's20')
Just replace with the ticker that you would prefer!
Prezzo + Velocità + AccelerazionePrice + Velocity + Acceleration (Cycle Centered Analysis)
Description:
🔥 This indicator provides an advanced analysis of the cyclical behavior of the market through the calculation of:
📈 Centered Moving Average (150 periods, equivalent to a 450-period cycle on the 15m timeframe, adapted to 45m),
🏎️ Velocity: the difference between two consecutive centered moving averages (measuring immediate movement strength),
⚡ Acceleration: the difference between moving averages of the velocity (measuring the change in force, i.e., cyclic acceleration),
🌟 Smoothed Acceleration Moving Average (amplified ×100 for better visualization).
✅ All calculations respect the exact centering of data (offset -length/2). ✅ No subjective interpretations: pure mathematical cycle analysis.
How to read it:
The green/red line = Instantaneous velocity.
The smoothed green/red line = Instantaneous acceleration.
The yellow line = Smoothed acceleration moving average ×100, showing important phase inversions.
Operational use:
Velocity color changes → possible short-term cycle turning points.
Acceleration reversals → confirmations of cycle trend changes.
📊 Best suited for intraday and swing trading (45-minute and daily timeframes).
📚 A powerful tool to study and forecast market cycles based on pure mathematics without subjective biases.
Kevs RSI v2 - Divergence & Signals **Kevs RSI v2 - Divergence & Signals**
**Description:**
Kevs RSI v2 is an enhanced Relative Strength Index (RSI) indicator designed for traders who want more actionable insights from RSI behavior.
It combines a hybrid smoothing technique for a cleaner RSI line with intelligent divergence detection and automatic buy/sell signals.
Key features include:
- **Smoothed RSI** using a blend of WMA and EMA for a sharper, more responsive line.
- **Buy/Sell Signals** generated by oversold/overbought exits and confirmed divergence patterns.
- **Automatic Divergence Detection**, highlighting bullish and bearish divergences visually on the chart.
- **Customizable Settings** for RSI length, overbought/oversold levels, background fill, and divergence sensitivity.
This tool provides an excellent edge for traders who want to combine traditional RSI signals with modern divergence analysis.
---
# **How to Use:**
1. **Add to Chart:**
Apply "Kevs RSI v2 - Divergence & Signals" to your chart from the Indicators menu.
2. **Customize Settings (Optional):**
- Adjust the RSI Length, Overbought, and Oversold levels according to your trading style.
- Turn background fill on or off for better visibility.
- Modify the Divergence Lookback Period or Strength Threshold to fine-tune divergence sensitivity.
3. **Interpret Signals:**
- **Buy Signal:** A green "BUY" label appears when the RSI crosses back above the oversold zone or when bullish divergence is detected.
- **Sell Signal:** A red "SELL" label appears when the RSI crosses below the overbought zone or when bearish divergence is detected.
- **Bullish/Bearish Divergence:** Small green or red diamonds highlight divergence points with optional strength labels.
4. **Trade Responsibly:**
Combine these signals with your broader analysis (price action, trend structure, risk management) for best results.
---
**Notes:**
- Best used on 1-minute to daily charts.
- Ideal for day traders, swing traders, and crypto or forex traders looking to enhance entry/exit precision.
- Divergence detection is dynamic — lower the "Divergence Strength Threshold" to catch more divergences, or raise it to filter out weaker signals.
RSI Full Forecast [Titans_Invest]RSI Full Forecast
Get ready to experience the ultimate evolution of RSI-based indicators – the RSI Full Forecast, a boosted and even smarter version of the already powerful: RSI Forecast
Now featuring over 40 additional entry conditions (forecasts), this indicator redefines the way you view the market.
AI-Powered RSI Forecasting:
Using advanced linear regression with the least squares method – a solid foundation for machine learning - the RSI Full Forecast enables you to predict future RSI behavior with impressive accuracy.
But that’s not all: this new version also lets you monitor future crossovers between the RSI and the MA RSI, delivering early and strategic signals that go far beyond traditional analysis.
You’ll be able to monitor future crossovers up to 20 bars ahead, giving you an even broader and more precise view of market movements.
See the Future, Now:
• Track upcoming RSI & RSI MA crossovers in advance.
• Identify potential reversal zones before price reacts.
• Uncover statistical behavior patterns that would normally go unnoticed.
40+ Intelligent Conditions:
The new layer of conditions is designed to detect multiple high-probability scenarios based on historical patterns and predictive modeling. Each additional forecast is a window into the price's future, powered by robust mathematics and advanced algorithmic logic.
Full Customization:
All parameters can be tailored to fit your strategy – from smoothing periods to prediction sensitivity. You have complete control to turn raw data into smart decisions.
Innovative, Accurate, Unique:
This isn’t just an upgrade. It’s a quantum leap in technical analysis.
RSI Full Forecast is the first of its kind: an indicator that blends statistical analysis, machine learning, and visual design to create a true real-time predictive system.
⯁ 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 + ε
β₁ = Σ((xᵢ - x̄)(yᵢ - ȳ)) / Σ((xᵢ - x̄)²)
β₀ = ȳ - β₁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 Full 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:
_________________________________________________
🔮 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
🔹 RSI Forecast 1 > MA Forecast 1
🔹 RSI Forecast 1 < MA Forecast 1
🔹 RSI Forecast 2 > MA Forecast 2
🔹 RSI Forecast 2 < MA Forecast 2
🔹 RSI Forecast 3 > MA Forecast 3
🔹 RSI Forecast 3 < MA Forecast 3
🔹 RSI Forecast 4 > MA Forecast 4
🔹 RSI Forecast 4 < MA Forecast 4
🔹 RSI Forecast 5 > MA Forecast 5
🔹 RSI Forecast 5 < MA Forecast 5
🔹 RSI Forecast 6 > MA Forecast 6
🔹 RSI Forecast 6 < MA Forecast 6
🔹 RSI Forecast 7 > MA Forecast 7
🔹 RSI Forecast 7 < MA Forecast 7
🔹 RSI Forecast 8 > MA Forecast 8
🔹 RSI Forecast 8 < MA Forecast 8
🔹 RSI Forecast 9 > MA Forecast 9
🔹 RSI Forecast 9 < MA Forecast 9
🔹 RSI Forecast 10 > MA Forecast 10
🔹 RSI Forecast 10 < MA Forecast 10
🔹 RSI Forecast 11 > MA Forecast 11
🔹 RSI Forecast 11 < MA Forecast 11
🔹 RSI Forecast 12 > MA Forecast 12
🔹 RSI Forecast 12 < MA Forecast 12
🔹 RSI Forecast 13 > MA Forecast 13
🔹 RSI Forecast 13 < MA Forecast 13
🔹 RSI Forecast 14 > MA Forecast 14
🔹 RSI Forecast 14 < MA Forecast 14
🔹 RSI Forecast 15 > MA Forecast 15
🔹 RSI Forecast 15 < MA Forecast 15
🔹 RSI Forecast 16 > MA Forecast 16
🔹 RSI Forecast 16 < MA Forecast 16
🔹 RSI Forecast 17 > MA Forecast 17
🔹 RSI Forecast 17 < MA Forecast 17
🔹 RSI Forecast 18 > MA Forecast 18
🔹 RSI Forecast 18 < MA Forecast 18
🔹 RSI Forecast 19 > MA Forecast 19
🔹 RSI Forecast 19 < MA Forecast 19
🔹 RSI Forecast 20 > MA Forecast 20
🔹 RSI Forecast 20 < MA Forecast 20
______________________________________________________
______________________________________________________
🔸 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
🔸 RSI Forecast 1 > MA Forecast 1
🔸 RSI Forecast 1 < MA Forecast 1
🔸 RSI Forecast 2 > MA Forecast 2
🔸 RSI Forecast 2 < MA Forecast 2
🔸 RSI Forecast 3 > MA Forecast 3
🔸 RSI Forecast 3 < MA Forecast 3
🔸 RSI Forecast 4 > MA Forecast 4
🔸 RSI Forecast 4 < MA Forecast 4
🔸 RSI Forecast 5 > MA Forecast 5
🔸 RSI Forecast 5 < MA Forecast 5
🔸 RSI Forecast 6 > MA Forecast 6
🔸 RSI Forecast 6 < MA Forecast 6
🔸 RSI Forecast 7 > MA Forecast 7
🔸 RSI Forecast 7 < MA Forecast 7
🔸 RSI Forecast 8 > MA Forecast 8
🔸 RSI Forecast 8 < MA Forecast 8
🔸 RSI Forecast 9 > MA Forecast 9
🔸 RSI Forecast 9 < MA Forecast 9
🔸 RSI Forecast 10 > MA Forecast 10
🔸 RSI Forecast 10 < MA Forecast 10
🔸 RSI Forecast 11 > MA Forecast 11
🔸 RSI Forecast 11 < MA Forecast 11
🔸 RSI Forecast 12 > MA Forecast 12
🔸 RSI Forecast 12 < MA Forecast 12
🔸 RSI Forecast 13 > MA Forecast 13
🔸 RSI Forecast 13 < MA Forecast 13
🔸 RSI Forecast 14 > MA Forecast 14
🔸 RSI Forecast 14 < MA Forecast 14
🔸 RSI Forecast 15 > MA Forecast 15
🔸 RSI Forecast 15 < MA Forecast 15
🔸 RSI Forecast 16 > MA Forecast 16
🔸 RSI Forecast 16 < MA Forecast 16
🔸 RSI Forecast 17 > MA Forecast 17
🔸 RSI Forecast 17 < MA Forecast 17
🔸 RSI Forecast 18 > MA Forecast 18
🔸 RSI Forecast 18 < MA Forecast 18
🔸 RSI Forecast 19 > MA Forecast 19
🔸 RSI Forecast 19 < MA Forecast 19
🔸 RSI Forecast 20 > MA Forecast 20
🔸 RSI Forecast 20 < MA Forecast 20
______________________________________________________
______________________________________________________
🤖 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 Full 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 𐓷𐓏
Multi-Indicator Swing [TIAMATCRYPTO]This strategy uses a combination of seven powerful technical indicators to identify potential buy and sell signals for swing trading. By requiring confirmation from multiple indicators, the strategy aims to filter out false signals and capture meaningful price movements.
Indicators Used
EMA Crossover - Fast and slow exponential moving averages to identify trend direction
MACD - Momentum indicator showing the relationship between two moving averages
RSI - Measures speed and change of price movements to identify overbought/oversold conditions
Parabolic SAR - Identifies potential reversal points in price movement
Supertrend - Combines trend and volatility to generate clear buy/sell signals
ADX - Measures trend strength to filter out low-conviction signals
Liquidity Delta - Analyzes bid/ask volume imbalances to detect potential market direction
Usage Recommendations
Timeframe Selection: This strategy works best on 1-hour to daily timeframes for swing trading
Market Application: Most effective in trending markets with clear directional bias
Optimization: Test different indicator combinations to find what works best for specific markets
Risk Management: Consider adding stop-loss and take-profit levels based on your risk tolerance
Notes
The strategy uses a clean interface that displays only buy/sell signals for clearer chart analysis
An information panel shows active indicators and testing period
All calculations are performed even for disabled indicators but they won't affect signal generation
The backtesting period can be adjusted according to your analysis needs
This multi-indicator approach to swing trading aims to provide high-quality signals by requiring confirmation from multiple technical perspectives, potentially reducing false signals and improving overall trading results.
Stablecoin Supply Ratio [Alpha Extract]Stablecoin Supply Ratio Indicator
The Stablecoin Supply Ratio (SSR) indicator compares Bitcoin's market capitalization to the aggregate supply of major stablecoins, offering insights into relative purchasing power and liquidity. This tool helps traders:
✔ Assess Bitcoin's buying power relative to the available stablecoin liquidity.
✔ Detect periods of capital inflow or outflow from stablecoins.
✔ Identify market sentiment shifts based on stablecoin reserves.
🔶 CALCULATION
The indicator aggregates the supply of key stablecoins and compares it to Bitcoin's market cap:
Stablecoin Aggregation
• Inputs:
USDT, USDC, DAI, USDD (daily closing values).
BUSD Market Cap (Glassnode data).
• Total Stablecoin Supply:
Sum of the listed stablecoins' market caps.
Stablecoin Supply Ratio (SSR)
• Formula:
SSR = Bitcoin Market Cap / Total Stablecoin Supply
• Normalized SSR:
Normalized by dividing SSR by its 200-day SMA.
Bollinger Bands
• Bands are applied to the normalized SSR using a configurable moving average type and 2 standard deviations.
Example Calculation:
ssr = btcmc / stablecoin_liq
ratio = ssr / ta.sma(ssr, 200)
basis = ta.sma(ratio, 200)
dev = 2 * ta.stdev(ratio, 200)
upper = basis + dev
lower = basis - dev
🔶 DETAILS
Visual Features:
• Normalized SSR:
Plotted as a light green line.
• Upper Band:
Red line indicating SSR overbought zone.
• Lower Band:
Green line signaling SSR oversold zone.
Interpretation:
• High SSR: Indicates stablecoin reserves are low relative to Bitcoin's market cap, reducing stablecoin buying power.
• Low SSR: Suggests high stablecoin liquidity relative to Bitcoin's market cap, increasing potential buying pressure.
• Band Crosses: Movements beyond the upper or lower bands may signal sentiment extremes.
🔶 EXAMPLES
Market insights include:
• Capital Outflows: SSR rising into the upper band may reflect decreasing stablecoin reserves, potentially signaling a liquidity drain.
• Capital Inflows: SSR dropping near the lower band could indicate growing stablecoin reserves, potentially fueling Bitcoin demand.
🔶 SETTINGS
Customization Options:
• MA Type: Choose between SMA, EMA, WMA, SMMA, and VWMA for band calculation.
• Period: Adjust the 200-day smoothing period.
• Deviation Multiplier: Modify the standard deviation multiplier (default: 2).
The Stablecoin Supply Ratio indicator is a valuable tool for traders monitoring liquidity dynamics and stablecoin trends to anticipate Bitcoin market moves and capital flows.
Kalman Filtered RSI | [DeV]The Kalman Filtered RSI indicator is an advanced tool designed for traders who want precise, noise-free market insights. By enhancing the classic Relative Strength Index (RSI) with a Kalman filter, this indicator delivers a smoother, more reliable view of market momentum, helping you identify trends, reversals, and overbought/oversold conditions with greater accuracy. It’s an ideal choice for traders seeking clear signals amidst market volatility, giving you a competitive edge across any trading environment.
The RSI measures momentum by analyzing price movements over a set period, typically 14 bars. It calculates the average of price gains on up days and the average of price losses on down days, then compares these to produce a value between 0 and 100. An RSI above 70 often indicates an overbought market that may reverse downward, while below 30 suggests an oversold market that could reverse upward. RSI is great for spotting momentum shifts, potential reversals, and trend strength, but it can be noisy in choppy markets, leading to misleading signals.
That's where the Kalman filter comes in; it enhances the RSI by applying a sophisticated smoothing process that predicts the RSI’s next value based on its historical trend, then updates this prediction with the actual RSI reading. It operates in two phases: prediction and correction. In the prediction phase, it uses the previous filtered RSI and adds uncertainty from process noise (Q), which is derived from the historical variance of RSI changes, reflecting how much the RSI might unexpectedly shift. In the correction phase, it calculates a Kalman gain based on the ratio of prediction uncertainty to measurement noise (R), which is determined from the variance between raw RSI and a smoothed version, indicating the raw data’s noisiness. This gain weights how much the filter trusts the new RSI versus the prediction, blending them to produce a smoothed RSI that reduces noise while staying responsive to real trends, outperforming simpler methods like moving averages that often lag or oversmooth.
With the Kalman Filtered RSI, you get a refined view of momentum, making it easier to spot trends and reversals with clarity. This indicator’s ability to dynamically adapt to market changes delivers timely, reliable signals, making it a powerful addition to your trading strategy for any market or timeframe.
Quad Rotation StochasticQuad Rotation Stochastic
The Quad Rotation Stochastic is a powerful and unique momentum oscillator that combines four different stochastic setups into one tool, providing an incredibly detailed view of market conditions. This multi-timeframe stochastic approach helps traders better anticipate trend continuations, reversals, and momentum shifts with greater precision than traditional single stochastic indicators.
Why this indicator is useful:
Multi-layered Momentum Analysis: Instead of relying on one stochastic, this script tracks four independent stochastic readings, smoothing out noise and confirming stronger signals.
Advanced Divergence Detection: It automatically identifies bullish and bearish divergences for each stochastic, helping traders spot potential reversals early.
Background Color Alerts: When a configurable number (e.g., 3 or 4) of the stochastics agree in direction and position (overbought/oversold), the background colors green (bullish) or red (bearish) to give instant visual cues.
ABCD Pattern Recognition: The script recognizes "shield" patterns when Stochastic 4 remains stuck at extreme levels (above 90 or below 10) for a set time, warning of potential trend continuation setups.
Super Signal Alerts: If all four stochastics align in extreme conditions and slope in the same direction, the indicator plots a special "Super Signal," offering high-confidence entry opportunities.
Why this indicator is unique:
Quad Confirmation Logic: Combining four different stochastics makes this tool much less prone to false signals compared to using a single stochastic.
Customizable Divergence Coloring: Traders can choose to have divergence lines automatically match the stochastic color for clear visual association.
Adaptive ABCD Shields: Innovative use of bar counting while a stochastic remains extreme acts as a "shield," offering a unique way to filter out minor fake-outs.
Flexible Configuration: Each stochastic's sensitivity, divergence settings, and visual styling can be fully customized, allowing traders to adapt it to their own strategy and asset.
Example Usage: Trading Bitcoin with Quad Rotation Stochastic
When trading Bitcoin (BTCUSD), you might set the minimum count (minCount) to 3, meaning three out of four stochastics must be in agreement to trigger a background color.
If the background turns green, and you notice an ABCD Bullish Shield (Green X), you might look for bullish candlestick patterns or moving average crossovers to enter a long trade.
Conversely, if the background turns red and a Super Down Signal appears, it suggests high probability for further downside, giving you strong confirmation to either short BTC or avoid entering new longs.
By combining divergence signals with background colors and the ABCD shields, the Quad Rotation Stochastic provides a layered confirmation system that gives traders greater confidence in their entries and exits — particularly in fast-moving, volatile markets like Bitcoin.
Pi Cycle | AlchimistOfCrypto Pi Cycle Top Indicator - A Powerful Market Phase Detector
Developed by AlchimistOfCrypto
🧪 The Pi Cycle uses mathematical harmony to identify Bitcoin market cycle tops
with remarkable precision. Just as elements react at specific temperatures,
Bitcoin price behaves predictably when these two moving averages converge! 🧬
⚗️ The formula measures when the 111-day SMA crosses below the 350-day SMA × 2,
creating a perfect alchemical reaction that has successfully identified the
major cycle tops in 2013, 2017, and 2021.
🔬 Like the Golden Ratio in nature, this indicator reveals the hidden
mathematical structure within Bitcoin's chaotic price movements.
🧮 When the reaction occurs, prepare for molecular breakdown! 🔥
Scalping Supertrend + Stochastic RSIThe Scalping Supertrend + Stochastic RSI Indicator is designed for short-term trading and scalping on lower timeframes. It combines the Supertrend indicator to identify trend direction with the Stochastic RSI to pinpoint overbought/oversold conditions for precise entry and exit signals. The indicator generates buy and sell signals when the Stochastic RSI crosses predefined levels (oversold/overbought) while aligned with the Supertrend’s trend direction.
Stochastic and RSI2 entriesStochastic and RSI2 entries, v1.0
This indicator combines Stochastic and RSI to facilitate "RSI2" entry signals. Buy signals will be shown at the bottom.
The default configuration uses non-standard settings for the underlying indicators to tailor it for this type of entry strategy.
This is an entry strategy that tries to find entries close to "the dip".
A combination of Stochastic crossovers, VWAP, daily SMA50 and daily SMA200 are used to verify buy signals.
This indicator is written for bullish signals and aims to find the start of short trends or cheap entries for longer positions.
Like with any strategy, some signals will be false, and the user is advised to do some own research before using the buy signals for actual entries.
Happy trading!