enhanced MACD

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #144255 quote
    ammar.berrouammar.berrou
    Participant
    New

    my ‘2 cents’ on the MACD

    MACD  values varies from an instrument to other, and from a time frame to other; it makes things much easier for both human and machine algorithms to watch a ‘normalized’ indicator, an ‘oscillating’ indicator in the range of +/- 3 (or so) see image above of German DAX 30, left is weekly chart, right is daily, above is my normalized MACD, below is the common ‘vanila’ MACD, as you can see the vanila values are +400 -500 on weekly vs +200 -100 on daily chart, while the normalized is usually between -2 to 3 in ‘normal’ conditions.

    Basically in my proposal, all I did is to ‘normalize’ the MACD value by its standard deviation and average, I also smoothed it by getting its fast exponential average (last 2 or few values)

     

    here’s the code
    Parameters:
    F / S are the MACD Fast / Slow Parameters,
    History is how long the standard deviation is calculated

    I suggest to present it as histogram, making positive values in green, negatives in red just like I did in the picture above -feels like chef suggesting how to serve a dish 😀

    //created by Ammar Berrou
    //www.linkedin.com/in/a-berrou
    
    once avf = max(round(2*F/10),2)
    mcd = MACDline[F,S,9](close)
    std1 = std[History](mcd)
    ea=Average[History](mcd)
    mcd2 = ExponentialAverage[avf](mcd)
    mcdR = (mcd2-ea)/std1
    
    
    RETURN mcdR AS "BMACD"
    B_MACD.itf 0-2.png 0-2.png
    #144257 quote
    ammar.berrouammar.berrou
    Participant
    New

    @Nicolas
    I made a quick search to find similar topics, and didn’t see quite the same, although the idea itself is not new.
    I hope you and rest of this community like it

    #144287 quote
    NicolasNicolas
    Keymaster
    Legend

    Thanks for sharing this idea. It is quite similar to the PPO (percent price oscillator) but you are using standard deviation for normalization.

    Another normalized MACD example: Normalized smoothed MACD

    ammar.berrou thanked this post
Viewing 3 posts - 1 through 3 (of 3 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

enhanced MACD


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by NicolasNicolas
6 years ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 09/14/2020
Status: Active
Attachments: 2 files
ProRealCode ProRealCode
Loading...