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 |

How to implement Heiken-Ashi substitutions for any Open, High, Low, and Close Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
wbunn
Posted : Tuesday, August 18, 2015 8:18:58 PM
Registered User
Joined: 10/7/2004
Posts: 39

Bruce,

I've read a number of you responses about substituting Heiken-Ashi formulas for spedific PCF's and formulas -  but I would like to know if there is a way to implement an overall substitution for any TC2000 Easyscan or watchlist.   For example, I have developed several multi-condition EasyScans for isolating stocks I'm interested in.  Do you have any suggestions for implementign these Heiken-Aski substitions that will cover any condition I might wish to use without having to make the substitutions on each PCF or formua.  

Thanks for any comments your offer.

 

William

Bruce_L
Posted : Wednesday, August 19, 2015 9:42:08 AM


Worden Trainer

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

There really isn't a way around manually substituing the appropriate components into the formulas. There is no way to force the condition to use Heiken-Ashi values instead of actual prices.

A formula for the Open of TC2000 version 12.4's Heiken-Ashi candles would be:

(XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4

A formula for the High of TC2000 version 12.4's Heiken-Ashi candles would be:

(H + (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4 + ABS(H - (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4)) / 2

A formula for the Low of TC2000 version 12.4's Heiken-Ashi candles would be:

(L + (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4 - ABS(L - (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4)) / 2

A formula for the Close of TC2000 version 12.4's Heiken-Ashi candles would be:

(O + H + L + C) / 4



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
OptionAndrew
Posted : Wednesday, April 13, 2016 6:49:21 PM
Registered User
Joined: 4/12/2016
Posts: 1

Hi Bruce,

 

I've seen these threads a bit, and I have just a couple of quesitions (I'm new to TC 2000).  First I don't quite understand the logic of these formulas or how the exponential moving average of the past 3 days translates into HA open/close/high/low.

The other question though is whether or not the new TC version allows for manipulation directly of HA bars.  I'd like to create a scan that filters when "x number of consecutive HA bars are positive/negative".

What would be the best way to do that?

 

Thanks so much. 

dhirenshah
Posted : Thursday, April 14, 2016 4:51:14 PM
Registered User
Joined: 3/10/2012
Posts: 465

hey OptionAndrew

I don;t have good answer for your first question however for the second question this might help 

this below formula is based on open vs close HA candes and for scanning consecutive bars positive or negative you can use this formula " the value returns upto 5 days of consecutive up HA bars or down HA bars and you can sort in watchlist 

 

ABS(O + H + L + C >= XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) + ABS(O + H + L + C >= XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) * (ABS(O1 + H1 + L1 + C1 >= XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2) + ABS(O1 + H1 + L1 + C1 >= XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2) * (ABS(O2 + H2 + L2 + C2 >= XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3) + ABS(O2 + L2 + H2 + C2 >= XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3) * (ABS(O3 + H3 + L3 + C3 >= XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4) + ABS(O3 + H3 + L3 + C3 >= XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4) * ABS(O4 + L4 + H4 + C4 >= XAVGO3.5 + XAVGH3.5 + XAVGL3.5 + XAVGC3.5)))) - (ABS(O + H + L + C < XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) + ABS(O + H + L + C < XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) * (ABS(O1 + H1 + L1 + C1 < XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2) + ABS(O1 + H1 + L1 + C1 < XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2) * (ABS(O2 + H2 + L2 + C2 < XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3) + ABS(O2 + L2 + H2 + C2 < XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3) * (ABS(O3 + H3 + L3 + C3 < XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4) + ABS(O3 + H3 + L3 + C3 < XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4) * ABS(O4 + L4 + H4 + C4 < XAVGO3.5 + XAVGH3.5 + XAVGL3.5 + XAVGC3.5)))))

 

goodluck 

Dhiren 

Bruce_L
Posted : Tuesday, April 19, 2016 2:29:08 PM


Worden Trainer

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

There isn't a way to just specify that the bars are HA and have the EasyScan work. You would need to create a Condition Formula such as what was already suggested by dhirenshah.

Let's start with the HA Close. That is just (O + H + L + C) / 4 and is fairly straightforward is it is given that way in most sources.

The HA Open is generally described as adding together the HA Open and HA Close from the previous bar and dividing by two.

(previous HA Open + previous HA Close) / 2

It is not quite intuitive as to why the 1 bar ago 3 period exponential moving average of the close can be safely substituted for this value. The reason this works is that an exponential moving average of something can be calculated by doing the following.

((period - 1) * previous EMA + 2 * whatever is being averaged) / (period + 1)

So if the period is 3, you get:

(2 * previous EMA + 2 * whatever is being average) / 4

Which simplifies down to the following:

(previous EMA + whatever is being averaged) / 2

So the 3 period EMA of the previous HA Close would be:

(previous EMA of HA Close + (O1 + H1 + L1 + C1) / 4)) / 2

Now we know the HA Open is very similar:

(previous HA Open + (O1 + H1 + L1 + C1) / 4)) / 2

This means that at each new bar anyway, the transformation that happens to either the previous EMA or the previous HA Open to get the new EMA or new EMA is identical.

So the only difference might be the initialization conditions. But because we are dividing the older contribitutions by two at each new bar, the initialization actually becomes trival to the calculations very quickly. So it doesn't matter if the initialization is the same or not.

So (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4 ends up being a very efficient way to correctly calculate HA Open.

The HA High is just the higher of the actual high or the HA Open and the HA Low is just the lower of the actual low or the HA Open. So we just use the techniques in the Min Max PCFs topic to create those two formulas.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Wednesday, April 20, 2016 1:22:36 PM
Registered User
Joined: 3/10/2012
Posts: 465

Hi Bruce 

Welcome back , 

In this topic i needed couple things in addition if its possible !

1) the above  formula that i posted count checks for 5 down or up days of HA candles open vs close  however I want to check in past 79 days this was true  by having ATLEAST consecutive 5 or more down days or up days in a row  and  if you can also do this pcf for  106 trading days  !

2-a ) what will be the PCF for large range Heikanashi DOJI using open vs close bars that has trading range higher and lower then past 5 trading days 

b) And that large range DOJI forms a fractal HIGH or LOW using fractal high formula as H2 * ABS(H < H2 AND H1 < H2 AND H2 > H3 AND H2 > H4)

and fractal low formula as L2 * ABS(L > L1 AND L1 > L2 AND L2 < L3 AND L3 < L4)

Thanks a lot bruce 
 
Cheers
 
Dhiren
Bruce_L
Posted : Wednesday, April 20, 2016 2:12:04 PM


Worden Trainer

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

I'm not sure I understand your first request, but if I do, you should be able to use the following Condition Formula as the Boolean Formula in a Custom PCF % True Indicator.

SGN(O + H + L + C - XAVGO3.1 - XAVGH3.1 - XAVGL3.1 - XAVGC3.1) = SGN(O1 + H1 + L1 + C1 - XAVGO3.2 - XAVGH3.2 - XAVGL3.2 - XAVGC3.2) AND SGN(O1 + H1 + L1 + C1 - XAVGO3.2 - XAVGH3.2 - XAVGL3.2 - XAVGC3.2) = SGN(O2 + H2 + L2 + C2 - XAVGO3.3 - XAVGH3.3 - XAVGL3.3 - XAVGC3.3) AND SGN(O2 + H2 + L2 + C2 - XAVGO3.3 - XAVGH3.3 - XAVGL3.3 - XAVGC3.3) = SGN(O3 + H3 + L3 + C3 - XAVGO3.4 - XAVGH3.4 - XAVGL3.4 - XAVGC3.4) AND SGN(O3 + H3 + L3 + C3 - XAVGO3.4 - XAVGH3.4 - XAVGL3.4 - XAVGC3.4) = SGN(O4 + H4 + L4 + C4 - XAVGO3.5 - XAVGH3.5 - XAVGL3.5 - XAVGC3.5)

The key to making it work is that you would need to set the Average Type to Simple and the Period to the number of bars over which you wish to check. So if you wanted to check for the percentage of the time there were at least 5 bars in a row going the same direction ending on one of the most recent 79 bars, you would set the Period to 79. You could just change the perido to 106 if you wanted to check that instead.

Condition True at Least Once Over x Bars

How close do the open and close need to be for your dojis? The open and close should pretty much never be exactly equal.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Wednesday, April 20, 2016 2:26:04 PM
Registered User
Joined: 3/10/2012
Posts: 465

Thanks Bruce I can work with that formula u posted ... the purpose was to check few Harmonic Patterns in past ... which i am able to see... .. in that context Do you think in Drawing tools developers can add XABCD tool  and AB=CD tool that would be a great help 

 

For DOJI less then 0.10 %

 

thanks 

Bruce_L
Posted : Wednesday, April 20, 2016 2:52:38 PM


Worden Trainer

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

Thank you for your suggestion.

So is 2 all one big formula that needs to check for a doji on an HA chart from two bars ago that had a higher high and lower low than both the two most recent bars and the five prior bars?



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Wednesday, April 20, 2016 2:55:20 PM
Registered User
Joined: 3/10/2012
Posts: 465

No  

I need 2A as seperate formula as i m going to use that in other context too

 

and 2B as seperate formula

 

cheers

Bruce_L
Posted : Wednesday, April 20, 2016 4:00:41 PM


Worden Trainer

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

Let's start with the doji portion of the Condition Formulas. Checking for the close of the current bar being within 0.1% of the open can be written as follows.

ABS((O + H + L + C) / (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) - 1) < .001

Checking for the high of the current bar being greater than the high of the previous five bars can be written as follows.

(H > MAXH5.1 AND 4 * H > XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2 AND 4 * H > XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 AND 4 * H > XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4 AND 4 * H > XAVGO3.5 + XAVGH3.5 + XAVGL3.5 + XAVGC3.5 AND 4 * H > XAVGO3.6 + XAVGH3.6 + XAVGL3.6 + XAVGC3.6) OR (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 > 5 * MAXH5.1 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 > XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 > XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 > XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 > XAVGO3.5 + XAVGH3.5 + XAVGL3.5 + XAVGC3.5 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 > XAVGO3.6 + XAVGH3.6 + XAVGL3.6 + XAVGC3.6)

Checking for the low of the current bar being less than the low of the previous five bars can be written as follows.

(L < MINL5.1 AND 4 * L < XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2 AND 4 * L < XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 AND 4 * L < XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4 AND 4 * L < XAVGO3.5 + XAVGH3.5 + XAVGL3.5 + XAVGC3.5 AND 4 * L < XAVGO3.6 + XAVGH3.6 + XAVGL3.6 + XAVGC3.6) OR (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 < 4 * MINL5.1 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 < XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 < XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 < XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 < XAVGO3.5 + XAVGH3.5 + XAVGL3.5 + XAVGC3.5 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 < XAVGO3.6 + XAVGH3.6 + XAVGL3.6 + XAVGC3.6)

Combining these three should get us 2A:

ABS((O + H + L + C) / (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) - 1) < .001 AND ((H > MAXH5.1 AND 4 * H > XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2 AND 4 * H > XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 AND 4 * H > XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4 AND 4 * H > XAVGO3.5 + XAVGH3.5 + XAVGL3.5 + XAVGC3.5 AND 4 * H > XAVGO3.6 + XAVGH3.6 + XAVGL3.6 + XAVGC3.6) OR (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 > 5 * MAXH5.1 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 > XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 > XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 > XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 > XAVGO3.5 + XAVGH3.5 + XAVGL3.5 + XAVGC3.5 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 > XAVGO3.6 + XAVGH3.6 + XAVGL3.6 + XAVGC3.6)) AND ((L < MINL5.1 AND 4 * L < XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2 AND 4 * L < XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 AND 4 * L < XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4 AND 4 * L < XAVGO3.5 + XAVGH3.5 + XAVGL3.5 + XAVGC3.5 AND 4 * L < XAVGO3.6 + XAVGH3.6 + XAVGL3.6 + XAVGC3.6) OR (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 < 4 * MINL5.1 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 < XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 < XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 < XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 < XAVGO3.5 + XAVGH3.5 + XAVGL3.5 + XAVGC3.5 AND XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 < XAVGO3.6 + XAVGH3.6 + XAVGL3.6 + XAVGC3.6))

The doji from two bars ago can be written as follows.

ABS((O2 + H2 + L2 + C2) / (XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3) - 1) < .001

The fractal high can be identified with the following Condition Formula.

(H2 > MAXH2 AND H2 > MAXH2.3 AND 4 * H2 > XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 AND 4 * H2 > XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2 AND 4 * H2 > XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4 AND 4 * H2 > XAVGO3.5 + XAVGH3.5 + XAVGL3.5 + XAVGC3.5) OR (XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 > 4 * MAXH2 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 > 4 * MAXH2.3 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 > XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 > XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 > XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 > XAVGO3.5 + XAVGH3.5 + XAVGL3.5 + XAVGC3.5)

The fractal low can be identified with the following Condition Formula.

(L2 < MINL2 AND L2 < MINL2.3 AND 4 * L2 < XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 AND 4 * L2 < XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2 AND 4 * L2 < XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4 AND 4 * L2 < XAVGO3.5 + XAVGH3.5 + XAVGL3.5 + XAVGC3.5) OR (XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 < 4 * MINL2 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 < 4 * MINL2.3 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 < XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 < XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 < XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 < XAVGO3.5 + XAVGH3.5 + XAVGL3.5 + XAVGC3.5)

So combining those three formulas to get 2B would be the following.

ABS((O2 + H2 + L2 + C2) / (XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3) - 1) < .001 AND ((H2 > MAXH2 AND H2 > MAXH2.3 AND 4 * H2 > XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 AND 4 * H2 > XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2 AND 4 * H2 > XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4 AND 4 * H2 > XAVGO3.5 + XAVGH3.5 + XAVGL3.5 + XAVGC3.5) OR (XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 > 4 * MAXH2 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 > 4 * MAXH2.3 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 > XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 > XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 > XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 > XAVGO3.5 + XAVGH3.5 + XAVGL3.5 + XAVGC3.5)) AND ((L2 < MINL2 AND L2 < MINL2.3 AND 4 * L2 < XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 AND 4 * L2 < XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2 AND 4 * L2 < XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4 AND 4 * L2 < XAVGO3.5 + XAVGH3.5 + XAVGL3.5 + XAVGC3.5) OR (XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 < 4 * MINL2 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 < 4 * MINL2.3 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 < XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 < XAVGO3.2 + XAVGH3.2 + XAVGL3.2 + XAVGC3.2 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 < XAVGO3.4 + XAVGH3.4 + XAVGL3.4 + XAVGC3.4 AND XAVGO3.3 + XAVGH3.3 + XAVGL3.3 + XAVGC3.3 < XAVGO3.5 + XAVGH3.5 + XAVGL3.5 + XAVGC3.5))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Wednesday, April 20, 2016 4:12:38 PM
Registered User
Joined: 3/10/2012
Posts: 465

Bruce for 2B to formulate 

the examples that i thought might help is on weekly chart for ticker LUV dec 11 2015 has doji with larger range and fractal high covering prior 5 bars range 

and ticker JBHT  on daily April 18,2016 has doji with larger range and fractal low covering prior 5 bars range 

And also if you could tell me in your response that if i want to adjust formula of DOJI and FRACTAL COMBO to work with prior 2 or 3 bars , how would i do that 

 

thanks 

dhirenshah
Posted : Wednesday, April 20, 2016 5:03:23 PM
Registered User
Joined: 3/10/2012
Posts: 465

Awesome Bruce , i guess I typed and you replied on my previous message so ignore the last one . thank you very much for the PCF's 

they all work perfect sorry if it was tedious work  I agree with Putt4dough that we missed you :)

You are Fibonnaci of Modern Times :)

Cheers

Dhrien 

stockscience
Posted : Friday, October 7, 2016 12:16:44 PM
Registered User
Joined: 6/26/2011
Posts: 128

Hi Bruce:

    I created a "2nd order HA close" using substitution as follows:

((XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4

+

(H + (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4 + ABS(H - (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4)) / 2

+

(L + (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4 - ABS(L - (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4)) / 2

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

 

 

 is it possible to get a second order HA high, second order  HA low,

and a second order HA open ?
 

Bruce_L
Posted : Friday, October 7, 2016 12:53:54 PM


Worden Trainer

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

Your formula for the 2nd order HA close can be shortened somewhat by combining the HA open and HA close. It might be possible it can be shortened more than this by combining the HA high and HA low or maybe by leaving the HA close on its own and combining the HA open, HA high and HA low, but I need to think about it a bit.

((XAVGO3 + XAVGH3 + XAVGL3 + XAVGC3) / 2 + (H + (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4 + ABS(H - (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4)) / 2 + (L + (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4 - ABS(L - (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4)) / 2) / 4

But the "2nd order HA open" involves substituting your formula (or a shortened version of it) for C in something like the following.

.50048876 * (C1 + .5 * (C2 + .5 * (C3 + .5 * (C4 + .5 * (C5 + .5 * (C6 + .5 * (C7 + .5 * (C8 + .5 * (C9 + .5 * (C10))))))))))

We can simplify some of that because the 3 period exponential moving average from one bar ago of (XAVGO3 + XAVGH3 + XAVGL3 + XAVGC3) / 2 is just (XAVG(XAVGO3.1,3) + XAVG(XAVGH3.1,3) + XAVG(XAVGL3.1,3) + XAVG(XAVGC3.1,3)) / 2 and that handles the EMAs of both the HA open and HA close.

I can't think of a way to avoid the substitutions of the longer HA high and HA low formulas into a manual EMA expansion. This is why thinking about further simplication of your formula is useful. I am not sure I can make the formulas short and fast enough to be practical otherwise because the 2nd order HA open needs to be included twice in the calculations for both the 2nd order HA high and 2nd order HA low.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Bruce_L
Posted : Friday, October 7, 2016 1:06:04 PM


Worden Trainer

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

Here is what I have come up with so far for the 2nd order HA close with a little be more combining.

((XAVGO3 + XAVGH3 + XAVGL3 + XAVGC3) / 2 + (H + L + (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 2 + ABS(H - (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4) - ABS(L - (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4)) / 2) / 4



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stockscience
Posted : Friday, October 7, 2016 1:06:45 PM
Registered User
Joined: 6/26/2011
Posts: 128

Thank you for your response. I value your support!

stockscience
Posted : Wednesday, October 12, 2016 2:49:38 PM
Registered User
Joined: 6/26/2011
Posts: 128

HA2 stop?

 

 

I am wondering if it is possible to calculate the value of c (assume it is equal to l ;and h and o are also known)

such that the second order close formula will be below X (some arbitrary formula).

Bruce_L
Posted : Wednesday, October 12, 2016 3:21:06 PM


Worden Trainer

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

If I am understanding the question it should be possible in some cases on a theoretical basis.

We have a formula for the second order HA Close.

((XAVGO3 + XAVGH3 + XAVGL3 + XAVGC3) / 2 + (H + L + (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 2 + ABS(H - (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4) - ABS(L - (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4)) / 2) / 4

We could do something like:

((XAVGO3 + XAVGH3 + XAVGL3 + XAVGC3) / 2 + (H + L + (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 2 + ABS(H - (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4) - ABS(L - (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4)) / 2) / 4 < X (some arbitrary formula)

Replace C with L (if we are to assume it is equal to L).

((XAVGO3 + XAVGH3 + 2 * XAVGL3) / 2 + (H + L + (XAVGO3.1 + XAVGH3.1 + 2 * XAVGL3.1) / 2 + ABS(H - (XAVGO3.1 + XAVGH3.1 + 2 * XAVGL3.1) / 4) - ABS(L - (XAVGO3.1 + XAVGH3.1 + 2 * XAVGL3.1) / 4)) / 2) / 4 < X (some arbitrary formula)

So assuming X contains C then you could substitute that in and then solve for C (or L if we substitute there as well).

But one of the problems is that the ABS() functions may make it so there are multiple solutions. The other problem is that it may just be really complicated to solve for C (or L).



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stockscience
Posted : Wednesday, October 12, 2016 3:57:08 PM
Registered User
Joined: 6/26/2011
Posts: 128

Thank you....  {One might  consider dealing  with the 1st order close instead:

       Thus,    (O+H+L+C)/4 < x 

so that        (2C+h+o) < 4*x

                   c        < 2*x  -(h+o)/2    especially if x is independent of c  }

Bruce_L
Posted : Wednesday, October 12, 2016 4:04:53 PM


Worden Trainer

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

Well there you go. At least in the case of the first order close, you were able to do it on your own when using x. Substitute your formula in for x and you should be fine as long as doesn't include C. If it does include C then resolve the equation for C.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stockscience
Posted : Wednesday, October 12, 2016 5:00:52 PM
Registered User
Joined: 6/26/2011
Posts: 128

So now what is cool is make X be the second order HA close.

so we want HA1C < HA2C = (HA1C+ HA1O+HA1L+HA1H) /4

so that 3HA1C < HA1O+HA1L+HA1H   so that   HA1C < average(HA1O,HA1L,HA1H)

so that       (O+H+L+C) < 4* average (HA1O+HA1L+HA1H)

so that C < 4/3*(HA1O+HA1L+HA1H) - O+H+L)

Bruce_L
Posted : Thursday, October 13, 2016 10:25:50 AM


Worden Trainer

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

I think that would be the following.

C < ((XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + 2 * (ABS(H - (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4) - ABS(L - (XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1) / 4) + XAVGO3 + XAVGH3 + XAVGL3 + XAVGC3.1 - H - L)) - 4 * O) / 3



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
stockscience
Posted : Thursday, October 13, 2016 12:49:10 PM
Registered User
Joined: 6/26/2011
Posts: 128

Thank you.

Bruce_L
Posted : Thursday, October 13, 2016 12:56:51 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
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.