High/low ATR Intraday (different timeframe)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #86002 quote
    fxbravo
    Participant
    Average

    Hello everyone,

     

    I have a problem to determine the highest and lowest of ATR in X minutes. With those values, I want to calculate the average ATR in real time.

    I code this, but I have a message of error (nb is not an Integer):

    nb = intradaybarindex
    
    atrmax = highest[nb](AverageTrueRange[14](close))
    atrmin = lowest[nb](AverageTrueRange[14](close))
    
    middle = ABS((atrmax+atrmin)/2)
    
    return middle

    Thank you for your help.

     

    I wish you a perfect day

    #86006 quote
    Nicolas
    Keymaster
    Master

    For these instructions, the period must a rounded value (not containing decimal = integer type of variable).

    But the problem here is that the intradaybarindex start at 0, so a period of 0 is also not possible:

    atrmax = highest[max(1,nb)](AverageTrueRange[14](close))
    atrmin = lowest[max(1,nb)](AverageTrueRange[14](close))
    #86007 quote
    fxbravo
    Participant
    Average

    Logic, indeed!

    Thank you for your kind help Nicolas.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

High/low ATR Intraday (different timeframe)


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
fxbravo @fxbravo Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by fxbravo
7 years, 2 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 11/29/2018
Status: Active
Attachments: No files
Logo Logo
Loading...