Daily High & Low line Previous Day/s. That's it...

RaisedOnMetal

New member
Hello.
I have searched for this basic study here and have not found this simple item - but instead I've found tons of super complex stuff (to me) that even after I try to fiddle with code (not a big tech guy here) it still is just all wrong. Just a lot of noise and is frustrating a bit if I'm honest. So I registered on this forum and want to see if someone can help here....

It is simple:
I ONLY day trade momentum runners using 1min, 5min, and Daily. That's it.

Every day I go to my Daily and, pending how stock is moving, will usually draw (click "$Price Level" from Drawings) a simple thin green line at top and at the bottom wicks on daily - sometimes I will do 2 or 3 days.
All I am wanting is a simple study that will just plot the previous DAY high/low (which I believe takes into account 4am-8pm - whatever the absolute max low/high was).
The line would go left and right full extension - just like when I manually add lines. The lines will continue into eternity horizontally - in other words in both directions, though perhaps someone else might prefer them in one direction. Often I see these studies that have all these zig zags and "chop". Or they just down vertically and all kinds of stuff. No. I just want basic horizontal forever-extending (left/right) "Price Level" style line (like from ToS drawings). Super basic. (already have a pre-market high/low so don't need anything else.
To be clear: If you were to pull open a flex grid 1min,5min and Daily on the same screen and you were to draw a horizontal (left/right) line on the last day or two from the previous Day High wick and Low wick, as seen from the Daily chart, I should (depending if it fits on time frame), also see this same line on my 1 and 5. That's it. Heck, if I were to pull up a monthly, 3min, 1 year or whatever - that same horizontal line would still be there immaterial of time frame - just as with a Drawing Price Level.
*Ideally, there could also be an option as to how many days I want plotted. In most cases I end up putting those lines manually for about 3-5 days worth of H/Ls. Often it is just one or two days. Sometimes just one day. Don't like excessive noise on my charts - only stuff immediately relevant to me for that day.
*Ideally, there could also be a price (mine is usually on left axis for all my horizontal "Price Level" lines from the Drawings which I manually put in. Heck you could - if you wanted - include the option to include the open and close also as I occasionally will use that though honestly not as much as you might think due to the volatility of parabolic runners and also my trade style. Still, could be nice as additional option to turn on if wanted as I will sometimes consider that. Of course if included, that line would also be the same "forever-horizontal line".
I do this manually every day and is a step I was hoping to automate....since every time I do it I am always thinking, "can't the computer just do this for me"?
THANK YOU computer experts out there for any assistance...have a nice day....
*******On second thought - please include the PRE-MARKET HIGH and LOW. I thought the one I had was good from someone's provided scripts but no - there are squiggly lines everywhere. Just need a basic left/right horizontal line at that top/bottom price - same type as above. Can't believe this is that difficult. Thx for help or pls direct me where I can go to get info....
 
Last edited:
Solution
Hello.
I have searched for this basic study here and have not found this simple item - but instead I've found tons of super complex stuff (to me) that even after I try to fiddle with code (not a big tech guy here) it still is just all wrong. Just a lot of noise and is frustrating a bit if I'm honest. So I registered on this forum and want to see if someone can help here....

It is simple:
I ONLY day trade momentum runners using 1min, 5min, and Daily. That's it.

Every day I go to my Daily and, pending how stock is moving, will usually draw (click "$Price Level" from Drawings) a simple thin green line at top and at the bottom wicks on daily - sometimes I will do 2 or 3 days.
All I am wanting is a simple study that will just plot...
Hello.
I have searched for this basic study here and have not found this simple item - but instead I've found tons of super complex stuff (to me) that even after I try to fiddle with code (not a big tech guy here) it still is just all wrong. Just a lot of noise and is frustrating a bit if I'm honest. So I registered on this forum and want to see if someone can help here....

It is simple:
I ONLY day trade momentum runners using 1min, 5min, and Daily. That's it.

Every day I go to my Daily and, pending how stock is moving, will usually draw (click "$Price Level" from Drawings) a simple thin green line at top and at the bottom wicks on daily - sometimes I will do 2 or 3 days.
All I am wanting is a simple study that will just plot the previous DAY high/low (which I believe takes into account 4am-8pm - whatever the absolute max low/high was).
The line would go left and right full extension - just like when I manually add lines. The lines will continue into eternity horizontally - in other words in both directions, though perhaps someone else might prefer them in one direction. Often I see these studies that have all these zig zags and "chop". Or they just down vertically and all kinds of stuff. No. I just want basic horizontal forever-extending (left/right) "Price Level" style line (like from ToS drawings). Super basic. (already have a pre-market high/low so don't need anything else.
To be clear: If you were to pull open a flex grid 1min,5min and Daily on the same screen and you were to draw a horizontal (left/right) line on the last day or two from the previous Day High wick and Low wick, as seen from the Daily chart, I should (depending if it fits on time frame), also see this same line on my 1 and 5. That's it. Heck, if I were to pull up a monthly, 3min, 1 year or whatever - that same horizontal line would still be there immaterial of time frame - just as with a Drawing Price Level.
*Ideally, there could also be an option as to how many days I want plotted. In most cases I end up putting those lines manually for about 3-5 days worth of H/Ls. Often it is just one or two days. Sometimes just one day. Don't like excessive noise on my charts - only stuff immediately relevant to me for that day.
*Ideally, there could also be a price (mine is usually on left axis for all my horizontal "Price Level" lines from the Drawings which I manually put in. Heck you could - if you wanted - include the option to include the open and close also as I occasionally will use that though honestly not as much as you might think due to the volatility of parabolic runners and also my trade style. Still, could be nice as additional option to turn on if wanted as I will sometimes consider that. Of course if included, that line would also be the same "forever-horizontal line".
I do this manually every day and is a step I was hoping to automate....since every time I do it I am always thinking, "can't the computer just do this for me"?
THANK YOU computer experts out there for any assistance...have a nice day....
*******On second thought - please include the PRE-MARKET HIGH and LOW. I thought the one I had was good from someone's provided scripts but no - there are squiggly lines everywhere. Just need a basic left/right horizontal line at that top/bottom price - same type as above. Can't believe this is that difficult. Thx for help or pls direct me where I can go to get info....

This will provide the last 5 day's highs/lows, excluding today. You can limit the number of plots and change their colors at the input screen.
Optional bubbles are included.

Snip.png
Ruby:
#Highs/Lows using volumeprofile profilehighs/profilelows extended across chartType.AREA
#Input selection to limit plots to number entered

script hl{
input days=1;
def ymd = GetYYYYMMDD();
def candles  = !IsNaN(close);
def capture  = candles and ymd != ymd[1];
def dayCount = CompoundValue(1, if capture then dayCount[1] + 1 else dayCount[1], 0);
plot thisday  = (HighestAll(dayCount) - dayCount) ;

def bars   = 2000;

input pricePerRowHeightMode = { AUTOMATIC, default TICKSIZE, CUSTOM};
input customRowHeight = 1.0;
input timePerProfile = {default BAR};
input onExpansion = no;
input profiles = 1000;

def period;

switch (timePerProfile) {
case BAR:
    period = BarNumber() - 1;
}


def count = CompoundValue(1, if thisday==thisday[1] and period != period[1] then (count[1] + period - period[1]) % bars else count[1], 0);
def cond = count < count[1] + period - period[1];
def height;
switch (pricePerRowHeightMode) {
case AUTOMATIC:
    height = PricePerRow.AUTOMATIC;
case TICKSIZE:
    height = PricePerRow.TICKSIZE;
case CUSTOM:
    height = customRowHeight;
}

profile vol = VolumeProfile("startNewProfile" = cond, "onExpansion" = no, "numberOfProfiles" = 1000, "pricePerRow" = height, "value area percent" = 0);
def con = CompoundValue(1, onExpansion, no);

def hProfile = if thisday==days and IsNaN(vol.GetHighest()) and con then hProfile[1] else vol.GetHighest();
def lProfile = if thisday==days and IsNaN(vol.GetLowest()) and con then lProfile[1] else vol.GetLowest();
def plotsDomain = IsNaN(close) == onExpansion;
def ProfileHigh = if isnan(close) then profilehigh[1] else if thisday==days and plotsDomain then hProfile else Double.NaN;
def ProfileLow = if thisday==days and plotsDomain then lProfile else Double.NaN;

plot hrange = highestall(ProfileHigh);
plot lrange = highestall(ProfileLow);
hrange.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
lrange.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
hrange.SetDefaultColor(Color.GREEN);
lrange.SetDefaultColor(Color.RED);
hrange.SetLineWeight(2);
lrange.SetLineWeight(2);
}

defineGlobalColor("H", color.green);
defineGlobalColor("L", color.red);

input showplots = 2;

plot H1 = if showplots>=1 then hl(1).hrange else double.nan;
plot H2 = if showplots>=2 then hl(2).hrange else double.nan;
plot H3 = if showplots>=3 then hl(3).hrange else double.nan;
plot H4 = if showplots>=4 then hl(4).hrange else double.nan;
plot H5 = if showplots>=5 then hl(5).hrange else double.nan;


plot L1 = if showplots>=1 then hl(1).lrange else double.nan;
plot L2 = if showplots>=2 then hl(2).lrange else double.nan;
plot L3 = if showplots>=3 then hl(3).lrange else double.nan;
plot L4 = if showplots>=4 then hl(4).lrange else double.nan;
plot L5 = if showplots>=5 then hl(5).lrange else double.nan;

H1.setdefaultColor(globalColor("H"));
H2.setdefaultColor(globalColor("H"));
H3.setdefaultColor(globalColor("H"));
H4.setdefaultColor(globalColor("H"));
H5.setdefaultColor(globalColor("H"));


L1.setdefaultColor(globalColor("L"));
L2.setdefaultColor(globalColor("L"));
L3.setdefaultColor(globalColor("L"));
L4.setdefaultColor(globalColor("L"));
L5.setdefaultColor(globalColor("L"));


input bubblemover = 0;
def b  = bubblemover;
def b1 = b + 1;

input showbubbles = yes;
AddChartBubble(showbubbles and isnan(close[b]) and !IsNaN(close[b1]), H1[b] ,"H1-" +  AsText(h1[b1]), H1.takevalueColor() );
AddChartBubble(showbubbles and isnan(close[b]) and !IsNaN(close[b1]), H2[b] ,"H2-" +  AsText(h2[b1]), H2.takevalueColor() );
AddChartBubble(showbubbles and isnan(close[b]) and !IsNaN(close[b1]), H3[b] ,"H3-" +  AsText(h3[b1]), H3.takevalueColor() );
AddChartBubble(showbubbles and isnan(close[b]) and !IsNaN(close[b1]), H4[b] ,"H4-" +  AsText(h4[b1]), H4.takevalueColor() );
AddChartBubble(showbubbles and isnan(close[b]) and !IsNaN(close[b1]), H5[b] ,"H5-" +  AsText(h5[b1]), H5.takevalueColor() );

AddChartBubble(showbubbles and isnan(close[b]) and !IsNaN(close[b1]) , L1[b],  "L1-" + AsText(l1[b1]), L1.takevalueColor(), no);
AddChartBubble(showbubbles and isnan(close[b]) and !IsNaN(close[b1]) , L2[b],  "L2-" + AsText(l2[b1]), L2.takevalueColor(), no);
AddChartBubble(showbubbles and isnan(close[b]) and !IsNaN(close[b1]) , L3[b],  "L3-" + AsText(l3[b1]), L3.takevalueColor(), no);
AddChartBubble(showbubbles and isnan(close[b]) and !IsNaN(close[b1]) , L4[b],  "L4-" + AsText(l4[b1]), L4.takevalueColor(), no);
AddChartBubble(showbubbles and isnan(close[b]) and !IsNaN(close[b1]) , L5[b],  "L5-" + AsText(l5[b1]), L5.takevalueColor(), no);
 
Solution

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