Monthly range and january/july range

Forums ProRealTime English forum ProBuilder support Monthly range and january/july range

Viewing 7 posts - 1 through 7 (of 7 total)
  • #116610

    Good morning,

    i’d like to code an indicator which shows two different ranges:

    • the first draws two parallel dotted lines corresponding to the high and the low of the first candle of each month, so the lines are one month long.
    • the second draws two parallel dotted lines corresponding to the high and the low of the first ten days of january and july, so the lines are one year long.

    Please, see the attached picture for a better understanding.

     

    Is this possible to code??

    Thank you and have a nice day.

    #116624

    There you go.

    This is for v10.3 (no dotted lines):

    If you have version 11 and want to plot dotted lines, then replace the DRAWSEGMENT lines with:

     

     

    1 user thanked author for this post.
    #116637

    Awesome! Thank you very much Roberto!

    Just one little thing: it looks like that for the january/july range it takes into consideration just the first six candles ( instead of ten) to estabilish the high and the low.

     

    I gave a look at the code but can’t find anything that could lead to that.

    #116638

    You wrote the first 10 days, not the first 10 trading days.

    I’ll add a counter to achieve that, asap.

    #116640

    Oops, sorry for the imprecision!

    #116653

    This is the version for the first 10 trading days:

    for v11 you need to replace the same lines as before (they are not affected by modifications).

     

    1 user thanked author for this post.
    #116655

    Works perfectly, thank you so much Roberto!

     

    Have a nice day!

Viewing 7 posts - 1 through 7 (of 7 total)

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