“MACZVWAP-modified” conversion request from Tradingview

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #192931 quote
    lorebrunolorebruno
    Participant
    New

    Dear All,

    I just found this indicator on Tradingview code (Pinescript) that I found interesting:

    https://www.tradingview.com/script/dPYnTwxq-MACZVWAP-modified/

    I would be interested in evaluating the outcome of this indicator on Prorealtime

    I attached the following files:

    1. file with the screenshot from Tradingview in which I applied this indicator to PPL Corporation stock (daily)
    2. file with the Pinescript script

    I hope that I correctly understood the forum rules and I did not mess up anything with this request, since it’s the first time I write a request on this forum.

    Thanks to anyone would like to take the chance of having a look to this request

    Best regards

    Lorenzo

    MACZVWAP-modified-on-PPL-corporation.jpg MACZVWAP-modified-on-PPL-corporation.jpg MACZVWAP-modified.docx
    #192965 quote
    NicolasNicolas
    Keymaster
    Legend

    So that’s the MACD of the Z-score of a VWAP and with a Laguerre smoothing. I will try to look at that today. Thanks a lot for the nicely formatted code translation query! (would be better with a short description, but the original author doesn’t give any, so that’s ok for this time 😆 )

    #192977 quote
    NicolasNicolas
    Keymaster
    Legend

    The MACZVWAP indicator is available in the library.

    JohnScher thanked this post
    MACD-Z-VWAP.png MACD-Z-VWAP.png
    #193017 quote
    JohnScherJohnScher
    Participant
    Veteran

    Looks to me a bit like 2 oscillators overlapping. Black line and the histogram.
    After a rebuild into a strategy, can you measure how the success is when the two oscillators are furthest apart?
    The same question arises with me also with, Didi indicator, have it there with abs (DDL-DDS) tried. With moderate success after optimization.
    And here and or again there in a flawless programming?

    #193037 quote
    supertitisupertiti
    Participant
    Master

    This indicator seems interesting a priori, everyone will put the values ​​as they please, personally I set faster parameters.

    Would it be possible to have the same code with the signal on the price graph

    Thanks, have a good day

    #198847 quote
    pepepepe
    Participant
    New

    Hi,

    I also would like to have the same code with signal on price graph.
    Thanks 🙂

    #198875 quote
    supertitisupertiti
    Participant
    Master

    Bonjour,

    J’ai fai ça, j’ai mis une moyenne pour que ce soit plus lisible ce qui lisse le signal évidemment
    bons trades

    //MACZVWAP on chart indicator 10.08.2022 modifié 
    //Nicolas @ www.prorealcode.com  //Sharing ProRealTime knowledge
    //converted from pinescript
    
    // --- settings
    fastLength = 12 //MACD Fast MA Length
    slowLength = 25 //MACD Slow MA Length
    signalLength = 9 //MACD Signal Length
    lengthz = 20 //Z-VWAP Length
    lengthStdev = 25 //Stdev Length
    A = 1.0 //MACZ constant A
    B = 1.0 //MACZ constant B
    useLag = 1 //Apply Laguerre Smoothing (0=false ; 1=true)
    gamma = 0.02 //Laguerre Gamma
    // p = 10
    // m = exponentielle
    // --- end of settings
    
    source=customclose
    
    mean = summation[lengthz](volume*close)/summation[lengthz](volume)
    vwapsd = sqrt(average[lengthz](pow(close-mean, 2)))
    zscore = (close-mean)/vwapsd
    
    fastMA = average[fastLength](source)
    slowMA = average[slowLength](source)
    imacd = fastMA - slowMA
    maczt=zscore*A+ imacd/std[lengthStdev](source)*B
    if uselag and maczt>0 then
    s = maczt
    g = gamma
    l0 = (1 - g)*s+g*(l0[1])
    l1 = -g*l0+(l0[1])+g*(l1[1])
    l2 = -g*l1+(l1[1])+g*(l2[1])
    l3 = -g*l2+(l2[1])+g*(l3[1])
    macz=(l0 + 2*l1 + 2*l2 + l3)/6
    else
    macz=maczt
    endif
    /////////////////////////////////////////////////////////
    signal =  ( average[signalLength](macz) /100 ) + close
    MA = average [p,m]( signal )
    /////////////////////////////////////////////////////////
    
    hist=macz-signal
    
    return  signal style(line,3) as "signal MACZVWAP" , MA as " MA "
    JohnScher thanked this post
    MACZVWAP-on-chart.jpg MACZVWAP-on-chart.jpg
Viewing 7 posts - 1 through 7 (of 7 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

“MACZVWAP-modified” conversion request from Tradingview


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
lorebruno @lorebruno Participant
Summary

This topic contains 6 replies,
has 5 voices, and was last updated by supertitisupertiti
4 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 05/09/2022
Status: Active
Attachments: 4 files
ProRealCode ProRealCode
Loading...