Registered User Joined: 2/19/2013 Posts: 18
|
Hello,
I would like to create a PCF for heiken ashi color, based on open/close. Also, I would like to use the last closed candle, not the current candle.
TC2000 allows you to view heiken ashi candles, based on open/close, under a charts price history. The pcf formula needs to match the heiken ashi candles displayed on the platform.
Thanks
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The formula that I think you want is highlighted in blue below. I've also included a more detailed explanation to allow you to test for yourself that the formulas are in fact correct. Note that if the "last closed candle" actually is the current candle as would be the case for the last candle of the day after the market has closed, the formula will return true for the previous candle on the the current candle even though the current candle is closed.
If Color Based On is set to Open vs Close, then the following must be true for that candle to be an Up Bar (normally green):
O + H + L + C >= XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1
If Color Based On is set to Net Change, then the following must be true for that candle to be an Up Bar (normally green):
O + H + L + C >= O1 + H1 + L1 + C1
You can test this for yourself rather easily by using the formula of interest as the Boolean Formula in a Custom PCF % True Indicator.
Adding and Moving Indicators
So, if you want to use the previous candle instead of the current candle, you need to add 1 to all of the bars ago parameters in the above formulas.
If Color Based On is set to Open vs Close, then the following must be true for the previous candle to be an Up Bar (normally green):
O1 + H1 + L1 + C1 >= XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2
If Color Based On is set to Net Change, then the following must be true for the previous candle to be an Up Bar (normally green):
O1 + H1 + L1 + C1 >= O2 + H2 + L2 + C2
Last closed candle indicators
-Bruce Personal Criteria Formulas TC2000 Support Articles
|