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 |

Kaufman efficiency ratio stockfinder Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
jabrae
Posted : Friday, October 30, 2009 12:01:24 PM
Registered User
Joined: 12/26/2006
Posts: 109
I have found the replies on the Kaufman Adaptive Moving Average and can use the plot in StockFinder. Compared to the RealCode for the KAMA my request is simple.  Could you sent me the realcode for the Kaufman 10 day efficiency ratio which in Telechart is defined as:
(C - C10) / (ABS(C - C1) + ABS(C1 - C2) + ABS(C2 - C3) + ABS(C3 - C4) + ABS(C4 - C5) + ABS(C5 - C6) + ABS(C6 - C7) + ABS(C7 - C8) + ABS(C8 - C9) + ABS(C9 - C10))

Thanks
James
Bruce_L
Posted : Friday, October 30, 2009 12:14:50 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Please try the following RealCode Indicator:

'# Period = UserInput.Integer = 10
Static Den As Single
If CurrentIndex >= Period + 1 Then
    Den += System.Math.Abs(Price.Last - Price.Last(1)) - _
        System.Math.Abs(Price.Last(Period) - Price.Last(Period + 1))
Else If CurrentIndex >= 1 Then
    Den += System.Math.Abs(Price.Last - Price.Last(1))
Else
    Den = 0
End If
If CurrentIndex >= Period Then
    Plot = (Price.Last - Price.Last(Period)) / Den
Else
    Plot = Single.NaN
End If

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jabrae
Posted : Friday, October 30, 2009 12:36:53 PM
Registered User
Joined: 12/26/2006
Posts: 109
When I plot the Telechart version I receive values between -1 and +1.  I note this plots likely between -100 and +100.  I will try changing the line Plot= 100 * ....... to 1*....... and I should achieve the values that are the same as Telechart.  Thanks.

James
Bruce_L
Posted : Friday, October 30, 2009 12:44:01 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You're welcome.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Bulard
Posted : Tuesday, July 27, 2010 11:44:03 AM
Registered User
Joined: 7/26/2010
Posts: 14
Thanks for this indicator. It plots correctly, however, when I try to add it as column for scan, all values are 0.
Do you know how I can make it scan/sort ?

Thanks
Bruce_L
Posted : Tuesday, July 27, 2010 12:21:00 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Bulard,
I've altered the original code to add the following (so the WatchList Column knows the minimum amount of data that can be used to calculate the Indicator):

Else
    Plot = Single.NaN

Please try using the altered version.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Bulard
Posted : Wednesday, July 28, 2010 6:13:33 AM
Registered User
Joined: 7/26/2010
Posts: 14
Thank you very much.
Bruce_L
Posted : Wednesday, July 28, 2010 8:35:09 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Bulard,
You're welcome.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
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.