TIMEFRAME magnitude precedence?

Forums ProRealTime English forum ProBuilder support TIMEFRAME magnitude precedence?

Viewing 4 posts - 1 through 4 (of 4 total)
  • #164756

    Hello, this is my first posting here so please accept my apologies in advance if I accidentally fluff up any of the forum’s procedures. I’m not sure if this is something “everybody already knows”, or an “undocumented feature”, or just my own dumb coding failure.

    I cobbled together some code to test an idea. The idea involves comparing the status of an indicator across two different timeframes, in this case the 15 minute and the 1 hour timeframes. The indicator I’m aiming for would display in the 15 minute timeframe window, so checking that the 15 minute status matches the containing 1 hour status.

    Anyway, the code I wrote looks (something) like this:

    This seems to work.. except it only puts the up arrow on the first bar of the hour where the condition matches even if the conditions are met on other bars in the same hour. If I reverse the order of the timeframes to look like this:

    it will draw up arrows under all the bars that match the required conditions.

    The question I have is, is this a “known feature” of PRT code, that you have to reference timeframes in a certain order? Or, that you have to use the current timeframe as the last operation?

    I’ve looked in the documentation and can’t find any warning about what order timeframes should be used in, or whether they need to be “reset” to the current working timeframe.Have I missed something or is there some further additional documention about the TIMEFRAME call that explains this sort of thing?

    Any advice, or clarification is appreciated.

    #164758

    Your assumption about your first example is wrong, it plots an arrow whenever the condition is met on 15-minute, 5-minute and 1-minute TF’s with the code:

    The same for the second example (with a different output):

    The rule is the the lowest TF (in this case the 15-minute TF) sets the pace.

    So every 15 minute the conditions is evaluated, of course the 1-hour TF updates its data at a hour boundary, so it wll remain the same for 4 15-minute units, but evaluation of the condition will be made every 15 minutes.

     

     

     

    #164845

    Coding for indicator questions go to ProBuilder forum please.

    #165557

    OK, sorry about that. I wasn’t sure if it was a problem with the way the program was handling the data or whether it’s something to do with the code. I’ll open a topic in the ProBuilder forum for this.

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

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