Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 9/13/2005 Posts: 18
|
I have a condition that uses todays closing price and compares that to other closing prices 10 days ago, 34 days ago, etc. I then use this data to create a filter. However, if I want to run this condition over a previous time period, how can this be done without editing the condition. For example, I want this condition for an earlier time period, that is not using todays closing price, but using the closing price from 2 weeks ago. I basically want to go back in time two weeks ago and run my condition. Is this possible?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
In general, backtesting in StockFinder is provided by BackScanner. You would probably use your Condition as a Buy Condition and then Add Trade-Based Rule for a Sell Condition for a Trade Length Greater Than 0 Bars. This would Exit on the next Bar after Entry and allow you to identify all of the Entries.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/31/2005 Posts: 2,499
|
You can wrtite the filter by using user specified variables
'# daysago = userinput. integer = 0
'# offset = userinput.integer = 34
if price.close(daysago) > price.close(daysago + offset) then
pass
end if
then just set daysago as desired. For 2 weeks ago use 10.
|
|
Registered User Joined: 9/13/2005 Posts: 18
|
thanks to both of you for the input. I will give it a try.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome. Our pleasure.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |