TOS Scanner for New High intraday


Category:
0
0

Do you have any videos showing how to set up a scanner to see stocks making new highs and lows on the day on 2x relative volume? It would be preferred to be able to customize the price settings.

 Thank you!

Marked as spam
Posted by (Questions: 1, Answers: 1)
Asked on August 25, 2017 3:05 pm
6841 views
0

We have a video that shows new intraday highs and lows, yes. That video does not include volume data. Please explain “to be able to customize the price settings”. Have you searched the Q&A forum for similar posts? This sort of thing is requested very often.

( at August 25, 2017 10:24 pm)
0

By that I mean I’d like the scanner to only show me stocks over $1 and under $15, for example.

( at September 6, 2017 11:57 am)
0
Private answer

My apologies Elissa for the late response. Somehow your last reply on Sept 6th escaped my attention. I accidentally ran across this while searching the forum.

What I did here was to convert the code we published previously in this post: https://www.hahn-tech.com/thinkorswim-alert-high-low-version-two/

Converting it into a scan. I see you have requested a scan that alerts to new intraday highs and lows. This code should handle that quite well. The additional items you requested can be easily added as standard built in filters. So I will not cover the price range between 1 and 15 or the 2x relative volume. Whatever ‘relative volume’ means. If you can explain what that means I may provide a couple lines of code to include that.

Here is the code for new intraday highs and lows, to be used in a scan. If you want to know how to adjust the settings, be sure to view the original view I linked to at the beginning of my response.

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;

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on October 19, 2017 11:15 am
0

Hello Pete, and again thank you for the site. I just tried to copy/paste the above code a few times, but I am unable to save it? Thought I would reach out to check on this, as I am not sure why it does not. Jim

( at September 23, 2018 4:08 am)
0

Sorry about that. During the copy/paste the website got a mind of it’s own and broke some of the carriage returns. So there were several lines of code being treated as one. I just corrected the code by forcing the line breaks through HTML. After testing this, it works fine now.

( at September 23, 2018 8:32 am)
0
Hi Pete, I installed this scan and it seems to work great on picking up new intraday highs but so far does not seem to work on new lows. Maybe I have to change something?
( at December 21, 2019 8:37 am)
0
Did you comment out the scan for daily high and uncomment the scan for daily low? The "#" symbols mark a line of code as a comment. So you switch from one signal to the other by moving the "#" symbol. I suggest you watch a few of our videos in the Thinkorswim Scans category. This technique is used for nearly every scan I have ever published.
( at December 21, 2019 8:58 am)
0
Will do thx
( at December 21, 2019 9:14 am)