MACD fast line with SMA

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #110270 quote
    William Silva PereiraWilliam 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
    VonasiVonasi
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    >> 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.
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 fast line with SMA


ProBuilder: Indicators & Custom Tools

New Reply
Summary

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

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