# Watchlist Column Percentage Change after Specific Time

#### Manfrom1968

##### New member
For the Watchlist column I really like the Percentage Change from the Open but I was wondering is it possible be able to have this script modified so I could specify "Percentage Change after a specific time like 11:00 am NY time" for example? Any help is appreciated, Thank you! This is the %change from open script.
#this show percentage change from the open

def openPrice = if SecondsTillTime(930) == 0 then open else openPrice[1];
def pctChangeFromOpen = (close - openPrice) / openPrice;

AssignBackgroundColor(if pctChangeFromOpen > 0 then color.dark_green else color.dark_RED);

Solution
You just have to change 930 to 1100. The only other thing you might have to do is determine what it's supposed to say between 9:30 and 11:00. That code, as it is, if you were to just change the time, would still be showing you the percent change from yesterday at 11:00 until it actually resets at 11:00 today. That might be ok with you, maybe not. Perhaps you want it to just be blank before 11:00? Anyway, let me know what you decide. It's an easy fix that will only take about ten seconds to write.
You just have to change 930 to 1100. The only other thing you might have to do is determine what it's supposed to say between 9:30 and 11:00. That code, as it is, if you were to just change the time, would still be showing you the percent change from yesterday at 11:00 until it actually resets at 11:00 today. That might be ok with you, maybe not. Perhaps you want it to just be blank before 11:00? Anyway, let me know what you decide. It's an easy fix that will only take about ten seconds to write.

You just have to change 930 to 1100. The only other thing you might have to do is determine what it's supposed to say between 9:30 and 11:00. That code, as it is, if you were to just change the time, would still be showing you the percent change from yesterday at 11:00 until it actually resets at 11:00 today. That might be ok with you, maybe not. Perhaps you want it to just be blank before 11:00? Anyway, let me know what you decide. It's an easy fix that will only take about ten seconds to write.
Hi Joshua, that would be great if you could make that change so that it will show as blank before the start time. Thank you.

Code:
``````def tm = 1100;
def openPrice = if SecondsTillTime(tm) == 0 then open else openPrice[1];
def pctChangeFromOpen = (close - openPrice) / openPrice;
def Blank = secondsFromTime(tm) < 0;
AddLabel(yes, if !Blank then AsPercent(pctChangeFromOpen) else "", color.white);
AssignBackgroundColor(if pctChangeFromOpen > 0 then color.dark_green else color.dark_RED);``````

87k+ Posts
190 Online

## The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
• Exclusive indicators
• Proven strategies & setups
• Private Discord community
• Exclusive members-only content
• 1 full year of unlimited support

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?