MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

A B C D E F G H I J K L M N O P R S T U V W Y Z #

Date Filter Indicator by Roy Larsen
----- Original Message -----
From: "Chris Montgomery" <>
To: <>
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.



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.


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: TOP

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!