Renko Box Atr

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #120946 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Non ho ben capito.

    Se vuoi l’ATR già ce l’hai, oppure scrivi questo indicatore:

    Periodi = 699
    MyAtr = AverageTrueRange[Periodi](close)
    RETURN MyAtr AS "ATR"

    Se vuoi una media dei range di TUTTE le barre puoi scrivere:

    IF BarIndex > 0 THEN
       MyAtr = (range + MyAtr[1]) / 2
    ELSE
       MyAtr = range
    ENDIF
    RETURN MyAtr AS "media ATR"
    abd78 thanked this post
    #120963 quote
    abd78abd78
    Participant
    Veteran
    Periodi = 699
    MyAtr = AverageTrueRange[Periodi](close)
    RETURN MyAtr AS "ATR"

    questo va bene però vorrei che prendesse tutte le candele, quindi periodi = tutte le candele o unità sul grafico, senza un numero preciso.

    il 2 codice mi da un valore troppo distante dal primo, non capisco come mai

    #120968 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Il secondo è la media di tutte le candele, 1000, 10000 o 100000 che hai selezionato.

    Prova questa formula:

    IF BarIndex > 0 THEN
       MyAtr = MyAtr + range
       x     = MyAtr / (BarIndex + 1)
    ELSE
       MyAtr = range
    ENDIF
    RETURN x AS "media ATR"
    abd78 thanked this post
    #120969 quote
    abd78abd78
    Participant
    Veteran

    perfetto, grazie mille roberto

Viewing 4 posts - 16 through 19 (of 19 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

Renko Box Atr


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
abd78 @fede9483 Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 02/28/2020
Status: Active
Attachments: 6 files
ProRealCode ProRealCode
Loading...