Indentificar Barindex de una vela

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #93482 quote
    MestorMestor
    Participant
    Senior

    Soy relativamente nuevo con esta plataforma y estoy intentando crear un indicador que traza, entre otros objetos, un recuadro.

    Veo que para dibujar ese recuadro debo indicar el indice de la vela.

    Necesito que el recuadro empiece en el máximo de las últimas 21 velas.

    El máximo tengo claro que lo consigo con Highest[21](High)

    ¿Pero como puedo saber el Barindex de esa Vela?

    Muchas Gracias

    #93490 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Use este código para cargar la barra con el valor HIGH más alto de lo que le interesa.
    Después del ciclo, la variable MIVELA contendrá el número de la barra donde ocurrió el máximo.

    LookBack = 21
    Maximo   = Highest[LookBack](High)
    FOR i = 0 TO (LookBack - 1)
       IF high[i] = Maximo THEN
          MiVela = Barindex[i]
          BREAK
       ENDIF
    NEXT
    #93497 quote
    MestorMestor
    Participant
    Senior

    Muchas gracias Roberto

    Es lo que estaba buscando

    Un saludo

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

Indentificar Barindex de una vela


ProBuilder: Indicadores y Herramientas

New Reply
Author
author-avatar
Mestor @mestor Participant
Summary

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

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