plot 4 lines daily at a specific time

Turboguru

New member
Is there an indicator that can plot 4 lines daily at a specific time of day from Monday to Monday.

So if I want a line at 2am, 5am, 8am and 9am on Monday.
Then Tuesday one at 3am, 6am, 9am and 10am.

There might be one already out there so not sure what it would be called to look for it. Would like to be able to hide certain days if it gets to busy on charts. Thank you for any help.
 
Solution
Is there an indicator that can plot 4 lines daily at a specific time of day from Monday to Monday.

So if I want a line at 2am, 5am, 8am and 9am on Monday.
Then Tuesday one at 3am, 6am, 9am and 10am.

There might be one already out there so not sure what it would be called to look for it. Would like to be able to hide certain days if it gets to busy on charts. Thank you for any help.

Try this

Screenshot 2023-08-18 121431.png
#So if I want a line at 2am, 5am, 8am and 9am on Monday.
#Then Tuesday one at 3am, 6am, 9am and 10am.

input price = close;
input extendlines = yes;
input time0200 = 0200;
input time0300 = 0300;
input time0500 = 0500;
input time0600 = 0600;
input time0800 = 0800;
input time0900 = 0900;
input time1000 = 1000;
def bn =...
Is there an indicator that can plot 4 lines daily at a specific time of day from Monday to Monday.

So if I want a line at 2am, 5am, 8am and 9am on Monday.
Then Tuesday one at 3am, 6am, 9am and 10am.

There might be one already out there so not sure what it would be called to look for it. Would like to be able to hide certain days if it gets to busy on charts. Thank you for any help.

Try this

Screenshot 2023-08-18 121431.png
#So if I want a line at 2am, 5am, 8am and 9am on Monday.
#Then Tuesday one at 3am, 6am, 9am and 10am.

input price = close;
input extendlines = yes;
input time0200 = 0200;
input time0300 = 0300;
input time0500 = 0500;
input time0600 = 0600;
input time0800 = 0800;
input time0900 = 0900;
input time1000 = 1000;
def bn = BarNumber();

#Monday's Lines
def Monday = if GetDayOfWeek(GetYYYYMMDD()) == 1 and SecondsFromTime(1800) > 0
then Double.NaN
else if GetDayOfWeek(GetYYYYMMDD()) == 1
then 1
else Double.NaN;

def Line0200 = if GetWeek() == GetLastWeek() and Monday and SecondsFromTime(time0200) == 0 then price else Double.NaN;
def Bar0200 = if GetWeek() == GetLastWeek() and Monday and SecondsFromTime(time0200) == 0 then bn else Double.NaN;
plot Monday_Line0200 = if bn >= HighestAll(Bar0200) then HighestAll(Line0200) else Double.NaN;
def Line0500 = if GetWeek() == GetLastWeek() and Monday and SecondsFromTime(time0500) == 0 then price else Double.NaN;
def Bar0500 = if GetWeek() == GetLastWeek() and Monday and SecondsFromTime(time0500) == 0 then bn else Double.NaN;
plot Monday_Line0500 = if bn >= HighestAll(Bar0500) then HighestAll(Line0500) else Double.NaN;
def Line0800 = if GetWeek() == GetLastWeek() and Monday and SecondsFromTime(time0800) == 0 then price else Double.NaN;
def Bar0800 = if GetWeek() == GetLastWeek() and Monday and SecondsFromTime(time0800) == 0 then bn else Double.NaN;
plot Monday_Line0800 = if bn >= HighestAll(Bar0800) then HighestAll(Line0800) else Double.NaN;
def Line0900 = if GetWeek() == GetLastWeek() and Monday and SecondsFromTime(time0900) == 0 then price else Double.NaN;
def Bar0900 = if GetWeek() == GetLastWeek() and Monday and SecondsFromTime(time0900) == 0 then bn else Double.NaN;
plot Monday_Line0900 = if bn >= HighestAll(Bar0900) then HighestAll(Line0900) else Double.NaN;

#Monday's Lines
def Tuesday = if GetDayOfWeek(GetYYYYMMDD()) == 2 and SecondsFromTime(1800) > 0
then Double.NaN
else if GetDayOfWeek(GetYYYYMMDD()) == 2
then 1
else Double.NaN;

def L0300 = if GetWeek() == GetLastWeek() and Tuesday and SecondsFromTime(time0300) == 0 then price else Double.NaN;
def B0300 = if GetWeek() == GetLastWeek() and Tuesday and SecondsFromTime(time0300) == 0 then bn else Double.NaN;
plot Tuesday_Line0200 = if bn >= HighestAll(B0300) then HighestAll(L0300) else Double.NaN;
def L0600 = if GetWeek() == GetLastWeek() and Tuesday and SecondsFromTime(time0600) == 0 then price else Double.NaN;
def B0600 = if GetWeek() == GetLastWeek() and Tuesday and SecondsFromTime(time0600) == 0 then bn else Double.NaN;
plot Tuesday_Line0600 = if bn >= HighestAll(B0600) then HighestAll(L0600) else Double.NaN;
def L0900 = if GetWeek() == GetLastWeek() and Tuesday and SecondsFromTime(time0900) == 0 then price else Double.NaN;
def B0900 = if GetWeek() == GetLastWeek() and Tuesday and SecondsFromTime(time0900) == 0 then bn else Double.NaN;
plot Tuesday_Line0900 = if bn >= HighestAll(B0900) then HighestAll(L0900) else Double.NaN;
def L1000 = if GetWeek() == GetLastWeek() and Tuesday and SecondsFromTime(time1000) == 0 then price else Double.NaN;
def B1000 = if GetWeek() == GetLastWeek() and Tuesday and SecondsFromTime(time1000) == 0 then bn else Double.NaN;
plot Tuesday_Line1000 = if bn >= HighestAll(B1000) then HighestAll(L1000) else Double.NaN;


#
 
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
341 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