Gann Hilo Activator and Volume Price Confirmation Indicator

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #19476 quote
    Carlos Silva
    Participant
    New

    Hello!

    I dont know how to have this two indicators (gann hilo activator and Volume Price Confirmation indicator) in my list of prorealtime indicators. I tried and tried but programing is 0…even with instructions…

    Can somebody help me?

    Thanks!

    #19481 quote
    Carlos Silva
    Participant
    New

    the formulas are:

    Gann Hilo Activator

    HLd:=If(C>Ref(Mov(H,Lb,S),-1),1,If(C<Ref(Mov(L,Lb,S),-1),-1,0));

    HLv:=ValueWhen(1,HLd<>0,HLd);

    HiLo:=If(HLv=-1,Mov(H,Lb,S),Mov(L,Lb,S));

     

     

    Volume Price Confirmation Indicator

    {Calculate Short Term & Long Term Volume Weighted Moving Averages}

    ShortTerm_VWMA:= Sum((Volume*price),stvwmaperiods)/Sum(Volume,stvwmaperiods);

    LongTerm_VWMA:= Sum((Volume*price),ltvwmaperiods)/Sum(Volume,ltvwmaperiods);

    {Calculate Short Term Simple Moving Average}

    ShortTerm_SMA:= Mov(price,stsmaperiods,S);

    {Calculate the VPCI Components}

    VPC:= ShortTerm_VWMA – ShortTerm_SMA;

    VPR:= ShortTerm_VWMA / ShortTerm_SMA;

    VM:= ShortTerm_VWMA / LongTerm_VWMA;

    {Calculate Volume Price Confirmation Indicator}

    {Normalize VPCI values & Calculate Volume-Weighted MA of VPCI}

    VPCI:= ((VPC * VPR) * VM) * 10000 / C;

    SmoothedVPCI:= Sum((Volume*VPCI),svpciperiods)/Sum(Volume,svpciperiods);

     

    Dont know what to do with this! Its possible to some “magic” transform this in a file to have this indicators in prorealtime list of indicators?

    Thanks again and happy new year to all of you!

    #19484 quote
    Nicolas
    Keymaster
    Master

    >> Please update your country flag in your profile. Thank you 🙂 <<

    These 2 indicators codes are not for prorealtime, but for another trading platform. They can be converted of course, I’ll have a look ASAP between two other things 🙂 Happy new year!
    #19485 quote
    Carlos Silva
    Participant
    New
    Thanks Nicolas! Happy new year!
    #19514 quote
    Nicolas
    Keymaster
    Master
    Thank you Carlos, happy new year to you too 🙂 I made conversion of the Gann HighLow activator formula, please find below the code of this indicator. I’ll add it to the code library too, soon. I were almost sure it was already part of it, since it is a very common indicator, but not.. so here it is:
    //PRC_Gann HighLow Activator | indicator
    //31.12.2016
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //Converted from Metastock version
    
    // --- parameters
    period = 10
    // ---
    
    avgH = average[period](high)[1]
    avgL = average[period](low)[1]
    
    if close>avgH then
     hilo = 1
    elsif close<avgL then
     hilo = 0
    endif
    
    if hilo then
     gannHiLo = avgL
     color = 1
    else
     gannHiLo = avgH
     color = -1
    endif
    
    return gannHiLo coloured by color as "gannHiLo activator"
      You can also download the ITF file attached and directly import it into your trading platform. I’ll do the next indicator conversion to prorealtime ASAP.
    #19532 quote
    Carlos Silva
    Participant
    New
    Dear Nicolas, its an absolute honour to have someone like you doing this great job! Thank you very much!
    #19635 quote
    Nicolas
    Keymaster
    Master
    Here is the translated code for the VPCI (Volume Price Confirmation Indicator), but I’m not sure of its accuracy. Where did you find that code yourself? Do you got any examples of its reading please?
    stvwmaperiods = 10
    ltvwmaperiods = 50
    stsmaperiods = 5
    svpciperiods = 10
    
    price = customclose
    
     // Calculate Short Term & Long Term Volume Weighted Moving Averages
    ShortTermVWMA= Summation[stvwmaperiods](Volume*price)/Summation[stvwmaperiods](Volume) 
    LongTermVWMA= Summation[ltvwmaperiods](Volume*price)/Summation[ltvwmaperiods](Volume) 
     // Calculate Short Term Simple Moving Average
    ShortTermSMA= average[stsmaperiods](price)  
    // Calculate the VPCI Components
    VPC= ShortTermVWMA - ShortTermSMA
    VPR= ShortTermVWMA / ShortTermSMA
    VM= ShortTermVWMA / LongTermVWMA  
    // Calculate Volume Price Confirmation Indicator
    // Normalize VPCI values & Calculate Volume-Weighted MA of VPCI
    VPCI= VPC * VPR * VM//) * 10000 / C 
    
    SmoothedVPCI= Summation[svpciperiods](Volume*VPCI)/Summation[svpciperiods](Volume)
    
    return VPCI,smoothedVPCI
    #19638 quote
    Carlos Silva
    Participant
    New
    Dear Nicolas, i saw this code in vttrader platform. The code you translate it not working. I dont know the reason. 🙁 Thanks.
    #19640 quote
    Nicolas
    Keymaster
    Master
    Because the instrument you put the indicator on need Volume. You can try this version instead, which prevent the indicator to calculate if it has still not bar enough loaded:
    stvwmaperiods = 10
    ltvwmaperiods = 50
    stsmaperiods = 5
    svpciperiods = 10
    
    price = customclose
    
    if barindex>ltvwmaperiods then 
    // Calculate Short Term & Long Term Volume Weighted Moving Averages
    ShortTermVWMA= Summation[stvwmaperiods](Volume*price)/Summation[stvwmaperiods](Volume)
    LongTermVWMA= Summation[ltvwmaperiods](Volume*price)/Summation[ltvwmaperiods](Volume)
    // Calculate Short Term Simple Moving Average
    ShortTermSMA= average[stsmaperiods](price)
    // Calculate the VPCI Components
    VPC= ShortTermVWMA - ShortTermSMA
    VPR= ShortTermVWMA / ShortTermSMA
    VM= ShortTermVWMA / LongTermVWMA
    // Calculate Volume Price Confirmation Indicator
    // Normalize VPCI values & Calculate Volume-Weighted MA of VPCI
    VPCI= VPC * VPR * VM//) * 10000 / C
    
    SmoothedVPCI= Summation[svpciperiods](Volume*VPCI)/Summation[svpciperiods](Volume)
    endif
    
    return VPCI,smoothedVPCI
    It’s working for me, but as I said, I’m not sure how it should look, because I saw many other different versions of this indicator over the internet.
    #19869 quote
    Carlos Silva
    Participant
    New
    Dear Nicolas, thanks for your efforts but unfortunatelly it doesnt work with me. it appears an empty image. No lines. I show you how it appears in vttrader. Thanks.
    #19875 quote
    Nicolas
    Keymaster
    Master
    Please tell me instruments tickers that don’t work as I try to reproduce the problem myself.
    #19885 quote
    Carlos Silva
    Participant
    New
    Dear Nicolas all the forex pairs dont work. Thanks.
    #19892 quote
    Nicolas
    Keymaster
    Master
    As I said already in one of my previous post, you need instrument with Volumes for the indicator to compute correctly. Forex pairs have no Volumes with IG, so if Volume=0, you’ll never have a chance to see something calculated 🙂
    Because the instrument you put the indicator on need Volume.
    #19983 quote
    Carlos Silva
    Participant
    New
    Dear Nicolas, thanks for your kindly help!
    #83143 quote
    timal dude
    Participant
    Junior
    Dear Nicolas, I bought the book investing with volume analysis. I tried your coding, i think it needs a little tweak: the VPC is based on long-term period while the VPR a short-term period. This is the formula from the book c= close v= volume s= 10 l=50 vpc= vwma( c,l) – sma (c,l) vpr= vwma(c,s)/ sma (c,s) vm= sma(v,s)/sma(v,l) VPCI= vpc x vpr x vm VPCIs= vwma(vpci, s) Could you please code it? Thank you for your help
Viewing 15 posts - 1 through 15 (of 19 total)
  • You must be logged in to reply to this topic.

Gann Hilo Activator and Volume Price Confirmation Indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 18 replies,
has 4 voices, and was last updated by Gianluca
7 years, 3 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 12/30/2016
Status: Active
Attachments: 4 files
Logo Logo
Loading...