Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Profile: RennyU
About
User Name: RennyU
Groups: Member
Rank: Registered User
Real Name:
Location
Occupation:
Interests:
Gender: Unsure
Statistics
Joined: Thursday, May 17, 2018
Last Visit: Monday, July 2, 2018 7:51:10 AM
Number of Posts: 1
[0.00% of all post / 0.00 posts per day]
Avatar
Last 10 Posts
Topic: Compare %B Boliinger value against its EMA
Posted: Sunday, June 3, 2018 8:33:53 AM

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