tickers that are up over 20% and maintain a plus or minus 2% of the vwap for the afternoon

catmaniac

New member
VIP
I may have overlooked it but I've been scanning through here and I can't find what I'm looking for. I was hoping someone might direct me to a VWAP study that looks for tickers that are up over 20% and maintain a plus or minus 2% of the vwap for the afternoon. Some of you all might be proud to know that I was inspired here enough to get with Claude and try to write my own code...AND IT WORKED! Only it came up with thousands of tickers and by the time I get through them all it'll be the next day making the whole exercise pretty moot. It's like Clint Eastwood said to some dying fool, a man's gotta know its limitations... I think becoming a world famous code writer might be a bit beyond mine. Thanks ahead of time to anybody that might have some feedback for me.
 
Solution
Thousands are up %20, intraday, where it can check VWAP for the afternoon?

I highly doubt that.

Just because the code doesn't turn red and throw errors, it sill doesn't mean that it is working or truly accomplishing the described task. AI will, for example, misinterpret functions based on what the name of each function sounds like it does, not what it really does, and with no awareness of each function's additional limitations. Most likely, it doesn't understand the additional limitations of scans compared to chart studies either.

It's still on you to catch these mistakes, and then issue additional instructions for the needed corrections.

You are very likely dealing with a zombie-script.

As already mentioned, post the code.
It sounds like you have a working code but it is too broad?

1. Provide the working code.
2. Provide what additional conditions that you want to use to limit the results
 
Last edited:
Thousands are up %20, intraday, where it can check VWAP for the afternoon?

I highly doubt that.

Just because the code doesn't turn red and throw errors, it sill doesn't mean that it is working or truly accomplishing the described task. AI will, for example, misinterpret functions based on what the name of each function sounds like it does, not what it really does, and with no awareness of each function's additional limitations. Most likely, it doesn't understand the additional limitations of scans compared to chart studies either.

It's still on you to catch these mistakes, and then issue additional instructions for the needed corrections.

You are very likely dealing with a zombie-script.

As already mentioned, post the code.
 
Solution
I apologize for taking so long to reply to this thread I started. I've had some personal issues come up which forced me away from the keyboard recently. I realized I didn't have enough criteria for a reasonable result So I went back to Claude and what I'm looking for but I received an error code.. Invalid statement price OK at 23: 1
I'm Appreciate any and all feedback as I am a complete dumba$$ with this stuff but I AM trying to get it...

Code:
# VWAP Hold Scanner - Catman's Micro-Cap Squeeze Setup
# Price between $0.50 and $1.50
# Today's volume >= 10 million shares
# 30-day average daily volume >= 1 million shares
# Up 25% or more from open
# Price holding above VWAP (intraday)

# Price range filter
def priceOK = close >= 0.50 and close <= 1.50;

# Volume filters
def todayVolume = volume >= 10000000;
def avgVolume30 = average(volume, 30) >= 1000000;

# Percentage gain from open
def gainFromOpen = ((close - open) / open) * 100 >= 25;

# VWAP and price relationship
def vwapValue = vwap();
def aboveVWAP = close > vwapValue;

# Combine all conditions
priceOK and todayVolume and avgVolume30 and gainFromOpen and aboveVWAP
 
Error in the final line, it should be plot something =

Zero results once corrected.

What are your other settings, like aggregation period? extended hours enabled?

Edit, I think it's also mixing up the vwap study with the basic fundamental.
 
Last edited:
agree with @Joshua
I do not think this
def vwapValue = vwap();
is what you want. But if it works for you, great.

Your question = why?
Invalid statement price OK at 23: 1

Your error is because every ToS statement must end with a semi-colon;
replace:
priceOK and todayVolume and avgVolume30 and gainFromOpen and aboveVWAP
with
priceOK and todayVolume and avgVolume30 and gainFromOpen and aboveVWAP ;
 
agree with @Joshua
I do not think this

is what you want. But if it works for you, great.

Your question = why?


Your error is because every ToS statement must end with a semi-colon;
replace:

with
A semicolon is all it took? I never would have guessed. I have a pretty good idea of what I want I just have no clue as to how to code it. The only reason I got this far is because I've heard how Claude has been instrumental in writing codes for others. I think the caveat there though is those people know code and just use Claude as a shortcut to a lot of what would amount to time-consuming labor deciphering it all out. As far as any anomalies in the code itself, I don't know if that's what I want either. I don't expect that it will return very many tickers if any on a daily basis because of the narrow share price window that I have. I know what basic pattern I'm looking for and was hoping to narrow the chase down from the other tickers that come come up on the other scans that I have. On a daily basis there's only so many low float/ high SI%... I was just looking for a way to find that pattern where it's had the morning bump and then consolidated all day holding vwap, looking for it to break mr. I can only watch so many at one time anything that narrows it down a little bit for me is a help.

Thanks again for the feedback, y'all are very helpful.
There's so much to learn here and at 72 I'm beginning to run a little low on brain cells that aren't already filled up... Or have gone missing all together. And then there's the time Factor. I've been banging away on Tos for 9 months and I feel like I've just scratched the surface of what's available here. Still... Interesting stuff. I envy my grandson and his techno skills with a lifetime to use them.
 

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