Cambiar indicador en función de la vista temporal

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #244650 quote
    AquarisAquaris
    Participant
    New

    ¿Existe alguna forma de modificar un parámetro de un indicador en función de la vista temporal aplicada?

    Por ejemplo, un parámetro P que valga 52 en vista semanal y que valga 252 en vista diaria.

    Para no tener que cargar 2 indicadores distintos, uno para semanal y otro para diario.

    #244651 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Allí está:

    /*
    GetTimeFrame devuelve los segundos:
    60 = 1 minute
    300 = 5 minutes
    3600 = 1 hour
    14400 = 4 hours
    86400 = 1 day      (24 hours)
    604800 = 1 week    (7  days)
    2592000 = 1 month  (30 days)
    31536000 = 1 year  (365 days)
    -1 = default TF (or non time based TF)
    */
    TF = GetTimeFrame
    IF TF = 86400 THEN      // TF diario
       P = 252
    ELSIF TF = 604800 THEN
       P = 52               // TF Semanal
    ENDIF
    
    Iván González thanked this post
    #244653 quote
    AquarisAquaris
    Participant
    New

    Muchas gracias Roberto!

    robertogozzi thanked this post
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

Cambiar indicador en función de la vista temporal


ProBuilder: Indicadores y Herramientas

New Reply
Author
author-avatar
Aquaris @aquaris Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by AquarisAquaris
1 year, 6 months ago.

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