- Katılım
- 23 Eki 2020
- Mesajlar
- 1,828
----- Original Message ----- From: "Chris Montgomery" <chrismontgomery1966@yahoo.com> To: <metastock@metastock.com> Sent: Friday, August 16, 2002 10:42 AM I am trying to use the system tester comparing multiple systems. I want to enter a historical date, ie 3 months ago and compare the systems. THe comparison shows which system produces the most equity gain. I could then view the validity of the signal generated. So far I am only able to test using all of the most recent data. Is there a way to limit the data used in the system test to a historical date? I suppose I could remove data from the selected security using the downloader, run the test and put the data back but there should be a better way. Thanks, Chris Chris You can "AND" a 'Date Filter' indicator with your entry code. Here's the filter I use. Sorry that the day and month are reversed from US practice, but that's easy to change. If you want to put this in with your System Tester code you'll need to remove the Input() functions too. I find it works best as a standalone indicator. Roy |
|
Date Filter Indicator Sd:=Input("Start day" ,1,31,1); Sm:=Input("Start month",1,12,1); Sy:=Input("Start year" ,1980,2022,2002); Ed:=Input("End day" ,1,31,31); Em:=Input("End month" ,1,12,12); Ey:=Input("End year" ,1980,2022,2002); ((DayOfMonth() >= Sd AND Month() = Sm AND Year()=Sy) OR Year() > Sy OR (Year() = Sy AND Month() > Sm)) AND ((DayOfMonth() <= Ed AND Month()=Em AND Year() = Ey) OR Year() < Ey OR (Year() = Ey AND Month() < Em)); |
Source / From: |