Subscription & data-feed pricing Class schedule

Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.

 Wide range bar and Pull back within the bar Rate this Topic:     Previous Topic · Next Topic Watch this topic · Print this topic ·
dhirenshah
 Posted : Monday, April 01, 2019 12:39:08 AM
Registered User
Joined: 3/10/2012
Posts: 465

Bruce is there way to create a pcf where there is a wide range UP bar in past and pull back stays within the low to the high of the bar and current bar breaks above the LOWEST high of the bar within the pull back thats where we need the Spike ---please see the attached link

And can the same be done for reverse scenario where there is a wide range Down bar in past and pull back stays within the high to the low of the bar and current bar breaks below the low of  highest high bar within the pull back thats where we need the Spike

thanks

Bruce_L
 Posted : Monday, April 01, 2019 1:24:47 PM  Worden Trainer

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

Does there have to be a certain number of bars within the range of the high range bar in order for it to count, or are you defining the high range bar in some other way?

If I had just read your definition, I would assume all of the highs and lows had to be inside the high range bar, but that doesn't seem to be the case in at least one of your illustrations. What needs to be inside the high range bar? Just the open and close? Is the high range bar defined by the high and low of the bar or the open and close of the bar?

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
 Posted : Monday, April 01, 2019 1:34:18 PM
Registered User
Joined: 3/10/2012
Posts: 465

Yes Bruce thankyou for pointing that out i should have mentioned more specific , i need the open and close (of all other bars) inside the high and low of the wide range bar as per the second illustration shows

dhirenshah
 Posted : Tuesday, April 02, 2019 2:21:36 PM
Registered User
Joined: 3/10/2012
Posts: 465

Bruce anything on this yet ?/

I m attaching more illustrations just incase

Bruce_L
 Posted : Tuesday, April 02, 2019 2:30:37 PM  Worden Trainer

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

OK, let's assume a wide bar just has all of the opens and closes since that bar inside the high and low of the wide bar without any other requirements besides direction.

Basically we are going to check for as many of the possible number of bars where this can happen as is practical or desirable and `OR` these possibilities together.

So the shortest possible pattern would be three bars long.

`(H1 < C AND O2 < C2 AND L2 < MINC2 AND MAXC2 < H2)`

The next possibility would be a four bar long pattern.

`(MINH2.1 < C AND O3 < C3 AND L3 < MINC3 AND MAXC3 < H3)`

Then the next would be five bars long.

`(MINH3.1 < C AND O4 < C4 AND L4 < MINC4 AND MAXC4 < H4)`

So if we were to just look at those three possible patterns and OR them together, we would get the following.

`(H1 < C AND O2 < C2 AND L2 < MINC2 AND MAXC2 < H2) OR (MINH2.1 < C AND O3 < C3 AND L3 < MINC3 AND MAXC3 < H3) OR (MINH3.1 < C AND O4 < C4 AND L4 < MINC4 AND MAXC4 < H4)`

You can take this out as far as you want. I don't really know of any way to optimize it so you don't have to write out each pattern individually. You may or may not want to include the shorter patterns and only have longer patterns.

Inverting this results in the following formulas for three, four, and five bar patterns.

`(C < L1 AND C2 < O2 AND L2 < MINC2 AND MAXC2 < H2)`

`(C < MAXL2.1 AND C3 < O3 AND L3 < MINC3 AND MAXC3 < H3)`

`(C < MAXL3.1 AND C4 < O4 AND L4 < MINC4 AND MAXC4 < H4)`

Giving you the following when they are combined. You can extend it just like the other one.

`(C < L1 AND C2 < O2 AND L2 < MINC2 AND MAXC2 < H2) OR (C < MAXL2.1 AND C3 < O3 AND L3 < MINC3 AND MAXC3 < H3) OR (C < MAXL3.1 AND C4 < O4 AND L4 < MINC4 AND MAXC4 < H4)`

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
 Posted : Tuesday, April 02, 2019 3:12:08 PM
Registered User
Joined: 3/10/2012
Posts: 465

No Bruce i think the pcf are pulling too many fake signals

lets try this way , can you please edit and add this pcf  3 * (C - O) >= 2 * (H - L) AND H > L

into this formula

(H1 < C AND O2 < C2 AND L2 < MINC2 AND MAXC2 < H2) OR (MINH2.1 < C AND O3 < C3 AND L3 < MINC3 AND MAXC3 < H3) OR (MINH3.1 < C AND O4 < C4 AND L4 < MINC4 AND MAXC4 < H4)

So i want 3 * (C - O) >= 2 * (H - L) AND H > L  this formula as WIDE BAR range of past then your created formula and lets go upto 10 bars using OR

And same for the bearish can you please edit and add this pcf 3 * (C - O) <= 2 * (L - H) AND H > L

into this formula

(C < L1 AND C2 < O2 AND L2 < MINC2 AND MAXC2 < H2) OR (C < MAXL2.1 AND C3 < O3 AND L3 < MINC3 AND MAXC3 < H3) OR (C < MAXL3.1 AND C4 < O4 AND L4 < MINC4 AND MAXC4 < H4)

So i want 3 * (C - O) <= 2 * (L - H) AND H > L this formula as WIDE BAR bearish range of past then your created formula and lets go upto 10 bars using OR

Bruce_L
 Posted : Tuesday, April 02, 2019 3:36:33 PM  Worden Trainer

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

Please try the following bullish version.

`(H1 < C AND O2 < C2 AND 2 * (H2 - L2) / 3 <= C2 - O2 AND L2 < MINC2 AND MAXC2 < H2) OR (MINH2.1 < C AND O3 < C3 AND 2 * (H3 - L3) / 3 <= C3 - O3 AND L3 < MINC3 AND MAXC3 < H3) OR (MINH3.1 < C AND O4 < C4 AND 2 * (H4 - L4) / 3 <= C4 - O4 AND L4 < MINC4 AND MAXC4 < H4) OR (MINH4.1 < C AND O5 < C5 AND 2 * (H5 - L5) / 3 <= C5 - O5 AND L5 < MINC5 AND MAXC5 < H5) OR (MINH5.1 < C AND O6 < C6 AND 2 * (H6 - L6) / 3 <= C6 - O6 AND L6 < MINC6 AND MAXC6 < H6) OR (MINH6.1 < C AND O7 < C7 AND 2 * (H7 - L7) / 3 <= C7 - O7 AND L7 < MINC7 AND MAXC7 < H7) OR (MINH7.1 < C AND O8 < C8 AND 2 * (H8 - L8) / 3 <= C8 - O8 AND L8 < MINC8 AND MAXC8 < H8) OR (MINH8.1 < C AND O9 < C9 AND 2 * (H9 - L9) / 3 <= C9 - O9 AND L9 < MINC9 AND MAXC9 < H9) OR (MINH9.1 < C AND O10 < C10 AND 2 * (H10 - L10) / 3 <= C10 - O10 AND L10 < MINC10 AND MAXC10 < H10) OR (MINH10.1 < C AND O11 < C11 AND 2 * (H11 - L11) / 3 <= C11 - O11 AND L11 < MINC11 AND MAXC11 < H11)`

And the following bearish version.

`(C < L1 AND C2 < O2 AND 2 * (H2 - L2) / 3 <= O2 - C2 AND L2 < MINC2 AND MAXC2 < H2) OR (C < MAXL2.1 AND C3 < O3 AND 2 * (H3 - L3) / 3 <= O3 - C3 AND L3 < MINC3 AND MAXC3 < H3) OR (C < MAXL3.1 AND C4 < O4 AND 2 * (H4 - L4) / 3 <= O4 - C4 AND L4 < MINC4 AND MAXC4 < H4) OR (C < MAXL4.1 AND C5 < O5 AND 2 * (H5 - L5) / 3 <= O5 - C5 AND L5 < MINC5 AND MAXC5 < H5) OR (C < MAXL5.1 AND C6 < O6 AND 2 * (H6 - L6) / 3 <= O6 - C6 AND L6 < MINC6 AND MAXC6 < H6) OR (C < MAXL6.1 AND C7 < O7 AND 2 * (H7 - L7) / 3 <= O7 - C7 AND L7 < MINC7 AND MAXC7 < H7) OR (C < MAXL7.1 AND C8 < O8 AND 2 * (H8 - L8) / 3 <= O8 - C8 AND L8 < MINC8 AND MAXC8 < H8) OR (C < MAXL8.1 AND C9 < O9 AND 2 * (H9 - L9) / 3 <= O9 - C9 AND L9 < MINC9 AND MAXC9 < H9) OR (C < MAXL9.1 AND C10 < O10 AND 2 * (H10 - L10) / 3 <= O10 - C10 AND L10 < MINC10 AND MAXC10 < H10) OR (C < MAXL10.1 AND C11 < O11 AND 2 * (H11 - L11) / 3 <= O11 - C11 AND L11 < MINC11 AND MAXC11 < H11)`

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
 Posted : Tuesday, April 02, 2019 3:57:28 PM
Registered User
Joined: 3/10/2012
Posts: 465

Yes bruce this will do but i will still have to eyeball and sort my selection

thanks again

Bruce_L
 Posted : Tuesday, April 02, 2019 4:07:05 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 Customer Training & Support - Ask a Trainer - TC2000 version 12/18 - Ask a Trainer - TC2000 version 7 - Ask a Trainer - StockFinder 5.0 - PCFs, EasyScan and Custom Indicators General Discussions - Stock and Market Talk - TC2000 version 12 or 18 - TC2000 version 7 - StockFinder 5.0 - RealCode for StockFinder 5.0 Tutorial Videos - TC2000 version 12 tutorial videos - TC2000 version 7 tutorial videos 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.