Hello again TT,
As to how to make the 2nd, 3rd, etc. derivatives: Take the first derivative function and call it "TT_1_derv" or something like that. To make the 2nd derivative simply do what you did to make the 1st derivative ie:
((func("TT_1_derv") - ref(func("TT_1_derv"),-15))/15)
This is a little simplistic because you now actually have a time frame of 30 days instead of the original 15.
The actual formula that I use for the acceleration of the previous posted formula is:
((mov(c,days,simp)-ref(mov(c,days,simp),-15))-(ref(mov(c,days,simp), -sens) - ref(mov(c,days,simp),-(sens+15)))) / sens
days and sens are variables. make days = 50 and sens = 1 and you will have a very close approximation to the actual acceleration.
sens will adjust the sensitivity of the acceleration derivative.
The reason for the smoothing of the ma's over the oscillators is that a ma will have fewer inflection points than an oscillator. It is a type of low pass filter so the quick changes in price are not seen if they are just 2 or 3 days. Try putting your moving average to 1 instead of 50 and the derivative will probably just bounce back and forth across zero.
1st derivative measures the speed at which price is rising or falling. 2nd derivative measures the increase or decrease in the speed of the price change.
David |