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!
 
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
this is strictly counting from the right correct?? if the pattern appears in the middle of the range it wont come up right?
 
i dont know what your definition of "middle" is... all i know is that the code i added per your request scans for your pattern at ANYTIME it occurred within the last 12 bars. (or as you would say, starting the count from right to left)
 
one more thing
i dont know what your definition of "middle" is... all i know is that the code i added per your request scans for your pattern at ANYTIME it occurred within the last 12 bars. (or as you would say, starting the count from right to left)
HufJHLr.jpg

one more thing is it possible to take the highest point in a given range and compare it with the current candle but make the code scan along side the conditions for example
Code:
Condition1 = scan the last 10 bars for the pattern and make sure the current price is within 1% of the 10 period high
Condition2 = scan for the last 11 bars for the pattern  and make sure the current price is within 1% of the 11 period high
Condition 3= scan the last 12 bars for the pattern and  make sure the current price is within 1% of the 12 period high

Plot scan =condition1 or condition2 or condition3
 
here is the code for
Current price is within 1% of the 10 period high
Code:
def x = highest(high,10);
def x_scan_value = absValue((close - x) / x)*100;
plot Periodhigh10 = x_scan_value<1;

ill let you do the rest however your example of
Condition1 = scan the last 10 bars for the pattern and make sure the current price is within 1% of the 10 period high
would be as follows

you would take the code i gave you previously and do the following:

Code:
plot finalscan = count >0 and x_scan_value<1;


for a final code of: (10 bar scan for patter and make sure price within 1% of 10 period high)

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 10 bars
input barsago = 10;
def var =scan >=1;
def count = Sum(var, barsago);
def finalscan = count >0;

def x = highest(high,10);
def x_scan_value = absValue((close - x) / x)*100;
plot Periodhigh10 = count > 0 and x_scan_value<1;

im sorry but im not going to have time for such a intricate scan, you somehow got me too far into it already, like i said this code would be time consuming, good luck.
 
Last edited:
here is the code for
Current price is within 1% of the 10 period high
Code:
def x = highest(high,10);
def x_scan_value = absValue((close - x) / x)*100;
plot Periodhigh10 = x_scan_value<1;

ill let you do the rest however your example of
Condition1 = scan the last 10 bars for the pattern and make sure the current price is within 1% of the 10 period high
would be as follows

you would take the code i gave you previously and do the following:

Code:
plot finalscan = count >0 and x_scan_value<1;


for a final code of: (10 bar scan for patter and make sure price within 1% of 10 period high)

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 10 bars
input barsago = 10;
def var =scan >=1;
def count = Sum(var, barsago);
def finalscan = count >0;

def x = highest(high,10);
def x_scan_value = absValue((close - x) / x)*100;
plot Periodhigh10 = count > 0 and x_scan_value<1;

im sorry but im not going to have time for such a intricate scan, you somehow got me too far into it already, like i said this code would be time consuming, good luck.
I would have to start medeeling with the "VAR" to get what im trying to do right?
 
depends on what your attempting to accomplish. i would suggest you using trial and error and some reading if you plan on learning.
im attempting to accomplish
Code:
Condition1 = scan the last 10 bars for the pattern and make sure the current price is within 1% of the 10 period high
Condition2 = scan for the last 11 bars for the pattern  and make sure the current price is within 1% of the 11 period high
Condition 3= scan the last 12 bars for the pattern and  make sure the current price is within 1% of the 12 period high
Plot scan =condition1 or condition2 or condition3
 
depends on what your attempting to accomplish. i would suggest you using trial and error and some reading if you plan on learning.
I think I got it!! is it this?

Code:
#true in last 10 bars
def x = highest(high,10);
def x_scan_value = absValue((close - x) / x)*100;
input barsago = 21;
def var =scan >=1;
def count = Sum(var and x_scan_value, barsago);
def finalscan = count >0;
 
@booboo Not to be rude, but if you take the time, I'm pretty sure 90% of what you are attempting to do I explained on this thread. In my opinion most of what you requested and keep asking over and over in a different way was referenced in post #45. The rest has been explained how it works in the rest of this thread. In my opinion with some careful reading and trial and error you should be able to accomplish what you are attempting to do. As I stated earlier I'm sorry but I'm not going to have time for such a intricate scan that repetitively is the same thing over and over just different lengths when I explained how you can resolve/code your script issues. At that point if you cant figure it out you may want to consider hiring a professional coder to code a custom lengthy script/algo or you can hope someone is generous enough to spend few hours or days helping you code it.

Note: if you PLOT the final scan in the lower study (below the chart) you can see its results of what you have coded.
 

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
436 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