Smaller Timeframe drawline/rectangle issues

Forums ProRealTime English forum ProBuilder support Smaller Timeframe drawline/rectangle issues

Viewing 9 posts - 1 through 9 (of 9 total)
  • #75715

    Hello, i have a piece of code that i have assembled/Frankensteined, it works well on hourly and above, but when i swap down to lower timeframes something odd happens,

    the problem is with the drawing the lines and rectangle, when i move to a smaller timeframe they either dont draw, or the vertical axis is way out?

    I apologize for the messy code, i am no professional

     

    #75721

    Because Y coordinates are in price format, you have to adapt them (automatically?) in order to get them properly displayed right where you want them to be (close to these lines I guess).

    #75724

    Hi,

    Thanks for your quick reply, can you elaborate a bit i thought they were in price? or know of any example code i can decipher?

    #75728

    In this line you are adding text 10 points away from the “bltr” line:

    While it is close to the line on a larger timeframe, it could be far away on a very small one (or if you zoom in on the chart).

    A rough solution could be to adapt this spread automatically with an indicator value in points, like the ATR for instance:

     

    #75732

    Ok i see what you mean,

    but all that did was change the text position on the hourly, it had no effect on smaller timeframes,

    i think the problem lies with not calculating the “daysopen” (the open price at 1600 which is pretty close to close price at 1500) on smaller timeframes.

    How would you normally draw a rectangle that starts at a specific time, then +/- percentage of price?

    #75741

    Since you are calculating daily ATR of 20 periods, sufficient bars units are also necessary to compute it correctly. For example, in a 1 minute timeframe, at least 28.800 bars are needed.

    #75746

    Ahhh now we are onto it, that seems to work thanks!,

    i don’t suppose there is an easy way to get past this? rather than loading 10000 bars in a smaller timeframe?

    it seems amibroker AFL is much easier to code with,

    #75747

    That’s how it goes since we don’t have any multi timeframe capabilities with ProBuilder. To get higher timeframes OHLC, we must load sufficient data in the current timeframe.

    #75749

    Thankyou for your help 🙂

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

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