Gap Stats Labels for ThinkorSwim

Didn't know this community existed, with that being said, I'm glad I joined!
Scripts are still a foreign language to me... lol


I need a script providing live Intraday stat labels:

Pre Market Gap up % from yesterday close (Color Green)

Pre Market Gap down % from current Pre Market High^
(Color Red)

Market Open to Current HOD %
(Color Green if Above Open price
Color red if below open price)

High of day to current Low of day %
(Color Red
and last current volume.

If someone could help,
 
Last edited:

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

Is there a script available that would display a chart label (AddLabel) the following conditions may apply:

a. VIX has gapped up or down
 
Hello everyone,

On the first earnings stats code posted by @BenTen , the script recoginizes the first day of the chart period as an earnings event, so, instead of showing 8 earnings (over 2 years), it would show 9 and add the first days' gap to the averages. Can anyone fix this?

Let me know and Thank you in advance!
 
Last edited:
Hello everyone,

On the first earnings stats code posted by @BenTen , the script recoginizes the first day of the chart period as an earnings event, so, instead of showing 8 earnings (over 2 years), it would show 9 and add the first days' gap to the averages. Can anyone fix this?

Let me know and Thank you in advance!
This revision should eliminate the first bar skewing the results:

def EGap = fold y = 0 to 1
while DayAfterBN and bn > 1 do
if (bn - DayAfterBN) <= 1 then open - close[1]
else Double.NaN;


def EPct = fold z = 0 to 1
while DayAfterBN and bn > 1 do
if (bn - DayAfterBN) <= 1 then (open - close[1]) / close[1]
else Double.NaN;

Full revised script:
https://usethinkscript.com/threads/gap-stats-labels-for-thinkorswim.889/#post-110472
 
Last edited by a moderator:
This revision should eliminate the first bar skewing the results:

def EGap = fold y = 0 to 1
while DayAfterBN and bn > 1 do
if (bn - DayAfterBN) <= 1 then open - close[1]
else Double.NaN;


def EPct = fold z = 0 to 1
while DayAfterBN and bn > 1 do
if (bn - DayAfterBN) <= 1 then (open - close[1]) / close[1]
else Double.NaN;

Full revised script below

It works as it should, now. Thank you very much!
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
416 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