ADAPTIVE MOVING AVERAGE

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #102770 quote
    steynpj
    Participant
    Average

    I want to use Adaptive Moving Average in trading system.

    Using assisted programming, when I click on chart, on the adaptive moving average, the average does not appear as option in window to use in programming. Only price, and previous day high/low/close etc.

    Unable to use adaptive moving average in assisted programming.

     

    Please advise.

    #102771 quote
    Nicolas
    Keymaster
    Master

    In order to use the adaptive moving average in ProOrder, you have to use its code, you’ll find it here: https://www.prorealcode.com/topic/prt-adaptive-moving-average-indicator-code/#post-101133

    You can also try to use this instruction:

    adaptativeaverage[9,2,30](close)

    I’m not sure it works in version prior to v11.

    #102772 quote
    steynpj
    Participant
    Average

    Thank you

    #102815 quote
    steynpj
    Participant
    Average

    To use above in code, what needs to be done.

    A SMA for example would:      indicator1 = Average[A](close)

    What would it be for Adaptive Moving Average?      indicator1 = ????

    The link sent was:

    // 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

     

    Does not work if I replace ???? with above.

    Does it need brackets around etc?

    How do I set indicator1=adaptaive moving average?

    Thank you.

    Daniele Maddaluno thanked this post
    #102826 quote
    Nicolas
    Keymaster
    Master

    For clarity of messages on ProRealCode’s forums, please use the “insert code PRT” button to separate the text of the code part! Thank you! Code has now been tidied up for you! 🙂 <<

    You should copy/paste the code of the indicator into your strategy and use the KAMA variable, it states for the adaptive moving average.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

ADAPTIVE MOVING AVERAGE


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
steynpj @steynpj Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/17/2019
Status: Active
Attachments: No files
Logo Logo
Loading...