High/low ATR Intraday (different timeframe)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #86002 quote
    fxbravofxbravo
    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
    NicolasNicolas
    Keymaster
    Legend

    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
    fxbravofxbravo
    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 fxbravofxbravo
7 years, 10 months ago.

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