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 |

run condition for previous time period Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
hodaddey05
Posted : Sunday, July 17, 2011 4:34:14 PM
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?
Bruce_L
Posted : Monday, July 18, 2011 8:52:37 AM


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
jas0501
Posted : Monday, July 18, 2011 11:57:05 PM
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.
hodaddey05
Posted : Thursday, July 21, 2011 12:55:20 AM
Registered User
Joined: 9/13/2005
Posts: 18
thanks to both of you for the input.  I will give it a try.
Bruce_L
Posted : Thursday, July 21, 2011 8:36:26 AM


Worden Trainer

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

-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.