Indicador de días con vela verde

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #248667 quote
    lycos83lycos83
    Participant
    Junior

    Hola buenos días.

    Me gustaria pedir ayuda para generar un indicador que contase el número de ocasiones que un activo ha cerrado con velas disrias o semanales en verde, en x periodo atrás, x ejemplo 1año.

    Gracias de antemano.

    #248668 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Buenas. Tienes dos opciones. Usar un bucle o usar la funcion summation (más eficiente).

    p=252
    verde=close>open
    
    //opcion 1
    suma=summation[p](verde)
    
    //opcion 2
    sum=0
    for i=0 to p-1 do
    if verde[i] then
    sum=sum+1
    endif
    next
    
    return suma, sum coloured("red")
    robertogozzi thanked this post
Viewing 2 posts - 1 through 2 (of 2 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

Indicador de días con vela verde


Soporte Plataforma: Gráficos, Datos y Brokers

New Reply
Author
author-avatar
lycos83 @lycos83 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Iván GonzálezIván González
1 year, 2 months ago.

Topic Details
Forum: Soporte Plataforma: Gráficos, Datos y Brokers
Language: Spanish
Started: 07/04/2025
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...