Cumulated volume on a ticks chart

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #111809 quote
    jordi-kojordi-ko
    Participant
    Junior

    Hola!

    Hay algo que no entiendo… A ver si me podeis ayudar.

    Me gustaria calcular el volumen por segundo en un grafico de ticks.

    He creado el siguiente codigo:

    once cumulatedvol=0
    
    if time <> time[1] then
    drawvline(barindex)
    cumulatedvol=volume
    else
    drawvline(barindex)coloured(255,0,0)
    cumulatedvol=volume+cumulatedvol
    endif
    
    lb=barindex
    drawtext("#lb#",barindex,-1)
    return cumulatedvol,0

     

    La cuestion es que el programa no acumula el volumen. No es capaz de entrar en el “else” (detectando que el “time” es diferente).

    Me he plateado otras soluciones utilizando el “barindex” pero es que la plataforma no es capaz de imprimirme en el sitio correcto ese “drawtext”.

    Ver imagen adjunta.

    Muchas gracias,

    Saludos

    cum.png cum.png
    #111814 quote
    NicolasNicolas
    Keymaster
    Legend

    Las variables se restablecen a cero en cada nueva marca recibida en la misma vela. Por lo tanto, no puede aumentar el 'volumen acumulado' como lo hace en la línea 8. La única solución es usar un gráfico de 1 marca, en este caso 1 marca es igual a 1 vela.

    jordi-ko 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

Cumulated volume on a ticks chart


ProBuilder: Indicadores y Herramientas

New Reply
Author
author-avatar
jordi-ko @jordi-ko Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by NicolasNicolas
6 years, 11 months ago.

Topic Details
Forum: ProBuilder: Indicadores y Herramientas
Language: Spanish
Started: 11/01/2019
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...