Hybrid OscillatorHybrid Oscillator
Hybrid Oscillator is a visual oscillator designed to read momentum pressure, overbought conditions, oversold conditions, oscillator crosses, extreme zones and directional fading inside a separate chart pane.
the indicator combines a selected oscillator engine with a smoothed wave, a secondary cross line, gradient zones, level dots and alert conditions.
the goal is to help traders understand when momentum is expanding, when it is reaching an extreme area, when it is cooling down, and when the main oscillator line crosses its reference line.
this tool is not a trading strategy. it does not place trades, does not guarantee reversals and does not predict future price movement. it is a technical analysis tool for market context, momentum reading and visual confirmation.
main concept
the oscillator moves between 0 and 100.
values near the upper zone show stronger upside pressure or overbought conditions.
values near the lower zone show stronger downside pressure or oversold conditions.
the main oscillator line is the active momentum wave.
the real cross line is a smoother reference line.
when the main oscillator crosses above the real cross line, momentum may be recovering or shifting upward.
when the main oscillator crosses below the real cross line, momentum may be weakening or shifting downward.
what the indicator displays
main oscillator line
real cross line
upper and lower gradient zones
overbought level
oversold level
extreme overbought level
extreme oversold level
mid upper level
mid lower level
top extreme dots
bottom extreme dots
real cross dots
level lines
alert conditions
oscillator engines
the script includes several oscillator calculation modes.
rsi
uses relative strength index behavior.
this mode is useful for reading classic momentum strength and overbought or oversold behavior.
stochastic
uses stochastic positioning.
this mode focuses on where price is closing compared to its recent high and low range.
hybrid rsi plus stochastic
uses rsi first, then applies a stochastic calculation to the rsi behavior.
this mode focuses on momentum position inside the rsi range and gives a more reactive exhaustion style.
cci normalized
uses commodity channel index behavior and normalizes it into a 0 to 100 style range.
this mode can be useful for reading broader deviation and momentum pressure.
how the real cross line works
the real cross line is a smoothed version of the active oscillator.
it is not a separate oscillator type. it follows the selected engine.
if rsi mode is selected, the cross line follows the rsi-based oscillator.
if stochastic mode is selected, the cross line follows the stochastic-based oscillator.
if hybrid mode is selected, the cross line follows the hybrid oscillator.
if cci normalized mode is selected, the cross line follows the normalized cci oscillator.
the cross dots are based on the actual intersection between the main oscillator and the real cross line.
orange cross dots show an upward cross.
magenta cross dots show a downward cross.
input guide
source
selects the price source used by the oscillator.
common choices are close, hl2, hlc3 or ohlc4.
close is simple and reactive.
hlc3 is smoother because it includes high, low and close.
length
controls the base oscillator calculation period.
a lower value makes the oscillator faster and more sensitive.
a higher value makes the oscillator smoother and slower.
smoothing
controls the smoothing applied to the final oscillator.
a lower value reacts faster.
a higher value reduces noise but adds more delay.
oscillator type
selects the calculation engine.
rsi is classic momentum.
stochastic is range position.
hybrid rsi plus stochastic is a more sensitive momentum range model.
cci normalized is a deviation-based momentum model.
extreme overbought
sets the upper extreme zone.
when the oscillator reaches this area, upside momentum is considered stretched.
overbought
sets the main upper warning level.
crossing this level can mark a strong bullish extension.
mid upper
sets the upper midline reference.
this can be used to detect smaller upward crosses around the upper balance area.
mid lower
sets the lower midline reference.
this can be used to detect smaller downward crosses around the lower balance area.
oversold
sets the main lower warning level.
crossing this level can mark a strong bearish extension.
extreme oversold
sets the lower extreme zone.
when the oscillator reaches this area, downside momentum is considered stretched.
enable gradient fills
turns the upper and lower visual gradient zones on or off.
when enabled, the oscillator pane becomes easier to read visually.
gradient layers
controls the number of visual layers used for the gradient style.
more layers create a smoother visual feel.
show level cross dots
shows or hides the dots created by cross conditions and extreme conditions.
show real cross line
shows or hides the smoother cross reference line.
this line is useful when you want to see exactly where the oscillator cross dots come from.
show level lines
shows or hides the horizontal reference lines.
these lines help identify overbought, oversold, extreme and midpoint areas.
oscillator line width
controls the thickness of the main oscillator line.
higher values make the oscillator more visible.
lower values keep the chart cleaner.
how to read the dots
top extreme dots
these appear when the oscillator is inside the extreme overbought zone.
they indicate strong upside extension.
they do not mean price must reverse immediately.
bottom extreme dots
these appear when the oscillator is inside the extreme oversold zone.
they indicate strong downside extension.
they do not mean price must reverse immediately.
orange cross dots
these appear when the main oscillator crosses above the real cross line.
they can show a possible upward momentum shift.
magenta cross dots
these appear when the main oscillator crosses below the real cross line.
they can show a possible downward momentum shift.
important note about dots
cross dots are not automatic buy or sell signals.
they show technical events inside the oscillator.
always confirm with trend, support and resistance, candle close, volume and risk management.
alerts
the script includes alert conditions for:
cross above the real cross line
cross below the real cross line
cross above overbought
cross below oversold
cross above extreme overbought
cross below extreme oversold
recommended beginner alert use
start with real cross up and real cross down.
use overbought and oversold alerts only as context.
use extreme alerts as exhaustion warnings, not direct trade signals.
avoid activating every alert at once if you want a clean workflow.
beginner tutorial
step 1: start with the default oscillator type
begin with hybrid rsi plus stochastic.
this mode gives a balanced view between momentum and range behavior.
step 2: keep the default levels
use the default overbought, oversold and extreme levels first.
do not change too many settings before understanding the oscillator behavior.
step 3: enable the real cross line
turn on the real cross line to see where cross dots come from.
when the oscillator crosses above the line, upward momentum may be improving.
when the oscillator crosses below the line, momentum may be weakening.
step 4: read the zones
above overbought, the market is showing strong upside momentum.
below oversold, the market is showing strong downside momentum.
inside the middle area, the market is more balanced.
step 5: read extremes carefully
extreme overbought can show strong bullish pressure.
extreme oversold can show strong bearish pressure.
an extreme does not guarantee a reversal.
strong markets can stay extreme longer than expected.
step 6: confirm with price action
before using any oscillator event, check the main chart.
look for:
trend direction
support and resistance
market structure
candle close
volume reaction
higher timeframe context
risk to reward
step 7: keep the chart clean
do not use every signal as an entry.
focus on the main oscillator, real cross line, extreme zones and a few important dots.
example 1: upward cross from the lower zone
the oscillator is near the oversold area.
then it crosses above the real cross line.
an orange dot appears at the real cross.
this can suggest that downside momentum is cooling and upward pressure may be starting.
a beginner should wait for price confirmation, such as a higher low, bullish candle close or break of short-term resistance.
example 2: downward cross from the upper zone
the oscillator is near the overbought area.
then it crosses below the real cross line.
a magenta dot appears at the real cross.
this can suggest that upside momentum is weakening.
a beginner should wait for price confirmation, such as rejection, lower high or break of short-term support.
example 3: extreme overbought continuation
the oscillator reaches the extreme overbought zone.
top extreme dots appear.
this means momentum is very strong to the upside.
it does not mean a sell signal is confirmed.
in a strong trend, the oscillator can remain high while price continues moving upward.
example 4: extreme oversold continuation
the oscillator reaches the extreme oversold zone.
bottom extreme dots appear.
this means momentum is very strong to the downside.
it does not mean a buy signal is confirmed.
in a strong downtrend, the oscillator can remain low while price continues moving downward.
example 5: using the cross line for timing
price is near support.
the oscillator is low.
the oscillator crosses above the real cross line.
an orange dot appears.
this can be used as an early momentum recovery warning, but the trader should still wait for price structure confirmation before making a decision.
example 6: using overbought as context
price is in an uptrend.
the oscillator crosses above the overbought level.
this confirms strong bullish pressure.
instead of shorting immediately, a beginner can watch for continuation or wait for a later loss of momentum.
best use cases
momentum reading
overbought and oversold context
detecting oscillator cross events
watching exhaustion zones
supporting reversal analysis
supporting trend continuation analysis
building alert-based watchlists
confirming price action with momentum context
recommended beginner setup
oscillator type: hybrid rsi plus stochastic
length: 14
smoothing: 3
show real cross line: on
show level cross dots: on
show level lines: on
enable gradient fills: on
use cross dots as warnings
use extreme dots as context
confirm every idea on the price chart
practical workflow
first, identify the current trend on the main chart.
second, check whether the oscillator is near the upper, middle or lower zone.
third, watch the real cross line.
fourth, note any orange or magenta cross dot.
fifth, check whether price confirms the oscillator event.
sixth, define invalidation and risk before any trade idea.
seventh, avoid taking signals against a strong trend without extra confirmation.
limitations
the oscillator is based on historical price data.
signals can appear late during fast moves.
extreme zones can stay extreme during strong trends.
cross dots are momentum events, not guaranteed reversals.
the tool should not be used alone.
risk note
this indicator is designed for technical analysis and educational market study. it does not provide financial advice, investment advice or guaranteed trading signals. all dots, levels, crosses, alerts and visual zones are references that require independent confirmation and proper risk management.
Indicator

Library

Sentiment SquareThe Sentiment Square is a multi-timeframe (MTF) and multi-length volume analysis tool designed for PulseWire. It provides a top-down visualization of market conviction by calculating the ratio of bullish volume to total volume across 16 different data points simultaneously.
1.Core Logic: How it Works
The indicator calculates a Bullish Volume Ratio (BVR) for every square in the grid.
BVR = sum ( Volume of Up Candles)/ sum(Total Volume) X 100
Up Candle: Any candle where Close > Open .
Total Volume: The sum of all volume within the lookback window.
Each percentage represents the "Share of Power" held by buyers. For example, a value of 70% means bulls provided 70% of the volume, while bears provided the remaining 30%.
2. Visual Interface
The indicator uses a Transposed Matrix layout to match standard top-down trading analysis:
X-Axis: Timeframes : Moves from your lowest selected timeframe (Left) to your highest (Right).
Y-Axis: Lookback Windows: Moves from short-term momentum (Top) to long-term structure (Bottom).
Color Definitions
Green (Bullish): The percentage is above your Neutral Max (default 55%). Brighter green indicates extreme conviction (>70%).
Red (Bearish): The percentage is below your Neutral Min (default 45%). Brighter red indicates extreme selling (<30%).
Gray (Neutral): The percentage falls between 45% and 55%. This indicates a "tug-of-war" or sideways consolidation where neither side has a decisive majority.
Input Settings
Timeframes Window: Select four different intervals (e.g., 15m, 1h, 4h, 1D).
Speed Window: Set four different lookback lengths (e.g., 20, 50, 100, 200 bars).
Neutral Zone: Adjust the sensitivity of the Gray boxes. A wider range (e.g., 40%–60%) filter out more noise but responds slower to new trends.
How to Interpret the Data
Vertical Alignment (Columns): If a whole column is Green, that specific timeframe is bullish across all horizons (from fast momentum to slow structure).
Horizontal Alignment (Rows): If a whole row is Green, it means that specific "window length" is showing buying pressure across all timeframes.
The "Waiting Time" Signal: When a box is Gray, the volume is balanced. Traders typically wait for the percentage to move out of the 45%–55% range before confirming an entry.
Trend Resilience: If the 15M (tactical) squares turn Red while the 1D (structural) squares remain Green, the market is likely undergoing a healthy pullback rather than a total reversal.
Technical Limitations
Data Lag: Higher timeframe squares (like 1D or 4H) only update when their respective candles close.
Volume Requirement: This indicator requires volume data. It is most effective on Centralized Exchanges (Stocks, Crypto, Futures). On Forex, it uses "Tick Volume," which serves as a proxy for activity.
Common Trade Setup Examples
By observing the transition of colors and percentages across the matrix, you can identify high-probability market conditions.
1.The Trend Continuation (The "Dip-Buy")
Condition: The right-most columns (4H and 1D) and the bottom rows (100 and 200) are solid Green.
Setup: The top-left squares (15M / 20 Window) flip to Red or Gray.
Trigger: Wait for the 15M / 20 square to flip back to Green (above 55%).
Logic: The macro structure is bullish; the red squares indicate a temporary pullback that has now found buyers.
2. The Volatility Squeeze (The "Wait for Breakout")
Condition: A cluster of Gray squares (45%–55%) appears in the middle of the matrix.
Logic: Volume is perfectly balanced between buyers and sellers. This often precedes a massive "expansion" move.
Strategy: Avoid entering while the cluster is Gray. Wait for the majority of the cluster to flip to either solid Green or solid Red.
3. The Top/Bottom Exhaustion
Condition: All 16 squares are Vibrant Green (above 70%) or Vibrant Red (below 30%).
Logic: The market is "over-extended." While the trend is strong, the probability of a reversal increases because there are few buyers/sellers left to push the price further.
Strategy: Tighten stop-losses or look for "Divergence" where the price makes a new high but the percentages in the 20-window start dropping toward 60%.
Summary of the "Wait Time" Metric
The closer a number is to 50%, the more "waiting time" is required. As the numbers move toward 0% or 100%, the market conviction is increasing, and the "actionable" window is opening.
Additional Information:
1. Core Logic
The Sentiment Square calculates the Bullish Volume Ratio (BVR) across 16 data points. It measures "Share of Power" by dividing the volume of "Up Candles" (where Close > Open) by the total volume within a lookback window.
2. Visual Grid Layout
X-Axis (Timeframes): Displays user-selected intervals from lowest (Left) to highest (Right).
Y-Axis (Lookback Windows): Displays "Speeds" from short-term momentum (Top) to long-term structural sentiment (Bottom).
3. Color Definitions
Green (>55%): Bullish conviction. Bright green (>70%) signals extreme strength.
Red (<45%): Bearish conviction. Bright red (<30%) signals extreme selling.
Gray (45%–55%): Neutral "Waiting Time." Indicates volume balance or consolidation.
4. Common Trade Setups
The Dip-Buy: Occurs when macro columns (Right) are Green but tactical squares (Top-Left) temporarily turn Red/Gray. Entry is triggered when tactical squares flip back to Green.
Volatility Squeeze: Identified by a cluster of Gray squares. Traders wait for a majority of the cluster to flip to a solid color before entering.
Exhaustion: When all 16 squares reach extreme vibrant colors, the market is over-extended, increasing the probability of a reversal.
Indicator

MACD Advanced: Trend-Weighted MomentumMACD Advanced Overview
MACD Advanced is a refined version of the classic Moving Average Convergence Divergence. While the standard MACD identifies changes in momentum, it often produces false signals in ranging markets or against a strong higher-timeframe trend. This script addresses that by "tilting" the MACD calculation based on the slope of a Higher Timeframe (HTF) Moving Average.
How it Works
The script integrates a Trend Bias Factor derived from the rate of change of a long-period EMA (default 200) from a user-defined timeframe.
The Math: It calculates the ratio between the current HTF EMA and its value $n$ bars ago. This ratio is then used to offset the MACD line.
Bullish Bias: If the HTF EMA is sloping upward, the MACD is shifted higher, making bearish crossovers harder to trigger and bullish ones more sensitive.
Bearish Bias: If the HTF EMA is sloping downward, the MACD is dragged lower, prioritizing short-side momentum.
Key Features
MTF Integration: Analyze the daily trend while trading on the 5m or 15m chart.
Dynamic Histogram: The visual fill between the MACD and its momentum provides a clear look at when momentum is accelerating or exhausting relative to the trend.
Customizable Sensitivity: Adjust the lookback period for the trend slope to match your specific asset’s volatility.
How to Trade
Trend Confirmation: Look for the MACD line (the columns) to cross the zero line. This indicates that both short-term momentum and long-term trend are in alignment.
Momentum Exhaustion: When the inner histogram (the fill) begins to shrink back toward the MACD columns, it suggests a potential pull-back or profit-taking zone.
Divergences: Look for price making a new high while the MACD Advanced makes a lower high; the trend-weighting makes these divergences more prominent during trend exhaustion.
Technical Approach
Normalization of MTF Data: The script uses request.security with barmerge.gaps_off to ensure that higher timeframe data is mapped correctly to the current chart bars without creating visual "steps" or "staircases."
The Delta Calculation: Instead of a simple boolean filter,
we calculate a relative value r = EMA_ current/EMA_ lookback
By adding r - 1 to the standard MACD calculation, we create a non-linear offset. This means the more aggressive the trend, the more the MACD is displaced.
Visual Architecture: The script uses two plot outputs (g1 and g2) and a fill() function. This creates a "ribbon" effect that is more intuitive than the standard "centered" histogram, as it shows momentum relative to the trend-weighted line rather than a static zero axis.
Since this version of the MACD is "weighted" by a higher-timeframe trend, it changes how you read common signals. On a standard chart, the MACD just shows momentum; here, it shows momentum relative to the "big picture" slope.
Here is how to effectively use the MACD Advanced on a live chart:
1. Finding the "Trend-Momentum" Alignment
The most powerful signal from this indicator occurs when the Trend Factor and the Momentum Histogram both agree.
The Bullish Setup: Look for the MACD columns (the "base") to be above the zero line, while the inner fill (the "histogram") is bright green.
Interpretation: The Daily trend is up, and the intraday momentum is also accelerating.The
Bearish Setup: Look for the MACD columns to be below the zero line, while the inner fill is bright red.
Interpretation: The Daily trend is down, and intraday selling pressure is increasing.
2. Reading the "Hidden" Divergence
Because we’ve added a trend offset r-1, this indicator identifies "Trend Exhaustion" better than a standard MACD.
Standard Divergence: Price makes a higher high, but MACD makes a lower high.
Advanced Divergence: If the price makes a higher high, but the MACD Advanced is flat or lower, it means the Higher Timeframe EMA is losing its slope. Even if the price looks strong, the "Big Picture" is flattening out. This is often a precursor to a major reversal.
3. The "Snap-Back" Trade (Mean Reversion)
Since you are using a 200 EMA as the trend filter, the indicator will naturally pull back toward zero when the price gets too far from that average.
The Signal: If the MACD Advanced is "overextended" (very high or very low relative to its recent history) and the inner histogram crosses back toward the zero line, it’s a sign that the price is likely to "snap back" to the mean.
Application: This is great for exiting a trend trade before the actual trend reversal happens.
Pro Tip: The "Zero-Cross" Filter
In a strong uptrend (Daily EMA 200 is rising), the MACD Advanced will rarely cross below zero. If you see the histogram dip into the red while the MACD columns stay green/above zero, treat that as a "Buy the Dip" opportunity rather than a "Sell" signal.
The Chart shows regular MACD vs ADVANCED MACD one can easily observe the difference between them and the trend is identified easily. Indicator

TradFi Fundamentals: Momentum Trading with Macroeconomic DataIntroduction
This indicator combines traditional price momentum with key macroeconomic data. By retrieving GDP, inflation, unemployment, and interest rates using security calls, the script automatically adapts to the latest economic data. The goal is to blend technical analysis with fundamental insights to generate a more robust momentum signal.
Original Research Paper by Mohit Apte, B. Tech Scholar, Department of Computer Science and Engineering, COEP Technological University, Pune, India
Link to paper
Explanation
Price Momentum Calculation:
The indicator computes price momentum as the percentage change in price over a configurable lookback period (default is 50 days). This raw momentum is then normalized using a rolling simple moving average and standard deviation over a defined period (default 200 days) to ensure comparability with the economic indicators.
Fetching and Normalizing Economic Data:
Instead of manually inputting economic values, the script uses PulseWire’s security function to retrieve:
GDP from ticker "GDP"
Inflation (CPI) from ticker "USCCPI"
Unemployment rate from ticker "UNRATE"
Interest rates from ticker "USINTR"
Each series is normalized over a configurable normalization period (default 200 days) by subtracting its moving average and dividing by its standard deviation. This standardization converts each economic indicator into a z-score for direct integration into the momentum score.
Combined Momentum Score:
The normalized price momentum and economic indicators are each multiplied by user-defined weights (default: 50% price momentum, 20% GDP, and 10% each for inflation, unemployment, and interest rates). The weighted components are then summed to form a comprehensive momentum score. A horizontal zero line is plotted for reference.
Trading Signals:
Buy signals are generated when the combined momentum score crosses above zero, and sell signals occur when it crosses below zero. Visual markers are added to the chart to assist with trade timing, and alert conditions are provided for automated notifications.
Settings
Price Momentum Lookback: Defines the period (in days) used to compute the raw price momentum.
Normalization Period for Price Momentum: Sets the window over which the price momentum is normalized.
Normalization Period for Economic Data: Sets the window over which each macroeconomic series is normalized.
Weights: Adjust the influence of each component (price momentum, GDP, inflation, unemployment, and interest rate) on the overall momentum score.
Conclusion
This implementation leverages PulseWire’s economic data feeds to integrate real-time macroeconomic data into a momentum trading strategy. By normalizing and weighting both technical and economic inputs, the indicator offers traders a more holistic view of market conditions. The enhanced momentum signal provides additional context to traditional momentum analysis, potentially leading to more informed trading decisions and improved risk management.
The next script I release will be an improved version of this that I have added my own flavor to, improving the signals. Indicator

Hybrid Overbought/Oversold OverlayIntroduction
This is a new representation of my well-known oscillator Hybrid Overbought/Oversold Detector overlaid on the chart. The script utilizes the following 12 different oscillators to bring forth a new indicator which I call it Hybrid OB/OS .
Utilized Oscillators
The utilized oscillators here are:
Bollinger Bands %B
Chaikin Money Flow (CMF)
Chande Momentum Oscillator (CMO)
Commodity Channel Index (CCI)
Disparity Index (DIX)
Keltner Channel %K
Money Flow Index (MFI)
Rate Of Change (ROC)
Relative Strength Index (RSI)
Relative Vigor Index (RVI/RVGI)
Stochastic
Twiggs Money Flow (TMF)
The challenging part of utilizing mentioned oscillators was that some of their formulas range are not similar and some of them does not have a mathematical range at all. So I used a normalization function to normalize all their output values to (0, 100) interval.
Overbought/Oversold Levels Calculation
I noticed that the levels which considered as OB/OS level by various traders for each of the utilized oscillators are so different, e.g., many traders consider 30 as OS level and 70 as OB level for RSI and some others take 20 and 80 as the levels, or some traders consider 20 and 80 as OS/OB levels for Stochastic oscillator. Also these levels could be different on different assets, e.g., OB/OS levels for CCI on EURUSD chart might be 80 and 20 while the levels on BTCUSDT chart might be 75 and 25, and so on.
So I decided to make a routine to automate the calculation of these levels using historical data. By this feature, my indicator would calculate the corresponding levels for the oscillators on current chart and then decide about the overbought/oversold situation of each one, which leads to a more accurate Hybrid OB/OS indication.
As the result, if all 12 individual oscillators say it's overbought/oversold, the Hybrid OB/OS shows 100% overbought/oversold, vice versa, if none of them say it's overbought/oversold, the Hybrid OB/OS shows 0, and so on.
The Overlaying Oscillator Problem!
A programming-related challenge here was that Pine Script assigns two separate spaces to the oscillators and the overlaid indicators, and the programmers are limited to use just one of them in each of their codes.
Knowing this, I was forced to simulate the oscillator space on the chart and display my oscillator as a diagram somehow. Of course it won't be as nice as the oscillator itself, because the relation between the main chart bars and the oscillator bars could not be obtained, but it's better than nothing!
Settings and Usage
The indicator settings contain some options about the calculations, the diagram display and the signals appearance. By default they are fine, but you could change them as you prefer.
This indicator is better to be used alongside other indicators as a confirmation (specially in counter-trend strategies I believe). Also it generates an external signal which you could use it in your own designed indicators as well.
Feel free to test it and also the former form of the Hybrid OB/OS . Good Luck! Indicator

Indicator

MACD Hybrid BSHMACD = Moving Average Convergence and Divergence
Hybrid = Combining the two main MACD signals into one indicator
BSH = Buy Sell Hold
This indicator looks for a crossover of the MACD moving averages (12ema and 26ema) in order to generate a buy/sell signal and a crossover of the MACD line (12ema minus 26ema) and MACD signal line (9ema of MACD line) in order to generate a completely seperate buy/sell signal. The two buy/sell signals are combined into a hybrid buy/sell/hold indicator which looks for one, neither, or both signals to be "buys." If both signals are buys (fast crossed above slow), a "buy" signal is given (green bar color). If only one signal is a buy, a "hold" signal is given (yellow bar color). If neither signal is a buy, a "sell" signal is given (red bar color). Note: MACD moving averages crossing over is the same thing as the MACD line crossing the zero level in the MACD indicator.
It makes sense to have the MACD indicator loaded as a reference when using this but it isn't required. The lines plotted on the chart are the 12ema and a signal line which is the MACD signal line shown relative to the 12ema rather than the MACD line. The 26ema is not plotted on the chart because the chart becomes cluttered, plus the moving averages crossing over is indicated with the MACD indicator.
This indicator should be used with other indicators such as ATR (1), RSI (14), Bollinger bands (20, 2), etc. in order to determine the best course of action when a signal is given. One way to use this as a strict system is to take a neutral cash position when a yellow "hold" signal is given, to go long when a
green "buy" signal is given, and to go short when a red "sell" signal is given. It can be observed that for many tickers and timeframes that green-yellow-green and red-yellow-red sequences are stronger signals than green-yellow-red and red-yellow-green signals.
Note: Chart type must be "bars" in order for the bar colorization to work properly Indicator

RSX-D [ID: AC-P]The "AC-P" version of Jaggedsoft's RSX Divergence and Everget's RSX script is my personal customized version of RSX with the following additions and modifications:
LSMA-D line that averages in three LSMA components to form a composite, the LSMA-D line. Offset for the LSMA-D line is set to -2 to offset latency from averaging togther the LSMA components to form a composite - recommended to adjust to your timeframe and asset/pair accordingly.
Divergence component from JustUncle, RicardoSantos, and Neobutane divergence scripts
Crossover indication and alerts for Midline, and custom M1 and M2 levels for both RSX and the LSMA-D line from Daveatt's CCI Stochastic Script
EMA21/55 zone cross highlighting option
SMA9/EMA45 MA option from my RSI sma/ema Cu script
Libertus Divergences and Pivot labels from Jaggedsoft's RSX Divergence script are hidden/off by default
Designed for darkmode by default. Minor visual changes from Jaggedsoft's and Everget's script(s) for darkmode and visual aesthetic.
Please Note:
Divergences that use fractal-based detection logic, offset, or a combination of both generally have a 1-2 bar/candle lag. This is an INHERENT limitation of divergence detection with fractals and offsets. Divergences generally will have a higher strikerate on HTF than LTF due to the 1-2 bar lag. While I'm not going to rule out a programming solution or math construct/formula that attempts to alleivates the 1-2 bar lag for divergences, this script is not it - please keep that in mind when using divergence components with a fractal base and offset.
LSMA-D is a composite of three LSMA lines, all with offset options. Different lengths and Offset values can compensate/adjust for the smoothing/latency from RSX, but only up to a certain point. For each LSMA, the least square regression line is calculated for the previous time periods, so the idea is that with finely tuned adjustments, you can get crossover/crossunder signals from the RSX with the LSMA-D line that you simply can't get with the SMA9/EMA45 due to the already smoothed RSX.
The defaults for the RSX and various components for the LSMA-D here will MOSTLY LIKELY NOT WORK OR BE APPLICABLE to every timeframe and asset that you trade - adjust, backtest, and test accordingly. The defaults are here are MEANT to be adjusted to the asset class and timeframe that you are trading.
If you're not familiar with the LSMA, pulsewire author Alexgrover has a few great scripts that go into detail how the LSMA works, in addition to different interpretations and implementations of the LSMA.
References/Acknowledgements:
//@version=4
// Copyright (c) 2019-present, Alex Orekhov (everget)
// Jurik RSX script may be freely distributed under the MIT license.
//
//-------------------------------------------------------------------
// Acknowledgements:
//---- Base script:
// RSX Divergence — SharkCIA by Jaggedsoft
//
// Jurik Moving Average by Everget
//
//---- Divergences/Signals:
// Libertus RSI Divergences
//
// Price Divergence Dectector V3 by JustUncle
//
// Price Divergence Detector V2 by RicardoSantos
//
// Stochastic RSI with Divergences by Neobutane
//
// CCI Stochastic by Daveatt
//
//---- Misc. Reference:
// RSI SMA/EMA Cu by Auroagwei
//
// CBCI Cu by Auroagwei
//
// Chop and explode by fhenry0331
//
// T-Step LSMA by RafaelZioni
//
// Scripts by Jaggedsoft for structure and formatting
// Scripts by Everget for structure and formatting
//-------------------------------------------------------------------
// RSX-D v08
// Author: Auroagwei
// www.pulsewire.com
//-------------------------------------------------------------------
Indicator

Indicator
