Subscription & data-feed pricing Class schedule

Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.

 Heikin-Ashi coding in PCF Rate this Topic:
 Previous Topic · Next Topic Watch this topic · Print this topic ·
HarleyBD
 Posted : Friday, June 01, 2018 10:12:04 AM
Platinum Customer

Joined: 6/30/2014
Posts: 60

Hi.  I've enjoyed coding in PSF and the discussion on this website for several years now.  It's a great addition to my stock trading.   I've looked at Heikin-Ashi recently and naturally have the question:  "Can we program using the Heikin model in PCF?".  I am asking this question but DO NOT WANT TO ROCK ANY BOATS!

VALUE       Heikin-Ashi Definition

Close  = (Open+High+Low+Close)/4
Open   = (Open (previous bar) + Close (previous bar))/2
High   = Max (High, Open or Close)
Low    = Min (Low, Open or Close)

These definitions would put into question the PCF values of C, H, L, O.

Thanks

Bruce_L
 Posted : Friday, June 01, 2018 10:38:33 AM

Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Yes, we can write formulas using HA values.

HA Open (I know it doesn't look like you definition, but it really does match):

`XAVG(O1 + H1 + L1 + C1, 3) / 4`

HA High:

`GREATEST(H, XAVG(O1 + H1 + L1 + C1, 3) / 4)`

HA Low:

`LEAST(L, XAVG(O1 + H1 + L1 + C1, 3) / 4)`

HA Close:

`(O + H + L + C) / 4`

So it is generally just a matter of substituting in the desired values into your formulas in place of the normal O, H, L, or C syntax.

There are quite a few questions about HA already in the forums, so if you have something in particular you want to do, you may find somebody else has already tried to do it (in which case you might be able to find it with a search).

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
HarleyBD
 Posted : Friday, June 01, 2018 12:02:11 PM
Platinum Customer

Joined: 6/30/2014
Posts: 60

Wow!  You did it again, Bruce.  Like Al G. Ive had too much coffee and sent the request twice.

So for both StockGuy and Bruce  thanks!

Bruce_L
 Posted : Friday, June 01, 2018 12:32:26 PM

Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You're welcome.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

 Forum Jump Customer Training & Support - Ask a Trainer - TC2000 version 12/18 - Ask a Trainer - TC2000 version 7 - Ask a Trainer - StockFinder 5.0 - PCFs, EasyScan and Custom Indicators General Discussions - Stock and Market Talk - TC2000 version 12 or 18 - TC2000 version 7 - StockFinder 5.0 - RealCode for StockFinder 5.0 Tutorial Videos - TC2000 version 12 tutorial videos - TC2000 version 7 tutorial videos You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot delete your posts in this forum. You cannot edit your posts in this forum. You cannot create polls in this forum. You cannot vote in polls in this forum.