previous week high low

shih90

Member
VIP
I need help to showing (display) every day in the current week of previous week high low horizontal lines
Thanks

yes I've been try this but it shows everyday in 5 min and above frametime , in 4th & 5th day it won't show anymore 2 min frametime (Only shows above 5 min frametime. I need this to see 2 min frametime . That's the one I work everyday.
Thanks

What I want is last week high low lines showing on current week in 2 min frame time on 4th & 5th( now only showing only 1st of 3 days in 2 min frame time and last 2 days 4th & 5th are not display it) day of current week too. You can test it so you can understand what I mean.
Thanks a lot if it can be solve.

previous week high low to display 2 min chart in new week.
 
Last edited by a moderator:
Solution
previous week high low to display 2 min chart in new week.

this plots 2 lines, over the current week, at highest and lowest levels, from the previous week.


Code:
# prev_week_hilo

#https://usethinkscript.com/threads/previous-week-high-low.17984/#post-138261
#previous week high low to display 2 min chart in new week.

def na = double.nan;
def bn = barnumber();

def agg = aggregationperiod.week;
def prev_wk_hi = high(period = agg)[1];
def prev_wk_lo = low(period = agg)[1];
def isweek = getweek() == getlastweek();

plot zhi = if isweek then prev_wk_hi else na;
plot zlo = if isweek then prev_wk_lo else na;
zhi.SetDefaultColor(Color.cyan);
zhi.setlineweight(1);
zhi.hidebubble();
zlo.SetDefaultColor(Color.cyan);
zlo.setlineweight(1)...
previous week high low to display 2 min chart in new week.

this plots 2 lines, over the current week, at highest and lowest levels, from the previous week.


Code:
# prev_week_hilo

#https://usethinkscript.com/threads/previous-week-high-low.17984/#post-138261
#previous week high low to display 2 min chart in new week.

def na = double.nan;
def bn = barnumber();

def agg = aggregationperiod.week;
def prev_wk_hi = high(period = agg)[1];
def prev_wk_lo = low(period = agg)[1];
def isweek = getweek() == getlastweek();

plot zhi = if isweek then prev_wk_hi else na;
plot zlo = if isweek then prev_wk_lo else na;
zhi.SetDefaultColor(Color.cyan);
zhi.setlineweight(1);
zhi.hidebubble();
zlo.SetDefaultColor(Color.cyan);
zlo.setlineweight(1);
zlo.hidebubble();
#
 

Attachments

  • img2.JPG
    img2.JPG
    100.9 KB · Views: 48
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
454 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