MACD fast line with SMA

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #110270 quote
    William Silva Pereira
    Participant
    New

    Hi guys,

    Is it possible in the MACD to have the fast line as a simple moving average instead of an EMA? I’ve started using ProRealTime recently and could not set it up like that.

    #110274 quote
    Vonasi
    Moderator
    Master

    Try this:

    a = MACD[12,26,9](close)
    b = MACDLine[12,26,9](close)
    c = average[9](b)
    
    r = 128
    g = 0
    
    if a > 0 then
    r = 0
    g = 128
    endif
    
    return a coloured(r,g,0) style(histogram,2) as "MACD Histogram" , b coloured(0,0,255) as "MACD", c coloured(255,0,0) as "Signal Line"
    William Silva Pereira thanked this post
    #110277 quote
    robertogozzi
    Moderator
    Master

    >> Please update your country flag in your profile. Thank you 🙂 <<

    William Silva Pereira thanked this post
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

MACD fast line with SMA


ProBuilder: Indicators & Custom Tools

New Reply
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 10/15/2019
Status: Active
Attachments: No files
Logo Logo
Loading...