Highest Point on each Intraday

cheual

New member
I'd like to create a simple script that'll have a point @ close at the HIGHEST point of each intraday everyday on my screen.

Can someone help with creation of this script.

Thank You!
 
It really wouldn't be that different from doing this right?
wLjaLOQ.jpg
that would depend on your scan if its different or not, your comparing bars ago to price range now which is totally different. its like comparing apples to oranges.
you mentioned
"multiple ranges instead of just 21? maybe just 10 to 20? I could make a new scanner for every time frame but the emails would be over whelming"
and
"different ranges like 10 bars ago. 11 bars ago 12 bars ago etc. right now the script scans the last 21 bars for the pattern."

ive told you the choices you have to accomplish this... if thats not what your trying to do then you are going to have to THOUGHROULY explain what it is your trying to accomplish because you sound like your contradicting yourself. sounds like your have some kind of concern on trying to scan bars ago and at the same time your trying to scan different time frames.
 
Last edited:
for all of them to be true under different time frames
I did not ask that . what I want to do is scan different ranges of time (10 bars ago, 11, bars ago, 12 bars ago) not time frames. having all the different ranges like in ur screenshot under one scanner will only output tickers that qualify for literally all of the filter time ranges.
 
you want to scan different ranges of time for what? you want to scan different ranges of what against what? what do you want to scan ranges of time against?
 
you want to scan different ranges of time for what? you want to scan different ranges of what against what? what do you want to scan ranges of time against?

so it sounded like you wanted them all in one scan and for all of them to be true under different time frames

No. I dont. I want to combine the results of all of them without having repeats, that's why I wanted it all under one script instead of individual filters
 
to see if it qualifys for the qualifications I had in the script I posted earlier.



my script...
without thorough explanation its hard to tell what your trying to do. your going to have to explain thoroughly. whats defines qualify? and if it qualifies what are you trying to do? your explanations earlier are too vague to interpret to be able to code or help.
 
without thorough explanation its hard to tell what your trying to do. your going to have to explain thoroughly. what's defines qualify? and if it qualifies what are you trying to do? your explanations earlier are too vague to interpret to be able to code or help.
What my script does is take a particular range of bars. in this case 21 bars, then takes the highest close and compares it to the the lowest close that comes after that high in this case in my picture it has to be greater than 3%. then takes that same low point that comes after the high and compares it to the first bar from the left (see picture) and make sure that it's greater than it. what my problem is tickers dont perfectly match my pattern, sometimes it shows in in the last 10 bars 11 bars 12 bars etc and instead of making multiple scanners which will create alot of emails because you would have tickers that qualify for the pattern in multiple time ranges creating alot of emails so I want it to be done under one script
8A5jh4A.png
 
so the pattern is:
21 bars, then takes the highest close and compares it to the the lowest close that comes after that high in this case in my picture it has to be greater than 3%. then takes that same low point that comes after the high and compares it to the first bar from the left (see picture) and make sure that it's greater than it.

so your code already scans for that pattern?

and if so what do you want it to do? how do you want to get it into one script? Define the criteria you want to use to get it into one script
 
so the pattern is:
21 bars, then takes the highest close and compares it to the the lowest close that comes after that high in this case in my picture it has to be greater than 3%. then takes that same low point that comes after the high and compares it to the first bar from the left (see picture) and make sure that it's greater than it.

so your code already scans for that pattern?

and if so what do you want it to do? how do you want to get it into one script? Define the criteria you want to use to get it into one script
it already is in one script and I already posted it but here it is

Code:
#--------------------------SCANNER CODE----------------------------------------------------------------------------
input length = 21;
input pct=3;
def corr=1+(pct/100);
def lastbar = if IsNaN(close[-1]) and !IsNaN(close) then BarNumber() else lastbar[1];
def from = (HighestAll(lastbar) - length);

def hi = if BarNumber() >= (HighestAll(lastbar) - length) and high > hi[1] then high else hi[1];
def hibar = if BarNumber() > (HighestAll(lastbar) - length) and high == hi then BarNumber() else hibar[1];

def lo = if BarNumber() > (HighestAll(hibar)) and  lo[1] == 0 then low else if BarNumber() > (HighestAll(hibar)) and low < lo[1] then low else lo[1];

def fhi=if !IsNaN(close) then high[20] else fhi[1];
def con= hi/lo>=corr and lo>0 and lo>fhi ;
plot scan=con;
what my problem is tickers dont perfectly match my pattern, sometimes it shows in in the last 10 bars 11 bars 12 bars etc and instead of making multiple scanners which will create alot of emails because you would have tickers that qualify for the pattern in multiple time ranges creating alot of emails so I want it to be done under one script
 
How do you want to get it into one script? Define the criteria you want to use to get it into one script
Condition1 = scan the last 10 bars for the pattern
Condition2 = scan for the last 11 bars for the pattern
Condition 3= scan the last 12 bars for the pattern

Plot scan =condition1 or condition2 or condition3

something like this
 
here is the code for your scan is True in the last 12 bars;

Code:
input length = 21;
input pct=3;
def corr=1+(pct/100);
def lastbar = if IsNaN(close[-1]) and !IsNaN(close) then BarNumber() else lastbar[1];
def from = (HighestAll(lastbar) - length);

def hi = if BarNumber() >= (HighestAll(lastbar) - length) and high > hi[1] then high else hi[1];
def hibar = if BarNumber() > (HighestAll(lastbar) - length) and high == hi then BarNumber() else hibar[1];

def lo = if BarNumber() > (HighestAll(hibar)) and  lo[1] == 0 then low else if BarNumber() > (HighestAll(hibar)) and low < lo[1] then low else lo[1];

def fhi=if !IsNaN(close) then high[20] else fhi[1];
def con= hi/lo>=corr and lo>0 and lo>fhi ;
def scan=con;
#true in last 12 bars
input barsago = 12;
def var =scan >=1;
def count = Sum(var, barsago);
plot finalscan = count >0;
 
here is the code for your scan is True in the last 12 bars;

Code:
input length = 21;
input pct=3;
def corr=1+(pct/100);
def lastbar = if IsNaN(close[-1]) and !IsNaN(close) then BarNumber() else lastbar[1];
def from = (HighestAll(lastbar) - length);

def hi = if BarNumber() >= (HighestAll(lastbar) - length) and high > hi[1] then high else hi[1];
def hibar = if BarNumber() > (HighestAll(lastbar) - length) and high == hi then BarNumber() else hibar[1];

def lo = if BarNumber() > (HighestAll(hibar)) and  lo[1] == 0 then low else if BarNumber() > (HighestAll(hibar)) and low < lo[1] then low else lo[1];

def fhi=if !IsNaN(close) then high[20] else fhi[1];
def con= hi/lo>=corr and lo>0 and lo>fhi ;
def scan=con;
#true in last 12 bars
input barsago = 12;
def var =scan >=1;
def count = Sum(var, barsago);
plot finalscan = count >0;
so I would have to keep repeating parts of it all the way from 10 to 20?
 
repeat what part of 10 or 20? and 10 or 20 of what? and to do what?
Condition1 = scan the last 10 bars for the pattern
Condition2 = scan for the last 11 bars for the pattern
Condition 3= scan the last 12 bars for the pattern

Plot scan =condition1 or condition2 or condition3

something like this

does it do this? or does it just scan for the last 12 bars like it normally would
 
the scan i posted scan each bar for the last 12 bars to see if the scan happened at the time of that bar.
in other words if at for the past 12 bars, if at ANY TIME within the last 12 bars your scan was true it will come up on the scanner
 
the scan i posted scan each bar for the last 12 bars to see if the scan happened at the time of that bar.
in other words if at for the past 12 bars, if at ANY TIME within the last 12 bars your scan was true it will come up on the scanner
bnGzhcA.jpg


AI came up in the results when it shouldn't have, I set it to scan the last 20 bars btw
 

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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