Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 11/26/2007 Posts: 116
|
Recently a S&C Feb 2016 Traders Tip was published for TC2000 Article Higher Highs and Higher Lows.
I'm using this in TC2000 and need help for the Real Code conversion.
The HHS is:
100 * ABS(H > H1) * (H - MINH20) / (MAXH20 - MINH20)
The LLS is:
100 * ABS(L < L1) * (MAXL20 - L) / (MAXL20 - MINL20)
Thanking you in advance.
Jim
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The first formula could be written as follows.
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:HHS
'|******************************************************************
If CurrentIndex >= 20 Then
If Price.High > Price.High(1) Then
Plot = 100 * (Price.High - Price.MinHigh(20)) / (Price.MaxHigh(20) - Price.MinHigh(20))
Else
Plot = 0
End If
Else
Plot = Single.NaN
End If
And the second formula could be written as follows.
'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:LLS
'|******************************************************************
If CurrentIndex >= 20 Then
If Price.Low < Price.Low(1) Then
Plot = 100 * (Price.MaxLow(20) - Price.Low) / (Price.MaxLow(20) - Price.MinLow(20))
Else
Plot = 0
End If
Else
Plot = Single.NaN
End If
But I'm pretty sure you would need to apply 20 period exponential moving averages to these to get the desired plots. I'll make an indicator which plots HHS with the moving average applied along with the red, yellow and green lines in a bit.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You should be able to Open an attached Indicator directly into a running copy of StockFinder 5 (and save it from within StockFinder 5 if desired). You could also Save it to the \My Documents\StockFinder5\(Your Username)\My Indicators\ folder and then load it like you would any other Indicator (or Copy and Paste it there from wherever it Saves if you can't specify the destination directory when Saving).
Attachments: Higher Highs and Lower Lows.sfInd - 9 KB, downloaded 659 time(s).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 11/26/2007 Posts: 116
|
QUOTE (Bruce_L)
The first formula could be written as follows.
'|******************************************************************'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com '|*** Copy and paste this header and code into StockFinder *********'|*** Indicator:HHS'|******************************************************************If CurrentIndex >= 20 Then If Price.High > Price.High(1) Then Plot = 100 * (Price.High - Price.MinHigh(20)) / (Price.MaxHigh(20) - Price.MinHigh(20)) Else Plot = 0 End IfElse Plot = Single.NaNEnd If
And the second formula could be written as follows.
'|******************************************************************'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com '|*** Copy and paste this header and code into StockFinder *********'|*** Indicator:LLS'|******************************************************************If CurrentIndex >= 20 Then If Price.Low < Price.Low(1) Then Plot = 100 * (Price.MaxLow(20) - Price.Low) / (Price.MaxLow(20) - Price.MinLow(20)) Else Plot = 0 End IfElse Plot = Single.NaNEnd If
But I'm pretty sure you would need to apply 20 period exponential moving averages to these to get the desired plots. I'll make an indicator which plots HHS with the moving average applied along with the red, yellow and green lines in a bit.
Bruce Thanks...the tc200 indicator by Patrick Argo did indeed use the exponential average. I'm not sure how to do this for your indicator.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I attached an indicator replicating the indicator from the TC2000 layout including the exponential moving averages to my Wednesday, January 27, 2016 4:26:36 PM ET post.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |