PRT Adaptive moving average indicator code

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #101106 quote
    TariqTariq
    Participant
    New

    Hi,

    Does anyone provide the code for the adaptive moving average indicator available in the PRT predefined indicators list.

    Many thanks in advance.

    Tariq

    #101133 quote
    NicolasNicolas
    Keymaster
    Legend

    Here is the code of the adaptive moving average of ProRealTime. It is the same as a KAMA (Kaufman’s Adaptive Moving Average):

    // parameters :
    Period = 9
    FastPeriod = 2
    SlowPeriod = 30
    
    Fastest = 2 / (FastPeriod + 1)
    Slowest = 2 / (SlowPeriod + 1)
    if barindex < Period+1 then
    Kama=close
    else
    Num = abs(close-close[Period])
    Den = summation[Period](abs(close-close[1]))
    ER = Num / Den
    Alpha = SQUARE(ER *(Fastest - Slowest )+ Slowest)
    KAMA = (Alpha * Close) + ((1 -Alpha)* Kama[1])
    endif
    
    return kama

    Kaufman Adaptive Moving Average KAMA

    #102079 quote
    TariqTariq
    Participant
    New

    Nicolas than you very much for this.

    Kind regards,

    Tariq

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

PRT Adaptive moving average indicator code


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Tariq @tariq Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by TariqTariq
7 years, 3 months ago.

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