• Get $40 off VIP by signing up for a free account! Sign Up

Intraday HOD & LOD for ThinkorSwim

stoneybucks

New member
I searched and did not find a basic intraday indicator for high of day and low of day, so I created what I was looking for in my trading. This script is intended to make both HOD and LOD easily recognizable and kept in mind via both line and chart bubble for trading. This will continue to update in real time as NHOD or NLOD are set.

Image-4-20-21-at-11-47-PM.jpg


Code:
#Intraday HOD/LOD Plot
#Stoneybucks
#Simple green HOD and red LOD line and bubble plotting each, and it updates intraday as new ones are set HOD/LOD are set. Bubble is intentionally shifted to ideally be out of the way from viewing price as the day progresses.

plot highLine = HighestAll(if IsNaN(close[-1])
                            then high(period = "Day")
                            else Double.NaN);

plot lowLine = LowestAll(if IsNaN(close[-1])
                            then low (period = "Day")
                            else Double.NaN);



input showBubble = yes;
input ShiftBubble = -75;
def n1 = ShiftBubble + 1;
def cond = showBubble and IsNaN(close[ShiftBubble]) and !IsNaN(close[n1]) ;
AddChartBubble(cond, highLine, Concat("HOD: ", Round(highLine)), Color.GREEN);

input showBubble1 = yes;
input ShiftBubble1 = -75;
def n2 = ShiftBubble + 1;
def cond1 = showBubble and IsNaN(close[ShiftBubble]) and !IsNaN(close[n2]) ;
AddChartBubble(cond, lowLine, Concat("LOD: ", Round(lowLine)), Color.RED);
 
Last edited by a moderator:

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

@geremyh Yes, I did that. Does it update automatically when stock hits new high or low? Also is it scanning all indexes dow, nasdaq, s&p etc? Thanks
 
Yeah it updates, you can soften the parameters too...that will bring in more fish. You can change it to monitor new lows if you want by altering the Study settings. You decide what it scans by selecting a watchlist with the dropdown "Scans In" ...think i had it set to NYSE but you change it to whatever you want.
 
After I import it I closed the window it popped up with the scan settings. Do i need to import again or is there a way to change study settings directly?
 
yeah, now you go back to your built in scan tab, Load Scan, change it however you want, then Save Scan...just takes practice...heck i didn't even know how to share and load scans until this morning
 
Here is another one after I was messing around with it. I fine tuned it so we don't miss those symbols that are close to there daily high. More actionable list. The other one is designed specifically to monitor and catch actual highs.

This one is a list of those that have hit highs. More of an example of how well you can configure the scans. Notice how I removed one filter from the 'None of the Following' and moved it to the 'Any of the Following' https://tos.mx/DT6Z8tE

Edit:http://tos.mx/RZZ3Y6T this one maintains the list, losers get knocked off....loving these scans...never spent time in them.
 
Last edited:
Lately, I've been trading low flat, high volatility stocks as discussed here. These stocks have crazy intraday rallies followed by multiple days of price retracements.

Would it be possible to create a scanner to follow such stocks, wait a minimum of 3 days then start to scan for the first day bar to make a new high?

It's basically like as if your trading the 1-minute candle but it's really the Day candle. Once I get notified of a bullish reversal I can then go intraday in the stock and make some trades. If that's not possible I guess I would have to export every stock that pops up on my Relative Volume scanner and browse them each day.
 
I am looking for a script/study that would notify me via push notification or text message every time there is a new HIGH and a new LOW on a Forex Currency Pair.
 
HIGH/LOW Graph Scanner

The following will scan price that is within the 25% of the current intraday high and low (from the current day's intraday price movement), its the one i personally use on a watchlist. Be sure to the time AGREGGATION to DAY on the scanner. You can add the "HIGH/LOW Graph" built in to TOS to visualize it and "SORT BY".

Appreciation goes a long way... Remember to this the like button if you found this post useful.

JYwXnKv.png


Code:
declare lower;


input length = 1;
input BasePeriod = AggregationPeriod.DAY;
def hh = Highest(high(period = BasePeriod)[0], 1);
def ll = Lowest(low(period = BasePeriod)[0], 1);
def mid = (hh + ll) / 2;

def HighLowDegree;
if (hh == ll) {
    HighLowDegree = 0;
} else {
    HighLowDegree = (close - mid) / (hh - mid);
}
plot scan = highlowdegree > .25 or  highlowdegree < -0.25 ;

you can tighten the percent to narrow down more results to your liking.

Examples:
highlowdegree <-1.00= 100% at it lowest of the day
highlowdegree <-0.25 would be at about 66% close to the lowest of the day
highlowdegree ==0 would be the middle price of the day
highlowdegree >1.00 would be the highest of the day
highlowdegree >0.25 would be about 66% close to the high of the day
 
Last edited:
During a live trading day, I like to get signals for new high or new low on a 5 minute candle for example.
Surprisingly there is no existing script or build in study in TOS that I can find.
This seem to be the basic day trading signal for beginners.
 
Hi All,

I'm not great at scripting. I do okay but this alludes me for some reason, and I can't find a study that achieves this.

I'm looking for a script that will calculate the difference between the high of a period and the low of period, so I could add it as a watchlist column, and see at a glance without having to examine each chart.

So essentially if ABC stock has had a high of 50, and a low of 40, then the value would be the difference of 10.

Anyone know of a study like this or would be able to assist me in scripting one?

Thanks
 
Hey guys just saw this as I was curious too and sorry to be redundant as I couldnt figure it out. Whats the scan for low of day when it appears? Im trying to see it intraday on a 5 min chart the bubble that appears. Any response would be appreciated!
 
@XeoNoX That looks nice, what time frame you have? I have 5 min...and it is showing loading.......Thanks.

Also the coded above is that for scanner? or WL? Thanks
 
@mdtn Can be for either one... sometimes if the TD Ameritrade servers have high servicing load then it will take a few mins to load an will show loading. I have it set to DAY and the code specified DAY, you would have change the aggregation for 5 mins to FIVE_MIN

https://tlc.thinkorswim.com/center/reference/thinkScript/Constants/AggregationPeriod

To answer your original question
Hey guys just saw this as I was curious too and sorry to be redundant as I couldnt figure it out. Whats the scan for low of day when it appears? Im trying to see it intraday on a 5 min chart the bubble that appears. Any response would be appreciated!

The scan I meant to be on the DAY aggregation because you are trading the current day and looking for the low of the DAY. You're not looking for the low the the 5 minutes. if you want just the low the scan would change to

Code:
plot scan = highlowdegree < -0.25 ; #max is -1.00
highlowdegree <-1.00= 100% at it lowest of the day
highlowdegree <-0.25 would be at about 66% close to the lowest of the day
highlowdegree ==0 would be the middle price of the day
highlowdegree >100 would be the highest of the day
highlowdegree >0.25 would be about 66% close to the high of the day
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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