Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 10/7/2004 Posts: 1,178
|
Each individual Double Top and Bottom PCFs work fine as columns. For example:
H2=MaxH5.1 AND L2=MinL5.1
H3=MaxH5.2 AND L3=MinL5.2
etc...
This morning, I've tried to combine the following in order to use this combined PCF in an Easy Scan. However, without success.
Is this just too complicated -- or am I not coding correctly?
Here's what I am trying to combine:
Double Tops and Bottoms 1-Ago to 10-Ago
H2=MaxH5.1 AND L2=MinL5.1 or
H3=MaxH5.2 AND L3=MinL5.2 or
H4=MaxH5.3 AND L4=MinL5.3 or
H5=MaxH5.4 AND L5=MinL5.4 or
H6=MaxH5.5 AND L6=MinL5.5 or
H7=MaxH5.6 AND L7=MinL5.6 or
H8=MaxH5.7 AND L8=MinL5.7 or
H9=MaxH5.8 AND L9=MinL5.8 or
H10=MaxH5.9 AND L10=MinL5.9 or
H11=MaxH5.10 AND L10=MinL5.10
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
OR comes before AND in the order of operations, so you need to force the AND to come first using parentheses.
(H2 = MAXH5.1 AND L2 = MINL5.1) OR (H3 = MAXH5.2 AND L3 = MINL5.2) OR (H4 = MAXH5.3 AND L4 = MINL5.3) OR (H5 = MAXH5.4 AND L5 = MINL5.4) OR (H6 = MAXH5.5 AND L6 = MINL5.5) OR (H7 = MAXH5.6 AND L7 = MINL5.6) OR (H8 = MAXH5.7 AND L8 = MINL5.7) OR (H9 = MAXH5.8 AND L9 = MINL5.8) OR (H10 = MAXH5.9 AND L10 = MINL5.9) OR (H11 = MAXH5.10 AND L10 = MINL5.10)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 1,178
|
Thanks, Bruce, for this PCF which seems to work fine. However...
For testing I used US Common Stocks with three criteria in my Easy Scan:
1) AvgV126.1>500,000,
2) Price History>$12.50, and
3) Double Tops and Bottoms 1-Ago through 10-Ago (the PCF you just provided).
This Easy Scan triggered 36 Items in the Watchlist.
I used a the following PCF below overlaid on the candlesticks on my Daily chart.
H1=MaxH5 AND L1=MinL5
However, seven (CHD, CAKE, PEG, EAT, TDS, ALLY, and KW) did not reveal a PCF overlaid on the candlestics on my Daily chart.
Do you have an idea why?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I think it is because you probably intended L10=MinL5.10 at the end of the formula to be L11=MinL5.10 instead.
This would make the OR version of the formula.
(H2 = MAXH5.1 AND L2 = MINL5.1) OR (H3 = MAXH5.2 AND L3 = MINL5.2) OR (H4 = MAXH5.3 AND L4 = MINL5.3) OR (H5 = MAXH5.4 AND L5 = MINL5.4) OR (H6 = MAXH5.5 AND L6 = MINL5.5) OR (H7 = MAXH5.6 AND L7 = MINL5.6) OR (H8 = MAXH5.7 AND L8 = MINL5.7) OR (H9 = MAXH5.8 AND L9 = MINL5.8) OR (H10 = MAXH5.9 AND L10 = MINL5.9) OR (H11 = MAXH5.10 AND L11 = MINL5.10)
This could also be shortened to the following in TC2000 v17.
CountTrue(H2 = MAXH5.1 AND L2 = MINL5.1, 10) > 0
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 1,178
|
The longer PCF did have an error as you suggested. Nicer to have such a short and fast PCF. Thanks!
NOW TWO QUESTIONS:
Let's use OLLI as an example.
The first question:
The PCF triggered on 6/13/17 with its' High at $42.60 and its' Low at $41.80.
The OLLI High on 6/13/17 was equal to the High eleven days earlier on 5/26/2017, each at $42.60 (forming Equal Highs).
Would it be accurate to call this Equal High a Double Top?
The second question:
The OLLI Low on 6/13/17 printed at $41.80. However, I could not find an equal Low on my chart, having searched the 3 Month Chart (as well as before).
The PCF suggests that there should be a match for the Equal Low, too.
How do you explain this, Bruce?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I'm not sure what I would call it, but I don't think the formula identifies a traditional touble top and bottom.
Let us look at the formula as written for the current bar.
H1 = MAXH5 AND L1 = MINL5
What this means is the the high and low of one bar ago are the high and low of the most recent five bars.
So the spike for OLLI happens on 6/13/17 because the 6/12/17 bar has a high and low which are at the high and low of the five bars running from 6/7/17 through 6/13/17.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 1,178
|
Oh, then should the short-form of your PCF be changed to incorporate more trading days?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
My should form checks for H1 = MAXH5 AND L1 = MINL5 happening from 1 to 10 bars ago instead of for the current bar just like the long formula using OR.
If you decided to change the condition formula for the current bar because it doesn't do what you want, then you would then want to adjust the formula to check for it happening on previous bars if you wanted it to match.
That said, I do not know what you want the formula for the current bar to do exactly, so I don't know if it does what you want or not. Only you would know.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 10/7/2004 Posts: 1,178
|
Let's start by having me attach one of my charts I've copied with the Snipping Tool. I've clicked the Image icon, but that doesn't seem to be the way to attach the chart.
Suggestions?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The best topic of which I'm aware on how to post images in the forums is Inserting A Chart into A Worden post.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |