Discussions
»
Product and Service Development
»
Error Messages
»
Specified data falls outside the range of selected local data.
Rank: Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 2/21/2009(UTC) Posts: 22
Was thanked: 1 time(s) in 1 post(s)
|
This message appeared when using the Enhanced System Tester in MS11. I keep a range of ancient test data for comparative system testing and when using this range usually test on the last 1,000 periods. However when I then attempt to change to using a price data range on current stock I get this error message. It will accept a current range if I only put in the past few months but but the error message appears if I try to test back more than 6 months or so. I have had the problem before but can't recall how I solved it. I've done all the usual things like closing down MS, restarting computer, even writing a new system test, but nothing seems to work. I can test on the recent dates if I select "price data from the last say 2000 days, which goes back much further than I want to test but not for selected dates within those 2000 days.
Any suggestions or help would be greatly appreciated.
|
|
|
|
Rank: Advanced Member
Groups: Moderators, Registered, Registered Users, Subscribers Joined: 10/8/2010(UTC) Posts: 1,960
Thanks: 92 times Was thanked: 155 time(s) in 150 post(s)
|
maeday wrote:This message appeared when using the Enhanced System Tester in MS11. I keep a range of ancient test data for comparative system testing and when using this range usually test on the last 1,000 periods. However when I then attempt to change to using a price data range on current stock I get this error message. It will accept a current range if I only put in the past few months but but the error message appears if I try to test back more than 6 months or so. I have had the problem before but can't recall how I solved it. I've done all the usual things like closing down MS, restarting computer, even writing a new system test, but nothing seems to work. I can test on the recent dates if I select "price data from the last say 2000 days, which goes back much further than I want to test but not for selected dates within those 2000 days.
Any suggestions or help would be greatly appreciated.
Hi,
Is the ancient test data a locally stored security file? Are you using the Security function to call this information? Does the problem occur when testing only one security? Does the specific Start Date you are choosing exist in both the Security file and the first security you are testing?
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 2/21/2009(UTC) Posts: 22
Was thanked: 1 time(s) in 1 post(s)
|
Thank you Administrator for getting back to me so quickly. In going through the questions you raised I managed to solve the problem myself. By restricting the test to just one stock the EST accepted the data and then allowed me to add multiple stocks for further testing. Thank you again for your help.
|
|
|
|
Rank: Advanced Member
Groups: Moderators, Registered, Registered Users, Subscribers Joined: 10/8/2010(UTC) Posts: 1,960
Thanks: 92 times Was thanked: 155 time(s) in 150 post(s)
|
maeday wrote:Thank you Administrator for getting back to me so quickly. In going through the questions you raised I managed to solve the problem myself. By restricting the test to just one stock the EST accepted the data and then allowed me to add multiple stocks for further testing. Thank you again for your help.
That is good to hear! I think I vaguely remember something a long time ago about this. It might be that when selecting multiple securities if even one of those securities does not have data on the start date specified it causes that error and prevents you from moving on.
|
|
|
|
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 maeday
I've also experienced this problem but couldn't remember the circumstances under which it happened other than being related to date. From replies made I now remember that it only ever happened when I switched the EST data load from bars to dates. Mostly I use an external "Date Filter" indicator to set the test date range rather than using the EST date range load option, and I've never seen the error in the load bars mode.
I've posted my date filter before but I'll post it again below for easy reference. While it's possible to include the code in the EST (after modification for that purpose), the limited space becomes further restricted if you do. As an indicator the Input() function defaults must be set appropriately.
One very good reason for using a date filter, rather than relying on the date settings of the EST, is that by loading a specific number of bars you can be sure leading N/A system signals are stable before the intended start date is processed rather than somewhat after it.
Roy
{Date Filter} {Roy Larsen, 2003-2010}
Sd:=Input("Start day" ,1,31,1); Sm:=Input("Start month",1,12,1); Sy:=Input("Start year" ,1980,2015,2010); Ed:=Input("End day" ,1,31,31); Em:=Input("End month" ,1,12,12); Ey:=Input("End year" ,1980,2020,2014); 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)));
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 2/21/2009(UTC) Posts: 22
Was thanked: 1 time(s) in 1 post(s)
|
HI Roy, thanks for your comments. Your Date filter will be
invaluable to me as I do a lot of testing on single stocks but over variable
dates which hitherto I’ve had to do long hand. Unfortunately though I can’t get
it to work. Something simple I’m sure but can you tell me what I’m doing wrong –
I’ve looked back over your earlier posts but still can’t get it right.
I can produce the Date filter indicator OK and post it over any
chart of interest – it appears as a value 1 line between the dates entered and
0 outside those dates.
I then tested it on the EST using a simple Wmav crossover
with the following formula and using price data from the last 1,000 periods: (the date filter range was beginning of last
Sept to end of this June and testing just one stock)
BUY: Mov(c ,13 ,w ) > Mov(c ,21 ,w )
AND Fml( "Date Filter") >
0.5
SELL: Mov(c ,13 ,w ) < Mov(c ,21 ,w ) OR Fml( "Date Filter") < 0.5
But this just gives me results for the whole of the 1,000
periods. However I now realise that somehow I suppose I have to insert the
dates required into the buy/sell condition to limit the test to the range I
want. Can you show me how I can do that?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 11/18/2007(UTC) Posts: 96 Location: HK
|
mstt wrote: {Date Filter} {Roy Larsen, 2003-2010}
Really... [:$]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 11/18/2007(UTC) Posts: 96 Location: HK
|
Willyalookitdat... This guy seems to have gone back in time and plagiarized your date range formula, way back in 2002...
|
|
|
|
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 Lai
Sadly I must admit to plagiarizing one piece of code created by Jose, but it wasn't his date filter. My date filter could well have been written before or around the same time as Jose's as the inclusion of a date on my code came much later - 2004 being just a rough guess.
From roughly 2000 through 2007 Jose and I exchanged MetaStock insights on a regular basis. One day I decided, without asking permission, to break his calendar date calculation down to its basic algorithm for the purpose of using it for my own weekly formulas for daily data. That was a big mistake and one that destroyed the close working relationship Jose and I had enjoyed up until that time.
I was later pointed to a different source for a public domain calendar date algorithm that eventually became an essential timing element of many Multi-Frame indicators. I should add that some Multi-Frame indicators use the Life() function as the primary timing element, one of Jose's innovations that's acknowledged in each indicator and for which I do have his permission to use.
So while your evidence suggests that I have plagiarized Jose's date filter, I'm confident that such was not the reality that you are implying. Have I adopted some of Jose's innovations for use in my own code? Of course I have, just as Jose has undoubtedly adopted a number of my innovations. I've made mistakes in the past, and I'll surely make some in the future, but I don't and won't let my mistakes define me.
Roy
|
|
|
|
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 Lai
2003, 2004, 2001 - who cares? Well there are worse crimes than having faulty recall.
Roy
|
|
|
|
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 maeday
I don't see any specific problem with your code but I have a few suggestions that might help you resolve any problems.
To start with might I suggest that you construct your BUY and SELL code as indicators before loading them into the EST. An indicator gives visual feedback when applied to any chart, and if necessary you can break an indicator down into its logical elements and see what each element is doing.
For example this line with two logical elements... Mov(C,13,W) > Mov(C,21,W)
AND Fml( "Date Filter") >
0.5;
can be split into... Mov(C,13,W) > Mov(C,21,W)
; Fml( "Date Filter") >
0.5;
Better yet... 2+ (Mov(C,13,W) > Mov(C,21,W))
; Fml( "Date Filter") >
0.5;
which will plot the first element above the second.
The Fml("Date Filter") element does not need to be compared to any value because it already generates a logical TRUE or FALSE. Use Fml("Date Filter") without qualification to see when it is TRUE (a value of 1), and use Fml("Date Filter")=0 (qualification of =0) to see when it is FALSE, i.e. the reverse of TRUE.
I also suggest that Buy and SELL signals be truncated to just give a TRUE result on the first bar that the signal goes TRUE. Most of the time a BUY signal is oniy executed on the first bar of a series of TRUE, so why have signals that give repeated buys.
Converting a BUY to just the leading edge of each signal is very easy and just needs another line of code BUY:=Mov(C,13,W)>Mov(C,21,W)
AND Fml("Date Filter"); BUY:=BUY AND Alert(BUY=FALSE,2); BUY;
The second line above can be shortened to... BUY:=BUY * Alert(BUY=0,2); where * is synonymous with AND, and 0 is synonymous with FALSE.
If you continue to have trouble then send me a PM and I'll take a closer look at what you're trying to achieve.
Roy
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 2/21/2009(UTC) Posts: 22
Was thanked: 1 time(s) in 1 post(s)
|
Hi Roy, thank you again for
your help and I will take your suggestions regarding truncations etc on board.
However I am still having a problem getting my Fml("Date Filter") to
work for me. I have created an indicator using your protocol and have no
problem plotting that as an overlay on any chart as it asks me for start and
end dates etc and the true/false or 0/1 picture is clearly displayed over the
chart.
However when I try to write
the indicator you suggested, eg
Mov(C,13,W) >
Mov(C,21,W) ;
Fml( "Date
Filter") > 0.5;
The indicator produced only
provides a TRUE condition when the when the Wmav 13>21 and a false for the
opposite over the whole range of the loaded data. This I think is because when
I call up my Fml( "Date Filter") it does not invite me to put in the
parameters I require, that is the beginning and end dates. For example, if I
were to add a Stoch Osc to the formula it would appear as Stoch( , ) and
I would need to insert the parameters I require. So I can’t see how to compose the start and
end dates into any indicator that in which I would want to use the Date
Filter. And essentially the same problem
occurs when I try to insert the Date Filter into a buy or Sell condition in the
EST.
I know I must be doing something stupid but can’t for the life of me
sort it out. If you can help I would be very grateful as I am really looking
forward to being able to use your Date Filter. And I’m sorry, I’m not sure what
you meant by pm – this afternoon?
|
|
|
|
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 maeday
When calling any indicator that includes one or more Input() functions, such as the Fml("Date Filter") indicator, on-chart user settings are ignored by the calling formula, and the date filter will only deliver a TRUE for the DEFAULT start and end date settings. This rule applies to the EST, Explorer and the Expert Advisor. Therefore you need to preset the filters Input() function default settings before running your system, expert, exploration or even a calling (the date filter) indicator by another indicator.. The User settings are unique to the indicator containing one or more Input() functions, and only DEFAULT settings are inherited by a calling formula
In some situations it can be helpful to imbed the date filter into your system code, and if you do that you would need to remove the filter Input() functions and code the relevant 6 variables as constants. The down side with that is that half the available code space in the EST Buy Order window gets dedicated to the Date Filter at the expense of your system code. While there is a way to ensure that Input() function user settings are passed on to other formulas, the method isn't included in the User Manual and is probably unsuitable for users with limited experience.
Sorry, PM means Private Message. Not a problem.
Roy
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 2/21/2009(UTC) Posts: 22
Was thanked: 1 time(s) in 1 post(s)
|
Thanks again Roy, thought it might have been something like that but was hoping for a simpler solution. But hopefully I can manage that now.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 11/18/2007(UTC) Posts: 96 Location: HK
|
Here is an example of a simple and elegant integrated date (and time for intraday charts) filter which only allows signals over a specified period: 16 Oct 2008 - 10 Jan 2013
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
Error Messages
»
Specified data falls outside the range of selected local data.
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.