logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Lyrk  
#1 Posted : Friday, April 30, 2010 4:41:39 PM(UTC)
Lyrk

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 11/30/2009(UTC)
Posts: 3

Hi, My question is I want to test a system up to date but whenever I try to choose simulation dates, it gives "The specified 'To' date falls outside the range of the selected local data. " error. I want to test the system till 29.04.2010 but the maximum I can reach without this error is 04-01-2010 (January) . Isn't it strange?
mstt  
#2 Posted : Friday, April 30, 2010 5:54:46 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)

Hi Lyrk

Yes it's strange but it's something I always get, so rather than fight it I have a simple work-around. I use the other option - "Use price data from the last [censored]X available periods." - in conjuction with a date filter (see below). It's not difficult to calculate the number of bars needed to span the data under test and allow for any N/A periods generated by your code. The only other thing you have to do is set the default start and end dates into the filter and add something like " AND Fml("Date Filter")" to your system's code as required.

{Date Filter}
Sd:=Input("Start day" ,1,31,1);
Sm:=Input("Start month",1,12,1);
Sy:=Input("Start year" ,1980,2015,2000);
Ed:=Input("End day" ,1,31,31);
Em:=Input("End month" ,1,12,12);
Ey:=Input("End year" ,1980,2020,2010);
Start:=(DayOfMonth()>=Sd AND Month()=Sm AND
Year()=Sy) OR Year()>Sy OR (Year()=Sy AND Month()>Sm);
End:=(DayOfMonth()<=Ed AND Month()=Em AND
Year()=Ey) OR Year()<Ey OR (Year()=Ey AND Month()<Em);
Start AND (End OR (Start AND Alert(Start=0,2)));

Roy

Users browsing this topic
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.