Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Indicators and Scans on Heiken Ashi charts Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
tspara
Posted : Thursday, January 31, 2013 12:55:35 PM
Gold Customer Gold Customer

Joined: 12/15/2004
Posts: 34

Trying to create a scan for stocks that show a Heiken Ashi closing price crossover of a moving average (e.g. 30 period).  I am not sure whether using a standard scan from a Heiken Ashi chart and a 30 period moving average works because I am not sure whether the price and moving average calculations on that chart are using actual prices or Heiken Ashi calculated prices.  So I am tryng to create a PCF for this crossover.   I have attempted the following formula but get syntax errors:

(O+H+L+C)/4 > AVG((O+H+L+C)/4,30) and (O1+H1+L1+C1)/4 < AVG((O1+H1+L1+C1)/4,30)

Questions 1:  Are indicators and scans on charts configured for Heiken Ashi bars using calculated Heiken Ashi values to compute the indicators and scans or are they using actual price values.

Question 2:  If the answer to Question 1 is the latter (uses actual price values), can a PCF be created to show the moving average crossover using the Heiken Ashi values for the moving average calculation?  My PCF attempt seems to have failed.

Bruce_L
Posted : Thursday, January 31, 2013 1:12:05 PM


Worden Trainer

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

I've run some basic tests and Child Indicators added to HA prices seem to be calculated using those HA prices. This includes things such as Acceleration Bands, Bollinger Bands, Custom PCF Channel Indicators, Donchian Channels, Envelope Channels, Keltner Channels, Linear Regression Line, Moving Averages and Time Series Forecast.

That said, the Condition resulting from clicking on Price History or its child indicators and selecting Create Scan Condition appear to be based on actual prices and not HA prices even when Heiken-Ashi is selected as the Plot Style.

Your Condition Formula is very close. The only problem is that the AVG() function cannot accept compound formulas as arguments. It could be written to use valid syntax however as:

O + H + L + C > AVGO30 + AVGH30 + AVGL30 + AVGC30 AND O1 + H1 + L1 + C1 <= AVGO30.1 + AVGH30.1 + AVGL30.1 + AVGC30.1



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
tspara
Posted : Thursday, January 31, 2013 1:30:28 PM
Gold Customer Gold Customer

Joined: 12/15/2004
Posts: 34

Thanks, Bruce.  Very Helpful.

tspara
Posted : Friday, February 1, 2013 9:18:31 AM
Gold Customer Gold Customer

Joined: 12/15/2004
Posts: 34

just one note on the formula you provided.  if I understand how HA is calculated, I think you have to divide the O+H+L+C values by four.  I made this modification and the moving average was calculated identically to what is done by TC2000 (the lines overlapped).  So TC2000 does calculated the moving average using HA values, but you are right in that it does not use the HA values when running scans that are based on price.

Bruce_L
Posted : Friday, February 1, 2013 9:46:26 AM


Worden Trainer

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

Yes, the values are divided by four when you add the open, high, low and close together, but you also divide by four when you add the moving averages of the open, high, low and close together. Because you divide by four on both sides of the inequality, you can eliminate the division from both sides of the inequality and make the resulting formula simpler and more computationally efficient.



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

Forum Jump
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.