CALCULO ATR DIA ANTERIOR

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27770 quote
    jjferrerjjferrer
    Participant
    Junior

    Hola,

    Estoy intentando programar un indicador y necesito saber el valor del ATR del día anterior. Pensaba que sería tan sencillo como calcular el valor de:

    ATRanterior=AverageTrueRange[14](close[1])

    pero parece que no es así.

    He programado este pequeño indicador y al representarlo se vee claramente que no se obtiene el mismo valor.

    ATRhoy=AverageTrueRange[14](close[0])
    ATRanterior=AverageTrueRange[14](close[1])
    
    
    return ATRhoy, ATRanterior

    ¿Alguna idea?

    #27798 quote
    JC_BywanJC_Bywan
    Moderator
    Master

    Hola,

    ATRhoy=AverageTrueRange[14](close)
    ATRanterior=ATRhoy[1]
    
    
    return ATRhoy, ATRanterior
    Nicolas and jjferrer thanked this post
    #28827 quote
    jjferrerjjferrer
    Participant
    Junior

    Muchas gracias!!

    Funciona perfectamente.

     

    Salu2.

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

CALCULO ATR DIA ANTERIOR


ProBuilder: Indicadores y Herramientas

New Reply
Author
author-avatar
jjferrer @jjferrer Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicadores y Herramientas
Language: Spanish
Started: 03/08/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...