PRT Adaptive moving average indicator code

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #101106 quote
    Tariq
    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
    Nicolas
    Keymaster
    Master

    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
    Tariq
    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.

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 Tariq
6 years, 7 months ago.

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