Gann Hilo Activator and Volume Price Confirmation Indicator

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #83153 quote
    NicolasNicolas
    Keymaster
    Legend

    ok, this is the version you requested:

    c = close
    v = volume
    s = 10
    l = 50
    
    vwmaL = Summation[l](Volume*c)/Summation[l](Volume)
    vpc= vwmal - average[l](c)
    
    vwmaS = Summation[s](Volume*c)/Summation[s](Volume)
    vpr= vwmas/ average[s](c)
    
    vm= average[s](v)/average[l](v)
    
    VPCI= vpc * vpr * vm
    
    vwmaFinal = Summation[s](Volume*vpci)/Summation[s](Volume)
    VPCIs= vwmaFinal
    
    return vpcis
    #83161 quote
    timal dudetimal dude
    Participant
    Junior

    Merci beaucoup!

    #83172 quote
    GianlucaGianluca
    Participant
    Master

    Thank you guys, you give me a new idea for a TS 😀

    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
    
    // Condizioni per entrare su posizioni long
    indicator1 = CALL "Volume Price Confirmation Ind."
    c1 = (indicator1 CROSSES OVER -0.9)
    c11=cc < -40
    IF c1 and c11 THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    // Condizioni per uscire da posizioni long
    cc = CCI[136]
    c2 = (cc > -20) and (cc < 20)
    
    IF c2 THEN
    SELL AT MARKET
    ENDIF

    [attachment file=”83173″]

    Nicolas thanked this post
    grazie.jpg grazie.jpg
    #83175 quote
    GianlucaGianluca
    Participant
    Master

    New Version with trailing

    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
    //4/////////
    ONCE EXCURSION=1
    trailingstop = 45
    // Condizioni per entrare su posizioni long
    indicator1 = CALL "Volume Price Confirmation Ind."
    c1 = (indicator1 CROSSES OVER -0.9)
    c11=cc < -40
    IF c1 and c11 THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    // Condizioni per uscire da posizioni long
    cc = CCI[136]
    c2 = (cc > 120) and (cc < 140)//-20 e 20
    
    IF c2 THEN
    SELL AT MARKET
    ENDIF
    
    
    
    //4// MFE EXCURSION////
    //trailing stop
    
    //resetting variables when no trades are on market
    if not onmarket then
    MAXPRICE = 0
    MINPRICE = close
    priceexit = 0
    endif
    
    IF EXCURSION>0 THEN
    //case SHORT order
    if shortonmarket then
    MINPRICE = MIN(MINPRICE,close) //saving the MFE of the current trade
    if tradeprice(1)-MINPRICE>=trailingstop*pointsize then //if the MFE is higher than the trailingstop then
    priceexit = MINPRICE+trailingstop*pointsize //set the exit price at the MFE + trailing stop price level
    endif
    endif
    
    //case LONG order
    if longonmarket then
    MAXPRICE = MAX(MAXPRICE,close) //saving the MFE of the current trade
    if MAXPRICE-tradeprice(1)>=trailingstop*pointsize then //if the MFE is higher than the trailingstop then
    priceexit = MAXPRICE-trailingstop*pointsize //set the exit price at the MFE - trailing stop price level
    endif
    endif
    
    //exit on trailing stop price levels
    if onmarket and priceexit>0 then
    EXITSHORT AT priceexit STOP
    SELL AT priceexit STOP
    endif
    
    Nicolas thanked this post
Viewing 4 posts - 16 through 19 (of 19 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

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 GianlucaGianluca
7 years, 11 months ago.

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