Attributable Volume

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #137393 quote
    bolsatrilera
    Participant
    Master

    He visto este curioso indicador en Tradinview : https://es.tradingview.com/script/YSSahFC2-Attributable-Volume/ 

    y he hehco una adaptación para Prorealtime . ¿ alguién puede decirme si la adaptación es correcta ?

    REM ATTRIBUTABLE VOLUME
    // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
    // © capriole_charles
    
    //@version=4
    //study(“Attributable Volume”,overlay=false)
    //freely adapted for the Prorealtime platform by bolsatrilera
    
    type= volume//input(‘Attr-RVOL’,options=[‘Attr-RVOL’,’RVOL’,’Attr-Volume’,’Volume’])
    trans=trans //en variables tipo boleano marcado verdad //input(true,’Plot Raw metric Transparently.’)
    thresh=2.5//input(2.5,’RVOL Threshold’)
    len =20// input(20,”RVOL Lookback Length”)
    
    green = close>open
    wickbottom = min(close,open)-low
    wicktop = high – max(close,open)
    solidlen = abs(close-open)
    
    if attributablevolume = green then
    
    attributablevolume = (volume * (solidlen+wickbottom)/(solidlen+wicktop+wickbottom))
    else
    attributablevolume =(volume * (solidlen+wicktop)/(solidlen+wicktop+wickbottom))
    endif
    
    rvol = volume/average [len](volume)
    rvolattr = attributablevolume/average [len](attributablevolume)
    
    if trans and type= volume then
    t = rvol
    elsif trans and type= volume then
    t = volume
    endif
    
    if metric = type then
    type =rvolattr
    elsif type= rvol then
    type = rvol
    elsif type= volume then
    type =attributablevolume
    else
    metric = volume
    endif
    
    if t = green then
    r=255
    g=0
    b=0
    else
    r=0
    g=128
    b=0
    endif
    
    if metric = green then
    r=255
    g=0
    b=0
    else
    r=0
    g=128
    b=0
    endif
    
    if type = volume or type = rvol then
    type = thresh
    endif
    
    return t coloured(r,g,b)style(histogram)as”Raw”,metric coloured(r,g,b)style(histogram)as”Metric”,thresh coloured (128,128,128)as “Threshold”,0 coloured(128,128,128)as “0”
    ALM-Diario.png ALM-Diario.png ATTRIBUTABLE-VOLUME.itf
    #137411 quote
    robertogozzi
    Moderator
    Master

    Siempre use el botón “Insert PRT Code” cuando incluya e inserte un código en sus mensajes para que sea más fácil de leer para otros.

    Gracias 🙂

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

Attributable Volume


ProBuilder: Indicadores y Herramientas

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
5 years, 8 months ago.

Topic Details
Forum: ProBuilder: Indicadores y Herramientas
Language: Spanish
Started: 06/28/2020
Status: Active
Attachments: 2 files
Logo Logo
Loading...