3
3AMBH
Guest
Is it possible to add vertical time lines to a Tick Chart? I want to see 5 minute vertical lines placed on a tick chart. My idea is to see price action "inside" a 5 minute Candle.
declare upper;
input time_interval = 10;
def x = (getTime() % (60 * time_interval * 1000));
addVerticalLine(x < x[1], "", color.gray);
declare upper;
input time_interval = 10;
def x = (getTime() % (60 * time_interval * 1000));
addVerticalLine(x < x[1], "", color.gray);
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
the same way as above:Is it also able to have horizontal line opening of a 5 min time to be shown on a tick chart
def vlo = if x < x[1] then open else vlo[1];
plot vertical_line_open = vlo;
vertical_line_open.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Is the code in the previous post not working? I thought that was already covered.Hey is it possible to print a horizontal line at the opening price of each interval?
No, it prints just the vertical lines. Not horizontal.Is the code in the previous post not working? I thought that was already covered.
-mashume
Post #4No, it prints just the vertical lines. Not horizontal.
def hlo = if x < x[1] then open else hlo[1];
plot horizontal_line_open = hlo;
horizontal_line_open.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Hello, how can I add what timeline it is? I tried to get it but was unsuccessful. Meaning like 5min showing on the line vertical.It should be something like this:
but you'll have to make sure it's doing what you think it is. Time Interval is in minutes.Code:declare upper; input time_interval = 10; def x = (getTime() % (60 * time_interval * 1000)); addVerticalLine(x < x[1], "", color.gray);
addVerticalLine(x < x[1], asText(time_interval) + " min", color.gray);
Thank you much!maybe change the last line to this:
Code:addVerticalLine(x < x[1], asText(time_interval) + " min", color.gray);
not completely confident in this as it's just from memory and not tested in ToS. Also hoping that's the info you're looking for.
-mashume
Sorry, was in a rush earlier when I put it in. it works just fine!Hmmm... Can you describe in a bit more detail what it is you're looking for the script to do? Perhaps take a screenshot and put some text on it to illustrate?
-mashume
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
C | add rolling 5 day vertical line | Questions | 1 | |
S | add vertical line when it ending | Questions | 7 | |
F | Add vertical line to chart | Questions | 1 | |
D | Add Vertical Line | Questions | 1 | |
D | Add 2% +/- | Questions | 0 |
Start a new thread and receive assistance from our community.
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.
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.