Contar nº veces que se produce un evento en las ultimas 250 sesiones.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #161213 quote
    nautilus23
    Participant
    Average

    Hola es posible realizar un indicador que cuente el nº de veces que se produce el evento x, que indic0 después, en las ultimas 250 barras.

    Evento x = subida diaria > 10% y que el volumen de ese día sea:  volume > 3*ExponentialAverage[50](volume)[1]

    Gracias.

    #161229 quote
    robertogozzi
    Moderator
    Master

    Hecho:

    Tally = 0
    FOR i = 200 DOWNTO 0
       a  = ((close[i] / close[i+1]) - 1) * 100
       b  = ExponentialAverage[50](volume[i])[1]
       c1 = a > 10
       c2 = Volume[i] > (b * 3)
       IF c1 AND c2 THEN
          Tally = Tally + 1
       ENDIF
    NEXT
    SCREENER[Tally](Tally AS "Tally")
    #161243 quote
    nautilus23
    Participant
    Average

    Muchisimas gracias, parece que funciona perfectamente, como indicador y como screener.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Contar nº veces que se produce un evento en las ultimas 250 sesiones.


ProBuilder: Indicadores y Herramientas

New Reply
Author
author-avatar
nautilus23 @nautilus23 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by nautilus23
5 years ago.

Topic Details
Forum: ProBuilder: Indicadores y Herramientas
Language: Spanish
Started: 02/12/2021
Status: Active
Attachments: No files
Logo Logo
Loading...