Registered User 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
|
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).
Learn how to use the forums: post a new topic, reply, Search existing topics
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User 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!
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|