Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 1/2/2005 Posts: 132
|
Can a PCF be generated for the second derivative of Price that can then be used as a (histogram?) indicator in Tc2005? Also, can it be done for Volume?
Thanks for the input!
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
What are you calling the second derivative of price and volume? (acceleration??)
Can you define (in clear terms) what type of indicator you are looking for?
Thanks
|
|
Registered User Joined: 1/2/2005 Posts: 132
|
There is a new chart with Second Derivative Price and Second Price Derivative histogram indicators on it on wealth-lab. I'd like to test it in Tc2005...it's available for viewing here: (link removed by moderator)
So, is this sort of indicator PCF-able or not? I'd appreciate your continued help.
Thanks.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I'll take a look and see what I can figure out, but we do not provide ChartScript support.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 1/2/2005 Posts: 132
|
Thanks. I'm not looking for chartscript support, diceman wanted to see it, so I tried to show it to him.
I look forward to your possible findings Bruce.
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
dhoward,
The first derivative of a data sequence is the result of the application of ROC1 to that sequence. The second derivative of a data sequence is the result of the application of ROC1 to the application of ROC1 to that sequence.
A PCF for The second derivative of Price is:
C0-2*C1+C2
In the case of Price, some prefer the first derivative be the logarithmic derivative, in which case, a PCF for the second derivative is:
LOG(C0*C2/C1^2)
or, approximately:
C0*C2/C1^2-1
If one plots all three as Custom Indicators with "Center Zero Line" checked, they will nearly overlay one another.
The problem is that the second derivative is so "noisy" it is difficult to see how it could be of any value.
A more satisfactory approach would be to least-mean-square curve fit a quadratic,
y( t ) = a0*t^2+a1*t+a2
to the last P values of C, or, preferably LOG( C ), and use a0/2 as the second derivative. This is simply a generalization of the use of the slope of the Linear Regression Line as the first derivative.
I have searched the WealthLab Forum for "derivative" and found nothing on the second derivative. If you tell us how to find your source, you can get more help.
Thanks, Jim Murphy
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The ChartScript/WealthScript (Hershey Equities Rank v. 4.0.0) originally linked to by dhoward was written by Spydertrader (I don't have the intellectual property rights to post it here). It seems to use Exponential smoothing, but I didn't understand the code well enough to figure out the technique used by just reading it (I'm going to have to go through it line by line and haven't had that much time yet).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/15/2005 Posts: 95
|
Bustermu,
I am a little slower on math than you. I would think that the first derivitive of price would be: (C-C1)/C1 which is also the ROC as you mentioned. The second derivitive then would be (ROC-ROC1)/ROC1 or (C*C2-C1*C2-C1^2+C1*C2)/C1^2-C1*C2) Where have I gone wrong?
thanks, bradsticker
|
|
Registered User Joined: 1/1/2005 Posts: 2,645
|
QUOTE (bradsticker) I would think that the first derivitive of price would be: (C-C1)/C1 which is also the ROC as you mentioned.
As we shall see, that is approximately the logarithmic derivative and is not the ROC1 of Price. The first derivative of Price is:
C0-C1
which is also ROC1 applied to Price.
QUOTE (bradsticker) The second derivitive then would be (ROC-ROC1)/ROC1 or (C*C2-C1*C2-C1^2+C1*C2)/C1^2-C1*C2) Where have I gone wrong?
As soon as you divide by something that can go to zero, or, worse, change signs (ROC1), you know that you have done something you should not.
The first derivative of a data sequence is the result of the application of ROC1 to that sequence.
A PCF for the first derivative of Price is:
C0-C1
In the case of Price, some prefer the logarithmic derivative to the first derivative, in which case, a PCF for the logarithmic derivative is:
LOG(C0/C1)
or, approximately:
C0/C1-1
If one plots all three as Custom Indicators with "Center Zero Line" checked, they will nearly overlay one another.
Thanks, Jim Murphy
|
|
Guest-1 |