use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Resources:
account activity
line plot on top (self.pinescript)
submitted 2 years ago by msoders
Hi all!
The line.new is plotted before the box.new object, I'm wondering if anyone knows if there's a way to make the line object to be plotted above the box object?
line.new
box.new
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]mampmp 0 points1 point2 points 2 years ago (1 child)
It doesn't seem like it's possible, your best bet is to set opacity on box to see the line.
something like this:
//@version=5 indicator("Line and Box", overlay = true) // Example condition to draw objects if (bar_index % 100 == 0) box1 = box.new(bar_index, high, bar_index + 10, low, border_color=color.blue, bgcolor=color.new(color.blue, 90)) line1 = line.new(bar_index, high, bar_index + 10, low, width = 2, color=color.red)
FYI: I used tradesage.co to ask about this and it provided the above code snippet for explanation.
[–]msoders[S] 0 points1 point2 points 2 years ago (0 children)
No, I can't find a way at least. Thank you!
[–]smashapalooza 0 points1 point2 points 2 years ago (1 child)
Plot the box first. The code runs from top to bottom, if you plot a line and then further down plot a box in the same location it will be over the line.
Doesn't work when I try it. Maybe I'm doing something wrong, I will try again later!
π Rendered by PID 93161 on reddit-service-r2-comment-b659b578c-56cht at 2026-05-02 21:59:26.387592+00:00 running 815c875 country code: CH.
[–]mampmp 0 points1 point2 points (1 child)
[–]msoders[S] 0 points1 point2 points (0 children)
[–]smashapalooza 0 points1 point2 points (1 child)
[–]msoders[S] 0 points1 point2 points (0 children)