Hello,
I’m testing the Bollinger Band %B(20, 2) against the EMA (9 periods) over it.
The PCF I’m writing is asking this question (in pseudo code): %B > (1.3*EMA9)
The actual code is:
((C0 - XAVGC20.0) / 2 / 2 / STDDEV20.0) +0.5 > 1.3*XAVG(((C0 - XAVGC20.0) / 2 / 2 / STDDEV20.0) + .5, 9)
As it stands, the above code is slow. You can see the duplication. Is my approach to the above question correct? Can I create and assign variables to speed up the code?
Thank you for any advise you can give me.
Regards
Renny
|