I’ve been using the following to include DEMA and TEMA in the range of moving averages to be compared when optimizing ‘t’ (0-10)
ma = average[p,t](typicalprice)
if t = 9 then
ma = DEMA[p](typicalprice)
elsif t = 10 then
ma = TEMA[p](typicalprice)
endif
cb1 = ma > ma[1]
This works well enough – my question is, are there others that can be included in this way?
I know there are dozens of moving average types but will any of them work with this syntax without writing the whole formula?
Not exactly in that way but you could CALL this indicator and have access to another 66 averages.
Average Filter Regression
Actually ALL of those at https://www.prorealcode.com/prorealtime-indicators/average-filter-regression/.
You could make a CALL to that indicator with the correct parameters and assign the returned value to ma.
AhAhAh…. same idea Vonasi, you were just a bit quicker!
It might be interesting to put some of them through testing like this:
Average tester – are averages any good?
I’ll leave you to do it as the sun is out here in Greece and Spring is in the air….
Thanks to you both, I’ll check it out.