SPeedTrend (TrendQualityAnalyzer) For ThinkOrSwim

Adeodatus

Active member
Plus
mod note:
This is a context filter layered behind your actual entry tools—VWAP, EMAs, CVD, liquidity levels, or your group’s TMO setups. It tells you whether the environment supports the trade you want to take. When Trend Quality and Dominance agree with your setup, you’re trading with the wind at your back. When they don’t, you’re stepping into chop.

This is in lower chart showing the Trend Speed Analyzer by Zeiierman, brought by samer800, with another fold in the script. It will use dynamic plots for the Green/Red dash line (shows trend speed), Acceleration factor, Direct Acceleration plotting, Trend Quality, a zero line and Bull Dominance. They are up to you to change how they look. DYODD
2026-02-01-TOS_CHARTSA.png

Code:
# ================================
#   TREND QUALITY ANALYZER  #
#   Momentum + Acceleration Model  #
#   AdeodatusTravelLink Series - 2/2026  #
# ================================

declare lower;

# ---- Inputs ----
input accelLookback = 20;
input alpha_base = 0.15;
input AcceleratorMultiplier = 2.0;
input smoothLen = 5;

# ---- Core Price Delta ----
def delta = AbsValue(close - close[1]);

# ---- Max Delta Normalization ----
def max_delta = Highest(delta, accelLookback);

# Prevent divide-by-zero
def safe_max_delta = if max_delta == 0 then 1 else max_delta;

# ---- Acceleration Factor (0–1) ----
def accel_factor =
    Min(delta / safe_max_delta, 1);

# ---- Adaptive Alpha ----
def alpha =
    Min(alpha_base * (1 + accel_factor * AcceleratorMultiplier), 1);

# ---- Directional Acceleration ----
def dir_accel =
    (close - close[1]) / safe_max_delta;

# ---- Momentum (Velocity) ----
def speed = close - close[1];

# ---- Adaptive Momentum Smoothing ----
rec adaptiveSpeed =
    alpha * speed + (1 - alpha) * adaptiveSpeed[1];

# ---- Trend Speed (Low-Lag Hull) ----
def trendspeed = HullMovingAvg(adaptiveSpeed, smoothLen);

# ---- Trend Quality Score ----
# Combines direction + acceleration + smooth impulse
def trendQuality =
    trendspeed * accel_factor;

# ---- Bull / Bear Components ----
def bullPower = Max(trendQuality, 0);
def bearPower = AbsValue(Min(trendQuality, 0));

# ---- Dominance Ratio ----
def dominance =
    bullPower / (bullPower + bearPower);

# ================================
#           PLOTS
# ================================

plot TrendSpeedPlot = trendspeed;
TrendSpeedPlot.SetLineWeight(1);
TrendSpeedPlot.AssignValueColor(
    if trendspeed > 0 then Color.GREEN else Color.RED
);

plot AccelFactorPlot = accel_factor;
AccelFactorPlot.SetDefaultColor(Color.YELLOW);
AccelFactorPlot.SetLineWeight(1);

plot DirAccelPlot = dir_accel;
DirAccelPlot.SetDefaultColor(Color.CYAN);
DirAccelPlot.SetLineWeight(1);

plot TrendQualityPlot = trendQuality;
TrendQualityPlot.SetDefaultColor(Color.WHITE);
TrendQualityPlot.SetLineWeight(2);

plot ZeroLine = 0;
ZeroLine.SetDefaultColor(Color.DARK_GRAY);

# ---- Dominance Reference ----
plot BullDominance = dominance;
BullDominance.SetDefaultColor(Color.GREEN);
BullDominance.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
BullDominance.SetLineWeight(1);

# ================================
#           LABELS
# ================================

AddLabel(
    yes,
    "Accel: " + Round(accel_factor, 2) +
    " | Alpha: " + Round(alpha, 2),
    Color.GRAY
);

AddLabel(
    yes,
    if dominance > 0.6 then "BULL DOMINANT"
    else if dominance < 0.4 then "BEAR DOMINANT"
    else "NEUTRAL",
    if dominance > 0.6 then Color.GREEN
    else if dominance < 0.4 then Color.RED
    else Color.YELLOW
);

TPS Green/Red dashed line
Accel Factor Yellow up pointer
Direct Accel Cyan dash line
Trend Qual. Purple arrow
Zero line White line
Bull Dominance White arrow
 
Last edited by a moderator:
mod note:
This is a context filter layered behind your actual entry tools—VWAP, EMAs, CVD, liquidity levels, or your group’s TMO setups. It tells you whether the environment supports the trade you want to take. When Trend Quality and Dominance agree with your setup, you’re trading with the wind at your back. When they don’t, you’re stepping into chop.

This is in lower chart showing the Trend Speed Analyzer by Zeiierman, brought by samer800, with another fold in the script. It will use dynamic plots for the Green/Red dash line (shows trend speed), Acceleration factor, Direct Acceleration plotting, Trend Quality, a zero line and Bull Dominance. They are up to you to change how they look. DYODDView attachment 26946
Code:
# ================================
#   TREND QUALITY ANALYZER  #
#   Momentum + Acceleration Model  #
#   AdeodatusTravelLink Series - 2/2026  #
# ================================

declare lower;

# ---- Inputs ----
input accelLookback = 20;
input alpha_base = 0.15;
input AcceleratorMultiplier = 2.0;
input smoothLen = 5;

# ---- Core Price Delta ----
def delta = AbsValue(close - close[1]);

# ---- Max Delta Normalization ----
def max_delta = Highest(delta, accelLookback);

# Prevent divide-by-zero
def safe_max_delta = if max_delta == 0 then 1 else max_delta;

# ---- Acceleration Factor (0–1) ----
def accel_factor =
    Min(delta / safe_max_delta, 1);

# ---- Adaptive Alpha ----
def alpha =
    Min(alpha_base * (1 + accel_factor * AcceleratorMultiplier), 1);

# ---- Directional Acceleration ----
def dir_accel =
    (close - close[1]) / safe_max_delta;

# ---- Momentum (Velocity) ----
def speed = close - close[1];

# ---- Adaptive Momentum Smoothing ----
rec adaptiveSpeed =
    alpha * speed + (1 - alpha) * adaptiveSpeed[1];

# ---- Trend Speed (Low-Lag Hull) ----
def trendspeed = HullMovingAvg(adaptiveSpeed, smoothLen);

# ---- Trend Quality Score ----
# Combines direction + acceleration + smooth impulse
def trendQuality =
    trendspeed * accel_factor;

# ---- Bull / Bear Components ----
def bullPower = Max(trendQuality, 0);
def bearPower = AbsValue(Min(trendQuality, 0));

# ---- Dominance Ratio ----
def dominance =
    bullPower / (bullPower + bearPower);

# ================================
#           PLOTS
# ================================

plot TrendSpeedPlot = trendspeed;
TrendSpeedPlot.SetLineWeight(1);
TrendSpeedPlot.AssignValueColor(
    if trendspeed > 0 then Color.GREEN else Color.RED
);

plot AccelFactorPlot = accel_factor;
AccelFactorPlot.SetDefaultColor(Color.YELLOW);
AccelFactorPlot.SetLineWeight(1);

plot DirAccelPlot = dir_accel;
DirAccelPlot.SetDefaultColor(Color.CYAN);
DirAccelPlot.SetLineWeight(1);

plot TrendQualityPlot = trendQuality;
TrendQualityPlot.SetDefaultColor(Color.WHITE);
TrendQualityPlot.SetLineWeight(2);

plot ZeroLine = 0;
ZeroLine.SetDefaultColor(Color.DARK_GRAY);

# ---- Dominance Reference ----
plot BullDominance = dominance;
BullDominance.SetDefaultColor(Color.GREEN);
BullDominance.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
BullDominance.SetLineWeight(1);

# ================================
#           LABELS
# ================================

AddLabel(
    yes,
    "Accel: " + Round(accel_factor, 2) +
    " | Alpha: " + Round(alpha, 2),
    Color.GRAY
);

AddLabel(
    yes,
    if dominance > 0.6 then "BULL DOMINANT"
    else if dominance < 0.4 then "BEAR DOMINANT"
    else "NEUTRAL",
    if dominance > 0.6 then Color.GREEN
    else if dominance < 0.4 then Color.RED
    else Color.YELLOW
);

TPS Green/Red dashed line
Accel Factor Yellow up pointer
Direct Accel Cyan dash line
Trend Qual. Purple arrow
Zero line White line
Bull Dominance White arrow
Thank you Mod. I was putting Timer-slots into a sequenced indicator to try and derive a possible take. knowing just the basic trader available stats are not enough.
Pros obsess over that, retail systems fail because they’re signal-first.
Institutional systems are context-first in dynamic uni-over folding
 
can you share the link like your picture i cant get it set up like your picture for the Trend Quality
q. What you are asking is all for the trades to change eyes, like DYODD, Plotters > wfig, the the green/red line is set at width (2). AccelFactor is Shooting arrows up and width(1) color Yellow, DirAccel is dashed platform lines width (1) color Cyan, TrendQlty is triangle Up, width (2) Color purple, Zero line is white width (1), and Bull dominance shows up only when there is a bull dominance and its a turd, comes and goes, white triangle but does'ot repaint width(4). Nothing on the top inputs changed.
2026-02-03-TOS_CHARTSA.png
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
964 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top