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