ThinkorSwim Scan for New Intraday Highs and Lows

Solution
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) {...

geremyh

New member
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.
 

blake007

New member
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?
 

geremyh

New member
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
 

geremyh

New member
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:

murkr

Member
VIP
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.
 

Dhjesus

New member
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.
 

XeoNoX

Well-known member
VIP
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:
Solution

TomTim

New member
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.
 

csmith54085

New member
VIP
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

Well-known member
VIP
@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
 

csmith54085

New member
VIP
@XeoNoX thank you for your thorough response! I get the idea now for what I want I'd want the -1.00. So last question if I wanted this for the 1 DAY 1 Min chart what would I need to tweak to get it to work? Or is that even possible?
 

XeoNoX

Well-known member
VIP
This is not meant for the chat, it a scanner and a built for a data point. there is no 1minute for high of DAY, its either the high of the day or its not. your not scanning for high of the minute, atleast i assume your not. however you can use the minutes chart to look for the high of the day. The end goal is for high of the day, how you deiced to view it is up to you. To put it in perspective.... you can count to 100 by 1s or by 2s, or by 5s, the end goal is for you get to get to 100, how you get there is up to you. Take a few seconds of our time and Load the high/low graph column into thinkorswim and you will hopefully understand how it works.

keep in mind TOS scanners only scan once every few minutes, as mentioned before thats why its better to relax the highlowdegree threshold a bit.
 
Last edited:

malone1020

Member
VIP
Hi, all -

I'm looking for the thinkscript logic to add code to any lower study such that it plots an arrow whenever the lower study makes a new high AND the current bar close is not making a new high over the last 'x' number of bars. Any guidance? Much appreciated...

Added an example below where I've marked the spot where I'd love to have an arrow appear.

aapl.jpg
 

poststreet

Member
VIP
@malone1020 I don't know if this is what you want, I don't know where I found it, I scanned D and 5 minute and it scans for high of day, it works for that , at least after hours, have not tried during market hours.

Code:
input marketOpen = 930;
input marketClose = 1600;
input intraDaySpan = {Default "SameDay" , "OverNight"};
input numberOfDays = 1;
input numberOfYears = 0;
def okToPlot = GetLastDay() - numberOfDays <= GetDay() and GetLastYear() - numberOfYears <= GetYear() ;
def OpenCounter = SecondsFromTime(marketOpen);
def CloseCounter = SecondsTillTime(marketClose);
def MarketHours = if OpenCounter >= 0 and CloseCounter >= 0 then 1 else 0;
def beforeMidnight = OpenCounter >= 0 and CloseCounter <= 0;
def afterMidnight = OpenCounter <= 0 and CloseCounter >= 0 ;
def Today ;
def hideChartBubbles ;
rec DailyHigh ;
rec DailyLow ;
switch (intraDaySpan) {
case "SameDay":
Today = if GetDay() != GetDay()[1] then 1 else 0;
DailyHigh = if MarketHours then if high > DailyHigh[1] then high else DailyHigh[1] else high;
DailyLow = if Today then low else if MarketHours then if low < DailyLow[1] then low else DailyLow[1] else low; hideChartBubbles = MarketHours;
case "OverNight": Today = 0;
DailyHigh = if beforeMidnight or afterMidnight then if high > DailyHigh[1] then high else DailyHigh[1] else high;
DailyLow = if beforeMidnight or afterMidnight then if low < DailyLow[1] then low else DailyLow[1] else low;
hideChartBubbles = beforeMidnight or afterMidnight;
};
def TodaysHigh = if okToPlot and hideChartBubbles then DailyHigh else Double.NaN;
def TodaysLow = if okToPlot and hideChartBubbles then DailyLow else Double.NaN;
#Alert(DailyHigh > DailyHigh[1] and hideChartBubbles, "New High", Alert.BAR, Sound.RING);
#Alert(DailyLow < DailyLow[1] and hideChartBubbles, "New Low", Alert.BAR, Sound.RING);
# use this to scan for new intraday highs
plot scan = DailyHigh > DailyHigh[1] and hideChartBubbles;
# use this to scan for new intraday lows
#plot scan = DailyLow < DailyLow[1] and hideChartBubbles;
 

Similar threads

Top