standard PRT code for MACD

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #189636 quote
    mwilkens111mwilkens111
    Participant
    New

    Can anyone provide the code for the standard MACD provided by Prorealtime? I would like to start with that and then modify from there on.

    Thank you

    Markus

    #189640 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    There you go:

    // MACD 12,26,9 (formula)
    //
    // https://en.wikipedia.org/wiki/MACD
    // https://www.ig.com/uk/glossary-trading-terms/moving-average-convergence-divergence-definition
    //
    MyMACD       = ExponentialAverage[12](close) - ExponentialAverage[26](close)
    MySignalLine = ExponentialAverage[9](MyMACD)
    MyHistogram  = MyMACD - MySignalLine
    RETURN MyMACD AS "Macd",MySignalLine AS "Signal",MyHistogram AS "Histogram"
Viewing 2 posts - 1 through 2 (of 2 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

standard PRT code for MACD


Platform Support: Charts, Data & Broker Setup

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzirobertogozzi
4 years, 7 months ago.

Topic Details
Forum: Platform Support: Charts, Data & Broker Setup
Language: English
Started: 03/08/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...