Hello guys!
I need the probuilder codes of the EMA, WEIGHTED and WILDER averages.
Does anybody knows them?
Thanks in advance
Max
Proprietary software is usually undisclosed, you may try to apply PRT but I don’t think you’ll get any useful help (it would be odd if they did!).
You may search this forum for versions that you may modify to suit your needs.
You may also search the web for the formulas and build them on your own.
Hi Roberto, yes I know probuilder indicators codes are not available, actually I was asking if anyone has programmed on it’s own the codes of the 3 averages to be able to modify them.
Overall to use them as daily filter on the intraday timeframes.
Max
Exponential moving average code:
once customema=close
EMALength = 10
alpha = 2/(EMALength+1)
if barindex>EMALength then
CustomEMA = alpha*Close + (1-alpha)*CustomEMA[1]
endif
return customEMA
Wilder Moving Average code:
//Wilder MA
N = 10
K = 1/N
if barindex>N then
wilder = close * K + wilder[1] * (1-K)
endif
return wilder coloured(255,0,0)
Thanks so much Nicolas!
Don’t you have also the weighted average?
Maxx
I recoded them from scratch, don’t have time enough to code the last one yesterday. I’ll try to make it today.
Weighted Moving Average code:
period = 10
price = customclose
pricesum=0
a=0
for i = 0 to period do
p=period-i
pricesum = pricesum+price[i]*p
a = a + i
next
wma = pricesum/a
return wma as "wma"
All is good now 🙂
Great job Nicolas! thanks so much!
Maxx
Hello Nicolas 🙂 Thanks for the codes ! It’s really useful
I’m wondering something about the wilder moving average code, on this line:
wilder = close * K + wilder[1] * (1-K)
I understand it’s a sophisticated way to make a loop,
at the first iteration of the loop, i guess wilder is undefined, so “wilder[1] * (1-K)” should equals to “undefined * (1-K)”
so my guess is that it is equal to 0 on the first iteration
am I right ?
Indeed, so you can add this line at the top of the code in order to get a value for the first iteration of the loop:
once wilder = close