15-Minute Momentum Filter - SPY/QQQ only

NISSAVINIS

New member
Can this be translated into an indicator with watchlist+scanner?

Code:
#15-Minute Momentum Filter – Manual Execution Checklist  with 3-Zone Confidence System (+/-10% Tolerance)


Time zone: All times EST (New York market time) 
Primary instruments: SPY & QQQ short-dated options (0DTE preferred) 
Default action: WAIT / CASH unless confidence meets zone threshold


## Confidence Zones (with +/-10% buffer)


| Confidence Range | Zone Name              | Allowed Actions                              | Size / Aggressiveness          | Example Confidence |
|------------------|------------------------|----------------------------------------------|--------------------------------|--------------------|
| ≥90%             | Strong / Aggressive    | Buy Calls / Buy Puts (full size)<br>Sell Premium (full size) | Full size (1–2 contracts)      | 90–94%             |
| 80–89%           | Medium / Cautious      | Buy Calls / Buy Puts (half size)<br>Sell Calls / Sell Puts (full size)<br>Sell Premium (full size) | Half size directional<br>Full credit | 80–89%             |
| 70–79%           | Borderline / Very Cautious | Sell Premium only (half size)<br>Buy Calls/Puts only if ORB strongly confirms | Half size or less              | 70–79%             |
| <70%             | Low / No Trade         | **Wait / Cash only**                         | No position                    | <70%               |


## A. Pre-Market Preparation (8:00 AM – 9:15 AM EST)


1. Open thinkorswim (or broker with real-time Level 2 & option chains) 
2. Load SPY & QQQ charts (5-min or 15-min) side-by-side 
3. Open MarketWatch → Quotes → add: /ES, /NQ, VIX, NVDA, AAPL, META, MSFT, AMZN, GOOGL, TSLA 
4. Open Trade → All Products → SPY & QQQ chains (today expiry + next 1–2 weeklys) 
5. Set alerts: VIX 18/21/26, NVDA ±1.5–2%, VIX futures shift 
6. At 9:15 AM EST – record baseline: 


   - SPY pre-market price ______ 
   - QQQ pre-market price ______ 
   - /ES % change ______ 
   - /NQ % change ______ 
   - VIX spot & front-month ______ 
   - NVDA pre-market % change ______ 
   - Mag7 quick %: AAPL ___ META ___ MSFT ___ AMZN ___ GOOGL ___ TSLA ___ NVDA ___ 
   - IV ATM today + next weekly (SPY/QQQ) ______ 
   - Early unusual options volume/blocks ______ 


## B. Market Open – First 15 Minutes (9:30 AM – 9:45 AM EST)


7. 9:30 AM – Record open prices 
8. 9:35 AM – 5-min ORB: High/Low, break direction → lean 
9. 9:45 AM – 15-min ORB: High/Low, confirmed break → stronger lean


## C. Every 15 Minutes Checklist (9:45 AM – 4:00 PM EST)


Update label every 15 minutes (9:45, 10:00, 10:15, …, 3:45 PM)


| Item # | Check                                      | Value / Observation                          | Green / Red / Yellow |
|--------|--------------------------------------------|----------------------------------------------|----------------------|

| 1–11   | SPY spot, QQQ spot, /ES % , /NQ %, VIX, NVDA %, IV proxy, volume/blocks, gamma hint, Mag7 % | —                                            | —                    |
| 12     | Confidence score (calculate from grid)     | Apply +/- 10% tolerance to final number      | %                    |


**Confidence Scoring Grid** – add/subtract points:


- +25 VIX <18 
- +15 VIX 18–19 
- +10 futures both green 
- +15 NVDA steady/up 
- +10 NVDA weak/down 
- +20 IV SPY <20% AND QQQ <26% 
- +15 IV moderate low (20–25%) 
- +20 heavy directional volume + blocks 
- +10 gamma positive 
- –15 gamma negative 
- –20 VIX >22 
- –10 mixed futures 


## D. Decision Tree – Apply in Order


1. Strong zone (≥90%) + VIX <19 + green drivers → **Buy Calls** (full size) 
2. Medium zone (80–89%) + red drivers → **Buy Puts** (half size) 
3. Medium zone (≥85%) + high IV + chop/range → **Sell Premium** (iron condor full size) 
4. Medium zone (≥80%) + upside capped → **Sell Calls** (bear call spread full size) 
5. Medium zone (≥80%) + downside limited → **Sell Puts** (bull put spread full size) 
6. Otherwise → **Wait / Cash**


## E. Entry Timing & Strike Rules


**Buy Calls/Puts**:
- ATM or 1-strike OTM (OTM for minimized entry price) 
- Prefer 0DTE if IV <30% and momentum clear 
- Weekly (Mar 6/13) if IV >30–40% or theta concern 
- Enter only 10:00 AM – 2:30 PM EST (best momentum window)


**Sell Calls/Puts/Premium**:
- Defined-risk spreads only (iron condor, credit spreads) 
- 0–7 DTE (shorter = faster theta) 
- Enter 12:00 PM – 3:00 PM EST (max theta decay) 
- Wide wings for iron condor (30–40 point range) in high VIX


## F. Exit Rules (all actions)


- Directional: <80% conf OR flip OR near max run-up (80–95% of peak) 
- Premium Sell: Near breakeven OR VIX >28–30 OR theta goal 
- Hard stop: –$50–$80 per contract/spread 
- EOD close: 3:55–3:58 PM EST


## G. Logging & P&L Tracking (every 15 min & EOD if possible)


**End of Day Routine (4:00–4:15 PM EST)**
- Close any open positions
 
Solution
Per Chat GPT, here it is:

Code:
declare lower;

# =========================
# INPUTS
# =========================
input useSPY = yes;
input showLabels = yes;

# =========================
# DATA (proxies used where needed)
# =========================
def spy = close("SPY");
def qqq = close("QQQ");
def vix = close("VIX");
def ndx = close("NDX");
def nvda = close("NVDA");

# Futures proxies (since /ES /NQ not always accessible in studies)
def esTrend = spy > Average(spy, 20);
def nqTrend = qqq > Average(qqq, 20);

# NVDA momentum
def nvdaUp = nvda > nvda[1];
def nvdaDown = nvda < nvda[1];

# IV proxy (using VIX as approximation)
def lowIV = vix < 20;
def midIV = vix >= 20 and vix <= 25;

# Gamma proxy (trend strength via EMA slope)
def...
sorry, you have so many rules, i can't determine what to do with it all.

don't know what this is?
Open Trade → All Products → SPY & QQQ chains (today expiry + next 1–2 weeklys)
do you want to want to read many options? almost impossible to create many variable names for many options.

why is there a rules based point system, but outputs are dependent on a % number? how to convert points to %


too many vague rules...
  • +15 NVDA steady/up what defines steady?
  • +10 NVDA weak/down what defines weak?
  • +15 IV moderate low (20–25%) what defines moderate ?
  • +20 heavy directional volume + blocks what defines heavy directional?
  • +10 gamma positive what gamma?
  • –10 mixed futures what is this?
 
Thinkorswim does not possess a means of doing such intensive data analysis... Such analysis would require exporting data to a spreadsheet or other data analysis software for aggregation and extrapolation...
 
Per Chat GPT, here it is:

Code:
declare lower;

# =========================
# INPUTS
# =========================
input useSPY = yes;
input showLabels = yes;

# =========================
# DATA (proxies used where needed)
# =========================
def spy = close("SPY");
def qqq = close("QQQ");
def vix = close("VIX");
def ndx = close("NDX");
def nvda = close("NVDA");

# Futures proxies (since /ES /NQ not always accessible in studies)
def esTrend = spy > Average(spy, 20);
def nqTrend = qqq > Average(qqq, 20);

# NVDA momentum
def nvdaUp = nvda > nvda[1];
def nvdaDown = nvda < nvda[1];

# IV proxy (using VIX as approximation)
def lowIV = vix < 20;
def midIV = vix >= 20 and vix <= 25;

# Gamma proxy (trend strength via EMA slope)
def gammaPos = ExpAverage(spy, 8) > ExpAverage(spy, 21);
def gammaNeg = ExpAverage(spy, 8) < ExpAverage(spy, 21);

# Volume proxy
def vol = volume;
def avgVol = Average(volume, 20);
def highVolume = vol > avgVol * 1.5;

# =========================
# SCORING SYSTEM
# =========================
def score =
(if vix < 18 then 25 else 0) +
(if vix >= 18 and vix <= 19 then 15 else 0) +
(if esTrend and nqTrend then 10 else 0) +
(if nvdaUp then 15 else 0) +
(if nvdaDown then 10 else 0) +
(if lowIV then 20 else 0) +
(if midIV then 15 else 0) +
(if highVolume then 20 else 0) +
(if gammaPos then 10 else 0) +
(if gammaNeg then -15 else 0) +
(if vix > 22 then -20 else 0) +
(if !(esTrend and nqTrend) then -10 else 0);

# Clamp score to 0–100
def conf = Max(0, Min(100, score));

# =========================
# ZONES
# =========================
def strong = conf >= 90;
def medium = conf >= 80 and conf < 90;
def borderline = conf >= 70 and conf < 80;
def low = conf < 70;

# =========================
# LABELS
# =========================
AddLabel(showLabels, "Confidence: " + conf + "%",
if strong then Color.GREEN
else if medium then Color.YELLOW
else if borderline then Color.ORANGE
else Color.RED);

AddLabel(showLabels,
if strong then "STRONG → Buy Calls/Puts (Full)"
else if medium then "MEDIUM → Half Size / Credit Spreads"
else if borderline then "BORDERLINE → Sell Premium Only"
else "NO TRADE",
if strong then Color.GREEN
else if medium then Color.YELLOW
else if borderline then Color.ORANGE
else Color.RED);

# =========================
# SIGNAL HINTS
# =========================
plot SignalLine = conf;
SignalLine.SetLineWeight(2);

plot Over90 = 90;
Over90.SetDefaultColor(Color.GREEN);

plot Over80 = 80;
Over80.SetDefaultColor(Color.YELLOW);

plot Over70 = 70;
Over70.SetDefaultColor(Color.ORANGE);
 
Last edited by a moderator:
Solution
Per Chat GPT, here it is:

Code:
declare lower;

# =========================
# INPUTS
# =========================
input useSPY = yes;
input showLabels = yes;

# =========================
# DATA (proxies used where needed)
# =========================
def spy = close("SPY");
def qqq = close("QQQ");
def vix = close("VIX");
def ndx = close("NDX");
def nvda = close("NVDA");

# Futures proxies (since /ES /NQ not always accessible in studies)
def esTrend = spy > Average(spy, 20);
def nqTrend = qqq > Average(qqq, 20);

# NVDA momentum
def nvdaUp = nvda > nvda[1];
def nvdaDown = nvda < nvda[1];

# IV proxy (using VIX as approximation)
def lowIV = vix < 20;
def midIV = vix >= 20 and vix <= 25;

# Gamma proxy (trend strength via EMA slope)
def gammaPos = ExpAverage(spy, 8) > ExpAverage(spy, 21);
def gammaNeg = ExpAverage(spy, 8) < ExpAverage(spy, 21);

# Volume proxy
def vol = volume;
def avgVol = Average(volume, 20);
def highVolume = vol > avgVol * 1.5;

# =========================
# SCORING SYSTEM
# =========================
def score =
(if vix < 18 then 25 else 0) +
(if vix >= 18 and vix <= 19 then 15 else 0) +
(if esTrend and nqTrend then 10 else 0) +
(if nvdaUp then 15 else 0) +
(if nvdaDown then 10 else 0) +
(if lowIV then 20 else 0) +
(if midIV then 15 else 0) +
(if highVolume then 20 else 0) +
(if gammaPos then 10 else 0) +
(if gammaNeg then -15 else 0) +
(if vix > 22 then -20 else 0) +
(if !(esTrend and nqTrend) then -10 else 0);

# Clamp score to 0–100
def conf = Max(0, Min(100, score));

# =========================
# ZONES
# =========================
def strong = conf >= 90;
def medium = conf >= 80 and conf < 90;
def borderline = conf >= 70 and conf < 80;
def low = conf < 70;

# =========================
# LABELS
# =========================
AddLabel(showLabels, "Confidence: " + conf + "%",
if strong then Color.GREEN
else if medium then Color.YELLOW
else if borderline then Color.ORANGE
else Color.RED);

AddLabel(showLabels,
if strong then "STRONG → Buy Calls/Puts (Full)"
else if medium then "MEDIUM → Half Size / Credit Spreads"
else if borderline then "BORDERLINE → Sell Premium Only"
else "NO TRADE",
if strong then Color.GREEN
else if medium then Color.YELLOW
else if borderline then Color.ORANGE
else Color.RED);

# =========================
# SIGNAL HINTS
# =========================
plot SignalLine = conf;
SignalLine.SetLineWeight(2);

plot Over90 = 90;
Over90.SetDefaultColor(Color.GREEN);

plot Over80 = 80;
Over80.SetDefaultColor(Color.YELLOW);

plot Over70 = 70;
Over70.SetDefaultColor(Color.ORANGE);
Let me test this, every day manual tracking these many attributes were difficult
 
You have to be very descriptive when using AI, I use it all the time, but you have to almost write the entire script and explain in detail what you want from it. In this case this script above is too "positive aggressive".
The script is double-counting bullish conditions:

(if nvdaUp then 15 else 0)
(if esTrend and nqTrend then 10 else 0)
(if gammaPos then 10 else 0)

These are all trend confirmations of the same thing. So, one move = +35 points. That’s too heavy.

Your NVDA logic is skewed

(if nvdaUp then 15 else 0)
(if nvdaDown then 10 else 0)

This is a problem:
  • NVDA up = +15
  • NVDA down = +10
So, NVDA always adds positive score either direction!! That’s not neutral, that’s biasing the system upward.

VIX stacking is overweighted

(if vix < 18 then 25 else 0)
(if lowIV then 20 else 0)
(if midIV then 15 else 0)

If VIX < 18 then you’re getting:
  • +25 (first line)
  • +20 (lowIV)
= +45 from ONE factor! That alone can push you into “Medium” without anything else.

Volume spike = +20 (too strong)

(if highVolume then 20 else 0)

Volume spike ≠ directional edge, it just means activity. (some doji's are high volume and direction is neutral).

This should be confirmation then +10 max, not +20

Weak penalty system

(if gammaNeg then -15 else 0)
(if vix > 22 then -20 else 0)
(if !(esTrend and nqTrend) then -10 else 0)

Your negatives are fewer, less frequent and less stacked, so bias = upside-heavy.

WHAT THIS RESULTS IN (REALITY)
Your script likely produces:
  • 70–85% most of the day
  • 85%+ more often than it should
  • Rarely drops below 60%
That destroys the purpose of your zone system and give false confidence leading into trades with bad timing.

If I were building this and using ChatGPT or TradeGPT here is how I would outline my request and then at the end of this I would tell it to ask any questions or request any data or clarifications as needed. Limit lag and maximize efficiency of the TOS platform.

PROMPT TEMPLATE

Here’s what you would send ChatGPT:

“Build me a ThinkScript confidence engine with the following specs:

Purpose:

Trade permission + position sizing for SPY/QQQ intraday options (not entry timing)

Inputs:
  • VIX regime
  • SPY/QQQ trend vs EMA
  • NVDA directional bias
  • EMA spread ATR (expansion/compression)
  • Volume vs average Volume
  • ATR regime
  • Session (RTH vs extended)
Scoring:
  • Total 0–100 scale
  • No single factor >25% weight
  • Balanced positive/negative scoring
Zones:
  • ≥90 = full size
  • 80–89 = half size
  • 70–79 = premium only
  • <70 = no trade
Filters:
  • Block/reduce calculated signals in chop (price near EMA cluster)
  • Block in extended hours
  • Reduce score during compression (Give recommendations on reductions if timeframes make a difference, build in timeframe adjustments if any)
Enhancements:
  • Reduce confidence during momentum decay (spread shrinking)
  • Boost confidence on expansion + volume alignment
  • Include trap/sweep confirmation
Output:
  • Confidence line
  • Color zones
  • Labels with trade guidance in "plain English"
  • Optional arrows or dots when crossing thresholds, include early warning if possible
Style:
Conservative bias (fewer, higher quality signals)”

The quality of the script is directly tied to how clearly you define:
  • Inputs
  • Weighting
  • Behavior
  • Interaction
 
When I suggest that you have to "write the script" to "get a script" you usually have to be this direct-
1. DEFINE THE PURPOSE (MOST IMPORTANT)

Start with “Build me a ThinkScript indicator that outputs a real-time confidence score (0–100%) used to determine whether to trade SPY/QQQ options intraday using options.”

Then clarify:
  • Is it directional? (calls vs puts)
  • Or permission-based? (trade vs no trade)
  • Or both?
Example: “This script is NOT for entries; it is a trade permission filter and sizing guide.”

2. DEFINE ALL INPUT SIGNALS (THIS IS WHERE MOST PEOPLE FAIL)

You need to explicitly list:

A. Market internals
  • VIX thresholds
  • Futures trend (ES/NQ or proxy)
  • NVDA / Mag7 influence
  • Gamma proxy (EMA slope, dealer positioning proxy)
B. Price structure
  • Trend (EMA alignment)
  • Expansion vs compression (your spread ATR)
  • Range vs trend mode
C. Volume / volatility
  • Volume spikes
  • ATR regime (low vs high)
  • Your volatility engine (you already have this)
D. Time / session
  • RTH vs Extended
  • ORB influence (first 15–30 min)
Example (how YOU should write it):
“Use the following inputs:
VIX (<18, 18–20, >22)
SPY/QQQ trend vs 20 EMA
NVDA directional bias
EMA spread ATR (expansion/compression)
Volume vs 20-bar average
ATR regime (low vs expansion)
Session filter (RTH vs extended hours)”

3. DEFINE SCORING SYSTEM (CRITICAL)

This is where you tell ChatGPT:
  • EXACT weights
  • OR allow Chat to optimize weights (you have to tell or ask it)
You choose:

Option A (you control it), “Assign point values to each condition and keep total max near 100.”
Option B (Chat design it): “Balance weights so no single factor contributes more than 25% of total score.”

4. DEFINE OUTPUT BEHAVIOR

What should the script DO?
Examples:
  • Plot line (0–100)
  • Color zones
  • Labels
  • Arrows (optional)
Example:
“Output:
Confidence line (0–100)
Color zones (green/yellow/orange/red)
Label showing trade action recommendation
Optional arrows when confidence crosses thresholds”

5. DEFINE ZONES + ACTIONS

“Use these zones:
≥90 → full size directional
80–89 → half size directional / full credit spreads
70–79 → premium only
<70 → no trade”
**** you are going to have to do some homework to determine it those values are "true".

6. DEFINE FILTERS

You should explicitly say:
“Block signals when:
Market is in compression (low ATR)
EMA spread is flat
Session is extended hours
Chop filter is active (price near EMA cluster)”

7. DEFINE INTERACTIONS
This is what separates other indicators from the other 95%.

Example:
“Confidence should be REDUCED when:
SpreadATR is declining while price rises (momentum loss)
Divergence appears (from PNVI or RSI or whatever indicator you trust most)”

Or:
“Boost confidence when:
Expansion + volume spike align
Trap/sweep confirms direction”

8. DEFINE INTEGRATION

Because you already look at multiple systems, you should say:

“Integrate with:
Spread ATR engine
Trap/Sweep detector
Chop filter (avoidChop)
Session intelligence module”

9. DEFINE HOW STRICT YOU WANT IT
This changes EVERYTHING:
  • Aggressive = more trades signals
  • Conservative = fewer, cleaner trades
Example:
“Bias the system to be conservative:
Require multiple confirmations
Avoid high scores unless alignment is strong”

This is just a clean outline; there will be much more as you go about digging deep into the defining stages of the script.
 
Last edited:
Plus your scoring system gives different confidence levels in different timeframes, which could be ok, but it you look at the 2 hour for instance because this one stands out, it has a 95% confidence interval saying dive in, the water is fine but in reality you are in a digestive mode here not really bearish but not bullish either, no validation one way or the other and potentially "Buy Calls/Puts" really isn't telling you much as the two are very different strategies and by looking at some potential paths can catch you with your wallet open.

the price action has broken down and fell through 2 FVG and could go either way, it could recover - but if it does it has to make a higher high or the signal would turn bearish. If it failed at the halfway point of a past FVG and breakout then it could continue to drop and make a lower low. at best this signal should be ~45-50% NO TRADE WAIT/CASH

 

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
1268 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