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 |

PCF for Lower Lows in Price & Higher lows in BOP Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
tedclimo
Posted : Sunday, June 12, 2005 4:00:20 PM
Registered User
Joined: 12/17/2004
Posts: 16
I searched the archives but could not find this. Can you help? Please refer to FFH & CCMP for examples of what I'm talking about. I've seen numerous examples recently where a bottom was established after price was bouncing to lower lows as BOP was bouncing to higher lows.
Can a PCF be constructed to identify these scenario's? If so, Can Custom Date Sort then be used to "backtest"? I know TC2K is not a backtesting engine per se, but it seems logical that a scan on 12/31/04 (using a true/false PCF of the aforementioned (Price lower lows / BOP higher lows) condition would then give you a watch list to look at to see what happened 30-60 days later and whether a bottom actually took place.

Can you help me with this (price lower lows / BOP higher lows)PCF?

Thank you in advance!

Ted
Craig_S
Posted : Sunday, June 12, 2005 4:11:38 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
How many days of lower lows? Here it is for 5 days:

L<L1 AND L1<L2 AND L2<L3 AND L3<L4 AND L4<L5

and higher BOP:

BOP1>BOP1.1 AND BOP1.1>BOP1.2 AND BOP1.2>BOP1.3 AND BOP1.3>BOP1.4 AND BOP1.4>BOP1.5

- Craig
Here to Help!
Craig_S
Posted : Sunday, June 12, 2005 4:58:57 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
...sorry, forgot about your backtest question...

here is a video for you:

Visually Backtesting Specific Symbols

- Craig
Here to Help!
tedclimo
Posted : Monday, June 13, 2005 9:04:42 AM
Registered User
Joined: 12/17/2004
Posts: 16
Wow, quick response(& on Sunday no less)!
Craig, video was exactly what I needed.

As to the PCF, please check out FFH & CCMP on daily bars.
For FFH, look at Price & BOP in Feb & April.
For CCMP, look at Price & BOP in Jan & May.

Notice how Price makes a significantly Lower Low while BOP is making Higher Lows.

I'm looking to design this PCF(%True) to pick up that pattern. I suspect it requires a formula that detects when 120 day Linear Reg Slope of Price is < -X, and when 120 day slope of BOP is > Y, and when Y-X > Z. Where Z is a difference between the slopes. I will gladly determince the proper values of X,Y & Z later if you can help me figure out how to write a PCF that identifies this strong divergence over a 120 period.

Thanks for the great service.
TC2K rocks!
Ted
Craig_S
Posted : Monday, June 13, 2005 9:13:47 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Gotcha... so you don't want to be as restrictive as I was. I have another video for you then! This should do the trick:

Using Linear Regression Sorts to Help Spot Divergences

- Craig
Here to Help!
tedclimo
Posted : Monday, June 13, 2005 11:06:35 AM
Registered User
Joined: 12/17/2004
Posts: 16
Excellent,
Now assuming I can do this in Custom Date Sort.... I'll be able to "backtest" this theory by identifying stocks that met my conditions say at the end of April & see what happened from May 1 forward.

Thanks again Craig,

Ted
Craig_S
Posted : Monday, June 13, 2005 11:08:47 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
You don't need to do it with Custom Date sort... just add an extension to your linear regression lines.... try it (you should see what I mean)...

- Craig
Here to Help!
tedclimo
Posted : Monday, June 13, 2005 11:29:07 AM
Registered User
Joined: 12/17/2004
Posts: 16
Craig, once a 30 bar extension line is added....
Is the Linear Reg. Line divergence procedure (you outlined in the video) sorting by values 30 bars ago? or current values at the end of the extension lines.

Obviously, I'm trying to recreate the effect of applying this divergence identification in the past to view what happened afterwards.

Thanx,

Ted
Craig_S
Posted : Monday, June 13, 2005 11:31:50 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
When you add an extension of X on a LR it sets the LR back X days ago, finds the best fit then shoots the extenstion forward to the current day. Let's say you wanted to test for divergences one month ago...

Set the extensions to 21 and do the procedure the exact way as outlined in the video.

Make sense?

Look at a few LRs with an extension and you should see it.

- Craig
Here to Help!
Doug_H
Posted : Monday, June 13, 2005 11:33:35 AM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
If you apply an extension to a Linear Regression line, the slope of the line is calculated for the actual line itself, not for the extension.

For instance, if you plot a 62 day linear regression line of price, with an extension of 30, the LR line is calculated on the 62 bar period beginning 30 bars ago. The extension drawn simply carries that slope out to the end of the chart.

- Doug
Teaching Online!
tedclimo
Posted : Monday, June 13, 2005 11:46:08 AM
Registered User
Joined: 12/17/2004
Posts: 16
Another home run by Craig.
Final question I believe.
With this new info in mind, is it possible to write the PCF I described above?
i.e.
If Linear Reg Slope(120bars) of Price is < 0 and
if Linear Reg Slope(120bars) of BOP is > 0 and
and (Linear Reg Slope(120bars) of Price - Linear Reg Slope(120bars) of BOP) > Z then PCF = True? Where Z value is yet to be determined.
If so, then this should allow a scan that does what the manual procedure in your video does.
If not, then thanks again for all your wisdom in this matter!!!!!!

Ted
Craig_S
Posted : Monday, June 13, 2005 12:07:28 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
A real simpe fake of the slope of an LR is to use the averages on either side of the line. For example:

Slope measure of the 120 LR of price:

(AVGC60-AVGC60.60)/AVGC60.60*100

In reality this is the percent change between the recent average of prices and the older average. Generally speaking, they roughly correspond to the rough slope of the LR.

Here is the same for BOP

(BOP60-BOP60.60)/BOP60.60*100

You can write a PCF for LRs but it is big and messy. Here is the link:

Using Linear Regression vs Classical Peaks/Valleys for Divergence Analysis

Personally, i find the visual sorting to be easier and more flexible.

- Craig
Here to Help!
tedclimo
Posted : Monday, June 13, 2005 12:51:24 PM
Registered User
Joined: 12/17/2004
Posts: 16
Craig-ster,
You've done an exceptional job of covering all the bases. I am deeply in your debt!!!

I agree that the PCF in your link is way too cumbersome for my application. And that your worakaround makes perfect sense.

Trade well & prosper,

Ted

Craig_S
Posted : Monday, June 13, 2005 12:55:03 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Will do... if you need anything else, you know where to find me!

- Craig
Here to Help!
tedclimo
Posted : Tuesday, June 14, 2005 11:04:13 PM
Registered User
Joined: 12/17/2004
Posts: 16

Me again,
Craig, I used your code to create this %True PCF in order to identify when price slope is down & BOP slope is up. I'm sure it works for TSV(never less than 0, but since BOP includes negative numbers, it may need revision. The test formula often results in a negative number(slope) for BOP even the the Lin Reg line shows a huge incline. Any ideas?

(((AVGC60-AVGC60.60)/AVGC60.60*100) < 0) AND (((BOP60-BOP60.60)/BOP60.60*100) > 0)
Craig_S
Posted : Tuesday, June 14, 2005 11:14:28 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Try this:

((AVGC60-AVGC60.60)*(BOP60-BOP60.60))<0

This will return true everytime one is positive and the other is negative.

BTW, TSV's center line is zero so TSV can be a negative number.

- Craig
Here to Help!
tedclimo
Posted : Tuesday, June 14, 2005 11:27:54 PM
Registered User
Joined: 12/17/2004
Posts: 16
Hey night owl, you're redefining Customer Service.... the competition doesn't stand a chance.
The only problem with the last pcf is that it is true for both positive & negative divergences, right?

oops on TSV.... getting sleepy
tedclimo
Posted : Tuesday, June 14, 2005 11:38:37 PM
Registered User
Joined: 12/17/2004
Posts: 16
Here's a thought! Add 100 to each BOP entry to get the BOP out of negative #'s. Seems logical at this late hour. Do you see any red flags to suggest a problems?
((((100+BOP60)-(100+BOP60.60))/(100+BOP60.60)*100) - ((AVGC60-AVGC60.60)/AVGC60.60*100) ) > 0
tedclimo
Posted : Tuesday, June 14, 2005 11:41:57 PM
Registered User
Joined: 12/17/2004
Posts: 16
Never mind, it does not correlate to the Lin Reg lines
Craig_S
Posted : Wednesday, June 15, 2005 12:08:10 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Here it is for just positive divergence:

((AVGC60-AVGC60.60)*(BOP60-BOP60.60))<0 AND (AVGC60-AVGC60.60)<0

Getting late (just past midnight)... I'm gonna hit the sack. Let me know tomorrow what you think!

- Craig
Here to Help!
tedclimo
Posted : Thursday, June 16, 2005 3:23:14 PM
Registered User
Joined: 12/17/2004
Posts: 16
Craig-ster,
If as in the example you gave above that (AVGC60-AVGC60.60)/AVGC60.60*100 is an approximatation of the Slope measure of the 120 LR of price, then would this also be true? that(AVGC10-AVGC10.10)/AVGC10.10*100 is an approximatation of the Slope measure of the 20 LR of price?
I want to be sure there is an arithmetic transferrancy before putting faith in it.

Ted

tedclimo
Posted : Thursday, June 16, 2005 3:44:25 PM
Registered User
Joined: 12/17/2004
Posts: 16
Also,Why would this %True PCF display True in the Test Formula window, yet never, ever display a simultaneous yellow spike to 100%?
((AVGC10-AVGC10.10)/AVGC10.10*100) > (-50)

Very puzzling!
Craig_S
Posted : Thursday, June 16, 2005 3:59:55 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Correct on the 20LR question.

((AVGC10-AVGC10.10)/AVGC10.10*100) > (-50)

In order for this to be true the stock only needs to be up more than negatve 50% in the last ten days. I bet 99.9% of the stocks will show true for this.

Sort ALL STOCKS by:


((AVGC10-AVGC10.10)/AVGC10.10*100)

Which is the 10 day percent change and you can see the range of values for the condition in the market.

What are you looking for with the '-50' part?

- Craig
Here to Help!
tedclimo
Posted : Friday, June 17, 2005 8:22:05 AM
Registered User
Joined: 12/17/2004
Posts: 16
Craig,
The '> -50' part is an attempt to identify where price is no longer in a steep decline. I don't understand why it shows 'True' in the Test Formula Window, yet the yellow line remains pegged at zero on most stocks(check out FFH as an example)?? I did find a small number of stocks where the the %True is 100 along with the True as identified by the Test Formula Window. As you pointed out, it should be pegged at 100 on 99.9% of stocks currently.
Craig_S
Posted : Friday, June 17, 2005 9:32:28 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
I just plotted ((AVGC10-AVGC10.10)/AVGC10.10*100) > (-50) as percent true indicator. I then sorted ALL STOCKS by the indicator using actual values. 6788 show values of 100 out of the 6820 (which sounds right).

Double check that there is not a typo in your typed formula. It is working fine at this end.

- Craig
Here to Help!
tedclimo
Posted : Friday, June 17, 2005 12:03:25 PM
Registered User
Joined: 12/17/2004
Posts: 16
((AVGC10-AVGC10.10)/AVGC10.10*100) > (-50) Here it is copied directly from the Percent True Settings window in edit mode.

I did the same scan as you on all stocks & got only 65 @100%(True) out of 6822.

But here lies the clue(as I said before). Many, many stocks(GS,CLF,FFH,LZ,etc) show TRUE when I test formula on them, yet the Yellow %True line remains at zero. So for some unknown reason even though the Test Formula window says TRUE, the Sort Value & Graphical representation are showing 0(FALSE).

I also put the same formula onto my laptop(which has TC2005 as well) and the exact same results occured?

Is it possible that there is another setting in TC2005 you have enabled that I do not?

HELP!
tedclimo
Posted : Friday, June 17, 2005 12:16:04 PM
Registered User
Joined: 12/17/2004
Posts: 16
Craig,
Here's a new clue. On the few stocks that show the expected Yellow line @ 100% the Scale on the chart window is 0-100%.

On the Stocks that Test Formula says True yet Sort Value says 0, the scale on the chart window is 100%-101%. ie what I thought was a zero reading realyy says 100%, yet it is located down where the zero should be.

Oddly, the Sort Values still sort with 99.9 % of stocks reading 0% ??? Hope this added clue helps! Is this something you need me to take to Tech Support? Or??

Thanks for your brain-power,

Ted
Craig_S
Posted : Friday, June 17, 2005 12:31:06 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Ah....

They are not zero... they are 100 (the scale is 100-101 because the only value on the chart is 100)

You are sortin by VISUAL VALUE. Sort by the ACTUAL VALUE...

- Craig
Here to Help!
tedclimo
Posted : Friday, June 17, 2005 1:16:41 PM
Registered User
Joined: 12/17/2004
Posts: 16
Thank you Craig,

I am now enlightened (learning my %True configurations the hard way & usually the best).

Ted
Craig_S
Posted : Friday, June 17, 2005 1:19:00 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
LOL.... I agree! It sticks in the brain after we wrestle with it a bit!

- Craig
Here to Help!
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.