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 |

Choppiness Index Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
ghimires
Posted : Wednesday, September 3, 2014 1:36:35 PM
Registered User
Joined: 6/10/2014
Posts: 2

Hey,

 

How would I be able to add the choppiness index as a indictor in Stockfinder? I know the formula that was given for TC2000 in another thread but that doesn't work with Stockfinder of course.

 

Thank you! 

Bruce_L
Posted : Wednesday, September 3, 2014 3:14:33 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Please try the following RealCode Indicator.

'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.1 www.worden.com 
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:Choppiness Index
'|******************************************************************
'# Period = UserInput.Integer = 14
Static Sum As Single
Static Den As Single
If isFirstBar Then
	Sum = 0
	Den = Math.Log(Period)
Else
	Sum += Math.Max(Price.High, Price.Last(1)) - _ 
		Math.Min(Price.Low, Price.Last(1))
End If
If CurrentIndex >= Period Then
	Plot = 100 * Math.Log(Sum / _
		(Math.Max(Price.MaxHigh(Period), Price.Last(Period)) - _
		Math.Min(Price.MinLow(Period), Price.Last(Period)))) / Den		
	Sum -= Math.Max(Price.High(Period - 1), Price.Last(Period)) - _ 
		Math.Min(Price.Low(Period - 1), Price.Last(Period))
Else
	Plot = Single.NaN
End If


-Bruce
Personal Criteria Formulas
TC2000 Support Articles
ghimires
Posted : Wednesday, September 3, 2014 4:44:33 PM
Registered User
Joined: 6/10/2014
Posts: 2

Awesome, thank you Bruce! 

Bruce_L
Posted : Wednesday, September 3, 2014 4:54:34 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

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.