Volumen acumulado entre dos fechas

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #83362 quote
    PluvinelPluvinel
    Participant
    Average

    Saludos a todos. Acabo de registrarme en el foro. Escribiré en español, pero si alguien prefiere inglés lo reenviaré en ese idioma.

    El problema que se me plantea es conocer el volumen acumulado entre dos fechas concretas, p.e., entre October/01/2018 y October/22/2018.

    Entiendo que podría utilizarse la sentencia:

    CumVol = summation[NumOfBarBetweenDates](volume)

    Donde “NumOfBarBetweenDates” es el número de velas entre las dos fechas determinadas. Esta es la variable que no consigo programar.

    Saludos.

    #83363 quote
    PluvinelPluvinel
    Participant
    Average

    Disculpad, la sentencia era, obviamente,

    CumVol = summation[NumOfBarBetweenDates] (volumen)

    saludos

    #83689 quote
    NicolasNicolas
    Keymaster
    Legend

    Una forma fácil sería contar las barras entre las 2 fechas utilizando la condición establecida en la fecha:

    if date>=20181001 and date<=20181022 then 
     count=count+1
    endif
    CumVol = summation[count] (volume)

    o entonces:

    if date>=20181001 and date<=20181022 then 
     cumvol=cumvol+volume
    endif
    
    #84073 quote
    PluvinelPluvinel
    Participant
    Average

    Thank you very much, Nicolas. The right code was

    if date>=20181001 and date<=20181022 then
    cumvol=cumvol+volume
    endif
    So long!
Viewing 4 posts - 1 through 4 (of 4 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

Volumen acumulado entre dos fechas


ProBuilder: Indicadores y Herramientas

New Reply
Author
author-avatar
Pluvinel @pluvinel Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicadores y Herramientas
Language: Spanish
Started: 10/22/2018
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...