Recurring comparison of histogram bars
Forums › ProRealTime English forum › ProBuilder support › Recurring comparison of histogram bars
- This topic has 7 replies, 3 voices, and was last updated 4 days ago by
JS.
-
-
10/27/2025 at 1:55 PM #253084
I take my cue from the “ATR percentile rank” indicator created by Nicolas and published at
https://www.prorealcode.com/prorealtime-indicators/atr-percentile-rank/In indicators represented graphically with a histogram, in which the value of a bar is compared with the data for the same bar from previous days, reading would be easier and more immediate if the bars useful for this comparison were highlighted compared to the other bars in the histogram.
One possibility is to apply a different level of transparency to these bars than to all the others.
An alternative could be to connect the upper ends of the relevant bars with a segment.
The image, taken from another situation, shows both possibilities (ignoring the numerical data).
https://i.postimg.cc/bJHnmknV/Istogramma.jpgSince some of my attempts to achieve this goal have not been successful, I would appreciate any suggestions or guidance on how to achieve this result.
Thank you very much.
10/27/2025 at 3:44 PM #253087What are the conditions to link any specific bar to another one?
10/27/2025 at 4:21 PM #253088Assuming that the current bar (day 0) is the one at 4:15 p.m., the value of that bar must be compared with the bar at 4:15 p.m. yesterday (day 1), the bar at 4:15 p.m. the day before yesterday (day 2), and so on, up to the lookback period if possible.
The comparison should work with any timeframe, ideally from one minute to one hour. On too short timeframes, the comparison makes sense when using an average. For example, with a 3-minute timeframe, the 5-period average would allow rolling calculations on bars that combined make up a 15-minute band, thus avoiding the problem of losing the meaning of a comparison of a single 3-minute bar with its counterparts from previous days.10/27/2025 at 5:01 PM #25309310/28/2025 at 3:04 AM #253104There will be issues on Monday, because on Friday there were less bars than usual due to the weekly closing of the markets.
10/28/2025 at 5:33 PM #253116Is there a way to use the OpenMinute and OpenHour commands with reference to previous days? Something that produces a “synthetic” effect like OpenMinute[1] and OpenHour[1].
This would allow for a consistent comparison (for Friday’s discussion and similar cases, the code could made such to call up the previous bar).
I tried it, but got an error message. Maybe, however, with a trick… or could it be an interesting addition to the list of ProBuilder commands?
Thank you very much for your support.10/28/2025 at 10:25 PM #253121Yes, in the example above replace CLOSE with other data you need:
12Yester = OpenMinute[N]Curr = OpenMinute1 user thanked author for this post.
10/29/2025 at 6:54 AM #253122Hi,
Maybe this can help…?
Comparison data1234567891011121314DefParam DrawOnLastBarOnly=TrueGTF=GetTimeFramen=86400/GTFCurrentClose=ClosePrevClose=Close[n]Diff=(CurrentClose/PrevClose-1)*100DrawSegment(BarIndex,Close,BarIndex-n,Close[n])DrawText("Diff=#Diff#%",BarIndex,Close+Range)Return1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on 