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 avatarJS.
Viewing 8 posts - 1 through 8 (of 8 total)
  • #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.jpg

    Since 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.

    #253087

    What are the conditions to link any specific bar to another one?

     

    #253088

    Assuming 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.

    #253093

    You have to set the number of bars in a day and compare the current close:

    2 users thanked author for this post.
    #253104

    There will be issues on Monday, because on Friday there were less bars than usual due to the weekly closing of the markets.

     

    #253116

    Is 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.

    #253121

    Yes, in the example above replace CLOSE with other data you need:

    1 user thanked author for this post.
    #253122
    JS

    Hi,

    Maybe this can help…?

     

    1 user thanked author for this post.
Viewing 8 posts - 1 through 8 (of 8 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login