MACD Zero Lag TEMA

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #214906 quote
    sam00075
    Participant
    New

    Hello the community,

    is there an .itf for the MACD Zero Lag using TEMA ?

    This one created by Nicolas is working great, would just be better to have both versions.

    ZeroLag MACD

    Thanks

    #214913 quote
    robertogozzi
    Moderator
    Master

    Just replace EXPONENTIALAVERAGE with TEMA (https://www.prorealcode.com/documentation/tema/).

    #214921 quote
    sam00075
    Participant
    New

    I’ve seen the link before posting, and there’s another person asking the same question.

    How to replace it ?

    Explanations not clear.

    #214924 quote
    JS
    Participant
    Senior

    With the “zero lag” calculation, EMAs are already used and when you replace these EMAs with TEMA’s you get a calculation that makes no sense…

    #214962 quote
    JS
    Participant
    Senior
    I converted the MACD Zero Lag indicator to TEMA’s… Again, I personally think this calculation makes no sense…
    //Long=26
    //Short=12
    //Signal=9
    
    TEMAshort1 = TEMA[short](close)
    TEMAshort2 = TEMA[short](TEMAshort1)
    DifferenceShort = TEMAshort1 - TEMAshort2
    ZeroLagShort = TEMAshort1 + DifferenceShort
    
    TEMAlong1 = TEMA[long](close)
    TEMAlong2 = TEMA[long](TEMAlong1)
    DifferenceLong = TEMAlong1 - TEMAlong2
    ZeroLagLong = TEMAlong1 + DifferenceLong
    
    ZeroLagMACD = ZeroLagShort - ZeroLagLong
    
    signal1=TEMA[signal](ZEROLAGMACD)
    signal2=TEMA[signal](signal1)
    DIFFERENCE2=signal1-signal2
    
    SignalMACD=signal1+DIFFERENCE2
    Difference=ZeroLagMACD-SignalMACD
    
    
    RETURN ZeroLagMACD as "Zero Lag MACD" Coloured("Blue"), SignalMACD as "Signal MACD" Coloured("Red"), Difference as "Difference between ZLLine - ZLSignal"
    Nicolas thanked this post
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

MACD Zero Lag TEMA


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
sam00075 @sam00075 Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by JS
2 years, 8 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 05/19/2023
Status: Active
Attachments: 1 files
Logo Logo
Loading...