MACD Zero Lag TEMA

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #214906 quote
    sam00075sam00075
    Participant
    Junior
    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
    robertogozzirobertogozzi
    Moderator
    Legend
    Just replace EXPONENTIALAVERAGE with TEMA (https://www.prorealcode.com/documentation/tema/).
    #214921 quote
    sam00075sam00075
    Participant
    Junior
    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
    JSJS
    Participant
    Master

    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
    JSJS
    Participant
    Master
    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
    Scherm­afbeelding-2023-05-21-om-09.49.53.png Scherm­afbeelding-2023-05-21-om-09.49.53.png
Viewing 5 posts - 1 through 5 (of 5 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

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 JSJS
3 years, 4 months ago.

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