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 |

2nd derivative of Price and same for Volume Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
dhoward
Posted : Monday, May 15, 2006 4:37:41 PM
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!
diceman
Posted : Tuesday, May 16, 2006 1:01:28 AM
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
dhoward
Posted : Tuesday, May 16, 2006 12:30:52 PM
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.
Bruce_L
Posted : Tuesday, May 16, 2006 12:44:52 PM


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
dhoward
Posted : Tuesday, May 16, 2006 1:37:16 PM
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.
bustermu
Posted : Wednesday, May 17, 2006 3:10:40 AM
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
Bruce_L
Posted : Wednesday, May 17, 2006 8:29:15 AM


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
bradsticker
Posted : Thursday, May 18, 2006 12:04:31 PM
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
bustermu
Posted : Friday, May 19, 2006 11:56:13 AM
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
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.