Registered User Joined: 1/13/2012 Posts: 72
|
For backtesting (and ability to look back at several years of data), I am attempting to enter code into Stockfinder. I am fairly well versed with TC2000, but not with Stockfinder. Here is the scenario...
1. TC2000: Both MAVG50 and MAVG20 moving up.
Stokfinder: Created 2 scan conditions from the moving average lines
2. TC2000: C > AVGC50 and C < AVGC20
Stockfinder: Created 2 scan conditions from the Price OHLC
3. TC2000: MAXH11 = MAXH30
Stockfinder: ???
4. TC2000: "Wide Range Filter": (MAXH65-MINL65 > 10) OR
((MAXH65 - MINL65)/C > 0.30)
Stockfinder: ???
Thank you!
.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
There is a Max or Min of Line indicator which can be added to price get the minimum and maximum highs and lows if you want to stick to right-clicking on indicators and select Create Condition to create your conditions.
You can use the Comparison Plots feature to drag and drag indicators onto each other to do simple math based on those indicators.
Comparison Plots
It is possible to create the entire setup as a single RealCode Condition however.
Writing Conditions in RealCode
'|*****************************************************************|
'|*** StockFinder RealCode Condition - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Condition:Kenoracle Scenario
'|******************************************************************
If CurrentIndex >= 65 Then
If Price.Last > Price.Last(20) AndAlso _
Price.Last > Price.Last(50) AndAlso _
Price.Last > Price.AVGC(20) AndAlso _
Price.Last > Price.AVGC(50) AndAlso _
Price.MaxHigh(11) = Price.MaxHigh(30) Then
Dim Range As Single = Price.MaxHigh(65) - Price.MinLow(65)
If Range > 10 OrElse Range > .3 * Price.Last Then
Pass
End If
End If
Else
SetIndexInvalid
End If
-Bruce Personal Criteria Formulas TC2000 Support Articles
|