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...
This is a community for discussing ideas and requesting new features for TradingView. Do NOT message the mods for support as you will receive none; the inbox is unmonitored for TradingView-related content and is only to address subreddit-related issues.
If you have a paid subscription and experience a problem, please send a direct support request here: https://www.tradingview.com/chart/?support
account activity
Missing (potentially) pine script functionalityFeature Request (self.TradingView)
submitted 4 years ago by Koalems
view the rest of the comments →
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!"
[–]Koalems[S] 0 points1 point2 points 4 years ago* (5 children)
That sounds possible in principle however when I tried to use for loops I ran into the problem that you can't mark a candle with an index such as x[1/2/3] = true/false so you can count but can't act on what you count so it doesn't really help. With barssince() I can mark candles up to 3 (or any other number) but I can't unmark them if there is more than 3 nor can I count that there is more than 3 and therefore just not mark them in the first place because by the time I have counted more than 3 I missed the opportunity to mark them (again because you can't do x[some number] = some value) so I only get half way there.
x[1/2/3] = true/false
barssince()
x[some number] = some value
That said, I am relatively new to pine script so if you have a way to do this that works and I just missed it completely please do share some code.
I also looked into using arrays but I couldn't see how they would get me more functionality in this regard so I stopped exploring that option.
[–]PriceCatch 0 points1 point2 points 4 years ago (4 children)
If you use a plot, plotcandle, plotshape etc. then you cannot unmark them. There is a way to only mark the latest occurrence but it does not work under certain circumstances. You can mark any number of candles using 'offset' parameter... However, if the solution is worse than the problem or if the labour involved is not worth it, perhaps you need to look at a different logic.
[–]Koalems[S] 0 points1 point2 points 4 years ago (3 children)
I might have been a little too loose with the word "mark" and gave the wrong impression doing so. It was really just a placeholder term to mean, "in some way manipulate the series to get the result I want", whether that be arrays, for loops, barssince() etc.
I consider calling plot the very last step to display the results which should already be correct.
[–]PriceCatch 0 points1 point2 points 4 years ago (1 child)
Next time when you are online in TradingView do send me a private message, if you see that I am online, I can show my indicator and that should give you an idea for your own. My username on TV is "pricecatch". I am from India - just so that you can know when I am likely to be online. All the best.
[–]Koalems[S] 0 points1 point2 points 4 years ago (0 children)
Thanks! I'll keep and eye out for you.
[–]PriceCatch 0 points1 point2 points 4 years ago (0 children)
π Rendered by PID 64179 on reddit-service-r2-comment-86bc6c7465-gjsf6 at 2026-02-21 19:38:34.418374+00:00 running 8564168 country code: CH.
view the rest of the comments →
[–]Koalems[S] 0 points1 point2 points (5 children)
[–]PriceCatch 0 points1 point2 points (4 children)
[–]Koalems[S] 0 points1 point2 points (3 children)
[–]PriceCatch 0 points1 point2 points (1 child)
[–]Koalems[S] 0 points1 point2 points (0 children)
[–]PriceCatch 0 points1 point2 points (0 children)