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 |

QUANTIFYING FRACTALS Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
dhirenshah
Posted : Monday, May 2, 2016 7:55:22 PM
Registered User
Joined: 3/10/2012
Posts: 465

hi bruce 

i m using this HA formula as below 

(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)
 
 
(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)
 

I m trying to quantify the fractal high and low , what i need is trend of fractal showing HIGHER-HIGH AND HIGHER LOW IN UPTREND  and LOWER HIGH AND LOWER LOW IN DOWN TREND but the pcf  SPIKE should only become TRUE when the trend direction has two higher high and higher bottom for uptrend and two lower high and two lower bottom for downtrend IF IT DOES NOT MEET THAT CONDITION THEN IT SHOULD BE ZERO AND THE SPIKES SHOULD INCREASE AND DECREASE IN SIZE AS PER THE PRICE MOVEMENT ON THAT CHART OR TIMEFRAME USED

and IN ADDITION if possible to view them in Histogram FORMAT, would be a cherry on top :) where uptrend is plotted above zero and downtrend is plotted below zero

Thanks a lot Bruce your expertise is always appreciated !

Cheers

Dhiren

Bruce_L
Posted : Tuesday, May 3, 2016 1:09:09 PM


Worden Trainer

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

I cannot think of a way to create a formula which is short enough and fast enough to do what you want in TC2000.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Tuesday, May 3, 2016 3:52:56 PM
Registered User
Joined: 3/10/2012
Posts: 465

no worries Bruce, i know i sometimes I ask outside the box questions that are limited to software but your creative ideas always amaze me !

Anyways in the above formula what will i need to change or add so that high and low spikes happen only at FIBONACCI RATIOS of 0.618 and 0.786,  of that particular time framed chart ,

so for instance on 10 minute chart if the Lowest low fractal happen to be true and price retraces up from that low and comes 0.618 or 0.786 of that move then the spike should be true or else remain zero

same with if the highest high fractal on that 10 minute chart is true and price retraces down from that high comes to 0.618 or 0.786 of that move then the spike should be true or else remain zero 

Thanks Bruce 

Dhiren 

Bruce_L
Posted : Tuesday, May 3, 2016 4:22:07 PM


Worden Trainer

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

The basic problem with both of these things is identifying the previous fractals, the number of bars ago the fractals happened and the values of the lows and highs of the previous fractals.

We can plot them on the chart without much problem, but we need to use the techniques in the Days Since Last Peak (or other day-counting needs) topic to find the most recent previous value.

So we could use the technique to identify the most recent prior low on the day the current low is identified or the most recent prior high on the day the current high is identified, but we can't go two lows back or two highs back. We can't even identify the the low before the most recent low or the high before the most recent high on bars except on the bar where the most recent high or most recent low is currently identified. Otherwise we can only identify the most recent low or most recent high.

Even with those limitations in mind, the technique is generally only going to work where the formula to identify something can be written in a fairly short manner for the current bar. In this case, the formulas to identify the fractals on just the current bars are already very large. This in and of itself makes it so the technique really isn't going to work in this case. We might do better if we were just looking at the actual lows instead of adding all of the exponential moving average stuff (which I'm assuming is related to HA candles?).

L2 < MINL2 AND L2 < MINL2.3

But we would still have the limitations of being restricted to determining the value or number of bars ago of the most recent low or high (or most recent previous low or high on bars where that same type of fractal was identified during the current bar).

The formulas would still probably end up being quite long. I'm guessing something similar to what was created in the Script for Trendline topic.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Wednesday, May 4, 2016 2:19:07 AM
Registered User
Joined: 3/10/2012
Posts: 465

hmm ok i see what you mean Bruce , but that scripting looks more complicated part to achieve the result that i was trying to get 

from my May 03rd reply i can plot this on chart visually for what i was asking your help for making automated or pcf  its like thunderbolt  lightning pattern

And the gist is here in the post below of Harmonics from the forum

http://forums.worden.com/default.aspx?g=posts&t=57929

where to point out if you see the first two charts point A in the first chart is the highest high fractal and point B is lowest low fractal of that downtrend the price retraces to fib ratio of 38.2 as point C that becomes another fractal high but I wanted retracement of 0.618 or 0.786 of that downtrend A_B instead of 38.2 that&rsquo;s where I needed SPIKE, so the projected D can be estimated  

Also in the second chart if you notice this time the A point is lowest low  and price moves up to the B point and retraces to C at 50 % of the A-B leg ,, but I needed that C point 0.618 or 0.786  that&rsquo;s where the spike for PCF to happen so the projected D can be estimated ,

You have  assigned case number 9939  for this 3 years back so I guess fib trading is not popular because not many traders ask  for this kind of trading hence developers never moved ahead  to complete but  it&rsquo;s very important request to make Harmonics as part of TC charting interface , and there are many softwares that now do automated plotting  for these patterns , if you still think that from the example this can be achieved then please create a PCF at your leisure time , 

Cheers

Dhiren

Bruce_L
Posted : Wednesday, May 4, 2016 9:51:50 AM


Worden Trainer

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

Yeah, something like what is being done in the Harmonics topic for StockFinder definitely isn't happening using custom indicators in TC2000.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Wednesday, May 4, 2016 11:23:09 AM
Registered User
Joined: 3/10/2012
Posts: 465

Bruce one last question on this what to change in above formula so that it sticks as dots on  low or high of HA price bars instead of Spikes ? and if i needed 3 bar fractal instead of 5 then what to change ?

thanks a lot 

 

Dhiren

Bruce_L
Posted : Wednesday, May 4, 2016 11:48:24 AM


Worden Trainer

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

Something like the following:

L2 < MINL2 AND L2 < MINL2.3

Would need to be changed to the following and used in a Custom PCF Indicator using the Dot Plot Style.

L2 / ABS(L2 < MINL2 AND L2 < MINL2.3)

The 3 bar version of the would the following.

L3 / ABS(L3 < MINL3 AND L3 < MINL3.4)

The high version of the first formula would be:

H2 > MAXH2 AND H2 > MAXH2.3

Would would need to be converted to the following to plot dots.

H2 / ABS(H2 > MAXH2 AND H2 > MAXH2.3)

And the following for a 3 bar version.

H3 / ABS(H3 > MAXH3 AND H3 > MAXH3.4)

The top formula in your original post would just need to have L2 / ABS put in front of it.

L2 / ABS((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))

And the second formula in your original post would just need to have H2 / ABS put in front of it.

H2 / ABS((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))



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

bruce they work fine but none of them stick as to bottom of the wick for low or top of the wick for high they are either straight line dots or scattered 

Am i doing something wrong in plotting them using custom pcf indicator ?

Dhiren

Bruce_L
Posted : Wednesday, May 4, 2016 12:50:03 PM


Worden Trainer

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

The formulas are designed to just plot dots at the pivots. They are not designed to keep plotting dots until there is another pivot.

Making the dots keep plotting requires using the same Days Since Last Peak (or other day-counting needs) technique which made the other formulas too long and slow to be practical or post in the forums. In this case, the formulas are long, but still short enough to be postable.

So the 2 period low could be done as follows checking for the 40 most recent bars where the pivot could have happened.

ABS(MINL2 > L2 AND L2 < MINL2.3) * L2 + ABS(MINL2 <= L2 OR L2 >= MINL2.3) * (ABS(MINL2.1 > L3 AND L3 < MINL2.4) * L3 + ABS(MINL2.1 <= L3 OR L3 >= MINL2.4) * (ABS(MINL2.2 > L4 AND L4 < MINL2.5) * L4 + ABS(MINL2.2 <= L4 OR L4 >= MINL2.5) * (ABS(MINL2.3 > L5 AND L5 < MINL2.6) * L5 + ABS(MINL2.3 <= L5 OR L5 >= MINL2.6) * (ABS(MINL2.4 > L6 AND L6 < MINL2.7) * L6 + ABS(MINL2.4 <= L6 OR L6 >= MINL2.7) * (ABS(MINL2.5 > L7 AND L7 < MINL2.8) * L7 + ABS(MINL2.5 <= L7 OR L7 >= MINL2.8) * (ABS(MINL2.6 > L8 AND L8 < MINL2.9) * L8 + ABS(MINL2.6 <= L8 OR L8 >= MINL2.9) * (ABS(MINL2.7 > L9 AND L9 < MINL2.10) * L9 + ABS(MINL2.7 <= L9 OR L9 >= MINL2.10) * (ABS(MINL2.8 > L10 AND L10 < MINL2.11) * L10 + ABS(MINL2.8 <= L10 OR L10 >= MINL2.11) * (ABS(MINL2.9 > L11 AND L11 < MINL2.12) * L11 + ABS(MINL2.9 <= L11 OR L11 >= MINL2.12) * (ABS(MINL2.10 > L12 AND L12 < MINL2.13) * L12 + ABS(MINL2.10 <= L12 OR L12 >= MINL2.13) * (ABS(MINL2.11 > L13 AND L13 < MINL2.14) * L13 + ABS(MINL2.11 <= L13 OR L13 >= MINL2.14) * (ABS(MINL2.12 > L14 AND L14 < MINL2.15) * L14 + ABS(MINL2.12 <= L14 OR L14 >= MINL2.15) * (ABS(MINL2.13 > L15 AND L15 < MINL2.16) * L15 + ABS(MINL2.13 <= L15 OR L15 >= MINL2.16) * (ABS(MINL2.14 > L16 AND L16 < MINL2.17) * L16 + ABS(MINL2.14 <= L16 OR L16 >= MINL2.17) * (ABS(MINL2.15 > L17 AND L17 < MINL2.18) * L17 + ABS(MINL2.15 <= L17 OR L17 >= MINL2.18) * (ABS(MINL2.16 > L18 AND L18 < MINL2.19) * L18 + ABS(MINL2.16 <= L18 OR L18 >= MINL2.19) * (ABS(MINL2.17 > L19 AND L19 < MINL2.20) * L19 + ABS(MINL2.17 <= L19 OR L19 >= MINL2.20) * (ABS(MINL2.18 > L20 AND L20 < MINL2.21) * L20 + ABS(MINL2.18 <= L20 OR L20 >= MINL2.21) * (ABS(MINL2.19 > L21 AND L21 < MINL2.22) * L21 + ABS(MINL2.19 <= L21 OR L21 >= MINL2.22) * (ABS(MINL2.20 > L22 AND L22 < MINL2.23) * L22 + ABS(MINL2.20 <= L22 OR L22 >= MINL2.23) * (ABS(MINL2.21 > L23 AND L23 < MINL2.24) * L23 + ABS(MINL2.21 <= L23 OR L23 >= MINL2.24) * (ABS(MINL2.22 > L24 AND L24 < MINL2.25) * L24 + ABS(MINL2.22 <= L24 OR L24 >= MINL2.25) * (ABS(MINL2.23 > L25 AND L25 < MINL2.26) * L25 + ABS(MINL2.23 <= L25 OR L25 >= MINL2.26) * (ABS(MINL2.24 > L26 AND L26 < MINL2.27) * L26 + ABS(MINL2.24 <= L26 OR L26 >= MINL2.27) * (ABS(MINL2.25 > L27 AND L27 < MINL2.28) * L27 + ABS(MINL2.25 <= L27 OR L27 >= MINL2.28) * (ABS(MINL2.26 > L28 AND L28 < MINL2.29) * L28 + ABS(MINL2.26 <= L28 OR L28 >= MINL2.29) * (ABS(MINL2.27 > L29 AND L29 < MINL2.30) * L29 + ABS(MINL2.27 <= L29 OR L29 >= MINL2.30) * (ABS(MINL2.28 > L30 AND L30 < MINL2.31) * L30 + ABS(MINL2.28 <= L30 OR L30 >= MINL2.31) * (ABS(MINL2.29 > L31 AND L31 < MINL2.32) * L31 + ABS(MINL2.29 <= L31 OR L31 >= MINL2.32) * (ABS(MINL2.30 > L32 AND L32 < MINL2.33) * L32 + ABS(MINL2.30 <= L32 OR L32 >= MINL2.33) * (ABS(MINL2.31 > L33 AND L33 < MINL2.34) * L33 + ABS(MINL2.31 <= L33 OR L33 >= MINL2.34) * (ABS(MINL2.32 > L34 AND L34 < MINL2.35) * L34 + ABS(MINL2.32 <= L34 OR L34 >= MINL2.35) * (ABS(MINL2.33 > L35 AND L35 < MINL2.36) * L35 + ABS(MINL2.33 <= L35 OR L35 >= MINL2.36) * (ABS(MINL2.34 > L36 AND L36 < MINL2.37) * L36 + ABS(MINL2.34 <= L36 OR L36 >= MINL2.37) * (ABS(MINL2.35 > L37 AND L37 < MINL2.38) * L37 + ABS(MINL2.35 <= L37 OR L37 >= MINL2.38) * (ABS(MINL2.36 > L38 AND L38 < MINL2.39) * L38 + ABS(MINL2.36 <= L38 OR L38 >= MINL2.39) * (ABS(MINL2.37 > L39 AND L39 < MINL2.40) * L39 + ABS(MINL2.37 <= L39 OR L39 >= MINL2.40) * (ABS(MINL2.38 > L40 AND L40 < MINL2.41) * L40 + ABS(MINL2.38 <= L40 OR L40 >= MINL2.41) * (ABS(MINL2.39 > L41 AND L41 < MINL2.42) * L41)))))))))))))))))))))))))))))))))))))))

And the 2 period high of the same formula would change L to H, MIN to MAX and reverse the > and < signs.

ABS(MAXH2.0 < H2 AND H2 > MAXH2.3) * H2 + ABS(MAXH2.0 >= H2 OR H2 <= MAXH2.3) * (ABS(MAXH2.1 < H3 AND H3 > MAXH2.4) * H3 + ABS(MAXH2.1 >= H3 OR H3 <= MAXH2.4) * (ABS(MAXH2.2 < H4 AND H4 > MAXH2.5) * H4 + ABS(MAXH2.2 >= H4 OR H4 <= MAXH2.5) * (ABS(MAXH2.3 < H5 AND H5 > MAXH2.6) * H5 + ABS(MAXH2.3 >= H5 OR H5 <= MAXH2.6) * (ABS(MAXH2.4 < H6 AND H6 > MAXH2.7) * H6 + ABS(MAXH2.4 >= H6 OR H6 <= MAXH2.7) * (ABS(MAXH2.5 < H7 AND H7 > MAXH2.8) * H7 + ABS(MAXH2.5 >= H7 OR H7 <= MAXH2.8) * (ABS(MAXH2.6 < H8 AND H8 > MAXH2.9) * H8 + ABS(MAXH2.6 >= H8 OR H8 <= MAXH2.9) * (ABS(MAXH2.7 < H9 AND H9 > MAXH2.10) * H9 + ABS(MAXH2.7 >= H9 OR H9 <= MAXH2.10) * (ABS(MAXH2.8 < H10 AND H10 > MAXH2.11) * H10 + ABS(MAXH2.8 >= H10 OR H10 <= MAXH2.11) * (ABS(MAXH2.9 < H11 AND H11 > MAXH2.12) * H11 + ABS(MAXH2.9 >= H11 OR H11 <= MAXH2.12) * (ABS(MAXH2.10 < H12 AND H12 > MAXH2.13) * H12 + ABS(MAXH2.10 >= H12 OR H12 <= MAXH2.13) * (ABS(MAXH2.11 < H13 AND H13 > MAXH2.14) * H13 + ABS(MAXH2.11 >= H13 OR H13 <= MAXH2.14) * (ABS(MAXH2.12 < H14 AND H14 > MAXH2.15) * H14 + ABS(MAXH2.12 >= H14 OR H14 <= MAXH2.15) * (ABS(MAXH2.13 < H15 AND H15 > MAXH2.16) * H15 + ABS(MAXH2.13 >= H15 OR H15 <= MAXH2.16) * (ABS(MAXH2.14 < H16 AND H16 > MAXH2.17) * H16 + ABS(MAXH2.14 >= H16 OR H16 <= MAXH2.17) * (ABS(MAXH2.15 < H17 AND H17 > MAXH2.18) * H17 + ABS(MAXH2.15 >= H17 OR H17 <= MAXH2.18) * (ABS(MAXH2.16 < H18 AND H18 > MAXH2.19) * H18 + ABS(MAXH2.16 >= H18 OR H18 <= MAXH2.19) * (ABS(MAXH2.17 < H19 AND H19 > MAXH2.20) * H19 + ABS(MAXH2.17 >= H19 OR H19 <= MAXH2.20) * (ABS(MAXH2.18 < H20 AND H20 > MAXH2.21) * H20 + ABS(MAXH2.18 >= H20 OR H20 <= MAXH2.21) * (ABS(MAXH2.19 < H21 AND H21 > MAXH2.22) * H21 + ABS(MAXH2.19 >= H21 OR H21 <= MAXH2.22) * (ABS(MAXH2.20 < H22 AND H22 > MAXH2.23) * H22 + ABS(MAXH2.20 >= H22 OR H22 <= MAXH2.23) * (ABS(MAXH2.21 < H23 AND H23 > MAXH2.24) * H23 + ABS(MAXH2.21 >= H23 OR H23 <= MAXH2.24) * (ABS(MAXH2.22 < H24 AND H24 > MAXH2.25) * H24 + ABS(MAXH2.22 >= H24 OR H24 <= MAXH2.25) * (ABS(MAXH2.23 < H25 AND H25 > MAXH2.26) * H25 + ABS(MAXH2.23 >= H25 OR H25 <= MAXH2.26) * (ABS(MAXH2.24 < H26 AND H26 > MAXH2.27) * H26 + ABS(MAXH2.24 >= H26 OR H26 <= MAXH2.27) * (ABS(MAXH2.25 < H27 AND H27 > MAXH2.28) * H27 + ABS(MAXH2.25 >= H27 OR H27 <= MAXH2.28) * (ABS(MAXH2.26 < H28 AND H28 > MAXH2.29) * H28 + ABS(MAXH2.26 >= H28 OR H28 <= MAXH2.29) * (ABS(MAXH2.27 < H29 AND H29 > MAXH2.30) * H29 + ABS(MAXH2.27 >= H29 OR H29 <= MAXH2.30) * (ABS(MAXH2.28 < H30 AND H30 > MAXH2.31) * H30 + ABS(MAXH2.28 >= H30 OR H30 <= MAXH2.31) * (ABS(MAXH2.29 < H31 AND H31 > MAXH2.32) * H31 + ABS(MAXH2.29 >= H31 OR H31 <= MAXH2.32) * (ABS(MAXH2.30 < H32 AND H32 > MAXH2.33) * H32 + ABS(MAXH2.30 >= H32 OR H32 <= MAXH2.33) * (ABS(MAXH2.31 < H33 AND H33 > MAXH2.34) * H33 + ABS(MAXH2.31 >= H33 OR H33 <= MAXH2.34) * (ABS(MAXH2.32 < H34 AND H34 > MAXH2.35) * H34 + ABS(MAXH2.32 >= H34 OR H34 <= MAXH2.35) * (ABS(MAXH2.33 < H35 AND H35 > MAXH2.36) * H35 + ABS(MAXH2.33 >= H35 OR H35 <= MAXH2.36) * (ABS(MAXH2.34 < H36 AND H36 > MAXH2.37) * H36 + ABS(MAXH2.34 >= H36 OR H36 <= MAXH2.37) * (ABS(MAXH2.35 < H37 AND H37 > MAXH2.38) * H37 + ABS(MAXH2.35 >= H37 OR H37 <= MAXH2.38) * (ABS(MAXH2.36 < H38 AND H38 > MAXH2.39) * H38 + ABS(MAXH2.36 >= H38 OR H38 <= MAXH2.39) * (ABS(MAXH2.37 < H39 AND H39 > MAXH2.40) * H39 + ABS(MAXH2.37 >= H39 OR H39 <= MAXH2.40) * (ABS(MAXH2.38 < H40 AND H40 > MAXH2.41) * H40 + ABS(MAXH2.38 >= H40 OR H40 <= MAXH2.41) * (ABS(MAXH2.39 < H41 AND H41 > MAXH2.42) * H41)))))))))))))))))))))))))))))))))))))))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Wednesday, May 4, 2016 1:07:54 PM
Registered User
Joined: 3/10/2012
Posts: 465

Ouch Sorry Bruce i did n't know you will have to do more on this ... but i can use this custom indicator formula that sticks on wicks for low L2 * ABS(L > L1 AND L1 > L2 AND L2 < L3 AND L3 < L4) and for high H2 * ABS(H < H2 AND H1 < H2 AND H2 > H3 AND H2 > H4)

but it misses ploting on occassional some bars  from the above formula in my first post  hence i was trying to modify the above to make in dots when we using HA bars open vs close  so that it sticks on price bars 

Ok so end of this topic will bother you with something else another time  , till then 

Cheers and Thanks 

 

Dhiren 

Bruce_L
Posted : Wednesday, May 4, 2016 1:11:30 PM


Worden Trainer

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

You're welcome. I actually like writing the more complicated formulas (I think the formulas are fun to figure out and write). There are just limits on how long the formulas can be and still be fast enough to be practical and post.



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

hi Bruce 

Your post of  04 May 2016  gives me flat line when using custom % indicator ,, i was trying to use it as 3 bar fractal and adding 1 period moving offset -2,,, can u please tell me if you getting same error  ?? when i modified L2 / ABS  to L2 * ABS BEGINNING OF FORMULA  IT GIVES ME SIMILAR RESULT AS 5 BAR FRACTAL BUT  i need spike at 3 bar fractal  is there something else to modify ?? 

 

The top formula in your original post would just need to have L2 / ABS put in front of it.

L2 / ABS((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))

And the second formula in your original post would just need to have H2 / ABS put in front of it.

H2 / ABS((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))

 

Sorry to reopen this topic  :)

 

Bruce_L
Posted : Tuesday, May 10, 2016 3:45:59 PM


Worden Trainer

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

If you are going to use the formulas you quoted in your most recent post in a Custom PCF % True Indicator, you need to take the L2 / ABS back off the front of the formulas.

The L2 / ABS() portion takes L2 and divides it be 1 if the stuff inside the parentheses is true and divides it by 0 if the stuff inside the parentheses is false.

This generates a division by zero error when the stuff inside the parentheses is false. It is designed specifically for plotting using the Dot Plot Style with a Custom PCF Indicator as this will plot a dot when it is true and nothing when it is false. If you use the Line Plot Style, it is just going to connect the dots and create a straight line.

Using L2 * ABS() instead of L2 / ABS() works in a similar way, but because you are multiplying by zero instead of dividing by zero, it plots 0 when false instead of not plotting anything at all.

As far as doing a 3 bar version, that was the intent of the following section.

QUOTE (Bruce_L)
Something like the following:

L2 < MINL2 AND L2 < MINL2.3

Would need to be changed to the following and used in a Custom PCF Indicator using the Dot Plot Style.

L2 / ABS(L2 < MINL2 AND L2 < MINL2.3)

The 3 bar version of the would the following.

L3 / ABS(L3 < MINL3 AND L3 < MINL3.4)

The high version of the first formula would be:

H2 > MAXH2 AND H2 > MAXH2.3

Would would need to be converted to the following to plot dots.

H2 / ABS(H2 > MAXH2 AND H2 > MAXH2.3)

And the following for a 3 bar version.

H3 / ABS(H3 > MAXH3 AND H3 > MAXH3.4)

Note that it lists 2 bar versions followed by the 3 bar alteration (because that is the number of highs or low before and after the central high or low). I have no idea what would have to change as far as the rest of your original formula goes to convert it from "2 bar to 3 bar".

With that in mind, if you think the old versions were "5 bar" versions, then you probably actually wanted to shorten it to check for only 1 lower high on each side a central high or 1 higher low on each side a central low to get the "3 bar" version.

L1 / ABS(L1 < L2 AND L1 < L)

H1 / ABS(H1 > H2 AND H1 > H)

You only need the stuff inside the parentheses for the Custom PCF % True Indicator versions.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Tuesday, May 10, 2016 4:18:50 PM
Registered User
Joined: 3/10/2012
Posts: 465

YES bruce 

With that in mind, if you think the old versions were "5 bar" versions, then you probably actually wanted to shorten it to check for only 1 lower high on each side a central high or 1 higher low on each side a central low to get the "3 bar" version.

L1 / ABS(L1 < L2 AND L1 < L)

H1 / ABS(H1 > H2 AND H1 > H)

 

this formula that you wrote seems to give me results correct of 3 bar fractal that i wanted but how to get the dot exact to to the low or high of that central bar  ?? i did scale with price but it plots one bar ahead of the fractal low or high , so how to off set that  ???

I added 1 period Simple moving average and -1 offset but then it does not align to the most recent fractal low 

 

 

 

 

 

Bruce_L
Posted : Tuesday, May 10, 2016 5:22:14 PM


Worden Trainer

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

There is no way to write a formula which looks into the future, so the first point where the formula can return true is after the middle high or low (because there have to be lower highs or higher lows following the central ba).

What you need to do if you want to plot the dot on the middle bar itself is add a 1-period moving average to the Custom PCF Indicator which also uses the Dot Plot Style. You will set the Offset setting to the number of bars you need to shift the dot (+ values move the dot to the right and - values move the dot to the left).

You seem to already have that part down... so I really don't know why it wouldn't line up after it is shifted. Is it in the same scale? Click on the moving average (or the Custom PCF Indicator probably) and select Scaling. Make sure it is set to the same scale as price.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Wednesday, May 11, 2016 4:29:51 AM
Registered User
Joined: 3/10/2012
Posts: 465

Okay Bruce i finally managed to work around this using your info for 3 bar fractal in custom indicator and scaling with price

L1 * ABS(L > L1 AND L1 < L2)  also adding 1 period moving average and offsetting -1 GIVES ME CENTRAL BAR

H1 * ABS(H < H1 AND H1 > H2) also adding 1 period moving average and offsetting -1 GIVES ME CENTRAL BAR

this above works perfect for what i needed as 3 bar fractal 

In addition if you check i asked in my first post of may 02,2016 to have fractals in trend so this above formula when I modified as custom indicator works for what i wanted as below 

ABS(L1 * ABS(L > L1 AND L1 < L2))*V  and adding 1 period moving average offsetting -1  and if you see the fractal lows WHEN PLOTTED IN HISTOGRAM are marginally of different heights as the price trends  LOWER OR HIGHER and 

ABS(H1 * ABS(H < H1 AND H1 > H2))*V  and adding 1 period moving average offsetting -1 and if you see the fractal highs WHEN PLOTTED IN HISTOGRAM are marginally of different heights as the price trends  HIGHER OR LOWER

so i want to add PRICE VOLUME TREND INTO THIS FORMULA TO GET HISTOGRAM FOR upside and downside  MOMENTUM OF VOLUME TO PRICE ACTION only FOR those fractal bars

BRUCE IS THIS POSSIBLE NOW ?? 

Thanks for your help and reply !

 

 

 

Bruce_L
Posted : Wednesday, May 11, 2016 9:41:54 AM


Worden Trainer

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

I really don't know for sure what you are trying to do, so I could not say for sure. Is something like the following what you are trying to do?

V * ((H < H1 AND H1 > H2) - (L > L1 AND L1 < L2))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Wednesday, May 11, 2016 12:59:53 PM
Registered User
Joined: 3/10/2012
Posts: 465

Okay Bruce 

I think we getting there, 

I used your last formula and modified to appear like this 

V*((L > L1 AND L1 < L2) - (H < H1 AND H1 > H2)) and adding 1 period moving average off set -1 gives me perfect fractal lows below zero and fractal highs above zero in histogram this is the first part of my equation which is solved 

next i wanted without disturbing the above formula a new pcf spike % true indicator  that i can overlay on above formula only when this below criteria meets

trend of fractal showing HIGHER-HIGH AND HIGHER LOW IN UPTREND  and LOWER HIGH AND LOWER LOW IN DOWN TREND but the pcf  SPIKE should only become TRUE when the trend direction has two higher high and higher bottom for uptrend and two lower high and two lower bottom for downtrend IF IT DOES NOT MEET THAT CONDITION THEN IT SHOULD BE ZERO

Thanks for being patient on this :)

 

Bruce_L
Posted : Wednesday, May 11, 2016 1:05:10 PM


Worden Trainer

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

Maybe something the like the following?

(H > H1 AND L > L1 AND H1 > H2 AND L1 > L2) OR (H < H1 AND L < L1 AND H1 < H2 AND L1 < L2)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Thursday, May 12, 2016 7:28:17 PM
Registered User
Joined: 3/10/2012
Posts: 465

No Bruce your last formula does not give me what i was looking for , 

Okay let me ask you this question in another way

Suppose if i want spike of pcf to be true only if within last 26 bars the most recent fractal high was lower then the previous fractal high then spike should be true this will give me price downward slope confirmation 

similarly if in last 26 bars the most recent fracal low is higher then the previous fractal low then spike should be true this will give me price upward confirmation , 

Lets take an example of AMZN on weekly if you see feb 12,2016 was 3 bar fractal low , then march 24,2016 was 3 bar fractal low ( so i need the pcf spike to happen on march 24,2016  as that will make pcf true),

similarly Amzn on weekly if you see dec 31,2015 was 3 bar fractal high and jan 29,2016 was 3 bar fractal high (so i need pcf spike to happen on Jan 29,2016 as that will make pcf true) 

the example was based on central bar fractal highs and lows

I guess you may have to re-write two PCF; for them one for highs and one for lows 

Thanks a lot Bruce 

Cheers

Dhiren 

 

Bruce_L
Posted : Friday, May 13, 2016 8:56:34 AM


Worden Trainer

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

I already explained that this is not possible in my Tuesday, May 03, 2016 4:22:07 PM ET post. Nothing has changed in this regard.

We can create very long formulas based on the two most recent highs or lows only on the bar where the most recent high or low is detected.

In other cases would we be limited to knowing the value of the most recent high or low and have no way to access the value of any previous highs or lows beyond the most recent one.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Friday, May 13, 2016 10:37:17 AM
Registered User
Joined: 3/10/2012
Posts: 465

ok Bruce 

thanks fo trying ,

cheers

Bruce_L
Posted : Friday, May 13, 2016 11:25:24 AM


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.