Discussions
»
Special Interest Groups
»
Basic Coding Techniques
»
How come the "isundefined" function seems not working at all? Please help
Rank: Member
Groups: Guests
Joined: 5/6/2007(UTC) Posts: 25
|
My formula is like this
IsUndefined(Mov(C,200,S))
it results in nothing.
Everything with less than 200 period of data is just regarded as error, in fact those rejected are the result I am looking for.
Please can anyone help me.
Thank you.
|
|
|
|
Rank: Advanced Member
Groups: Moderators, Registered, Registered Users, Subscribers Joined: 10/8/2010(UTC) Posts: 1,960
Thanks: 91 times Was thanked: 155 time(s) in 150 post(s)
|
You will probably have to provide some additional detail on what version of MetaStock, what symbol and interval you are attempting to use it on (or are you using it within the Explorer, etc)?
The formula above works just fine for me, returning a value of 1 for the 1st 200 bars of data in my chart and switching to 0 every data point thereafter.
|
|
|
|
Rank: Member
Groups: Guests
Joined: 5/6/2007(UTC) Posts: 25
|
i am using the Metastock 10.1
I tried the above formula in the explorer and it could not give me the result.
My aim is to distinguish the stock with less than 200 days of data.
Thank you.
|
|
|
|
Rank: Advanced Member
Groups: Moderators, Registered, Registered Users, Subscribers Joined: 10/8/2010(UTC) Posts: 1,960
Thanks: 91 times Was thanked: 155 time(s) in 150 post(s)
|
The isundefined function is designed to analyze the condition of an indicator over a data point. If a security does not have a particular data point, then there is nothing for this function to analyze. You would want to use the Cumulative function instead to count up the total bars available in the Explorer. You would also want to ensure your Load Records is set to a high enough number to accomodate this setting.
Cum(1) >= 200
The above formula would ensure that the security has to have at least 200 records available. You could include this in the Filter portion of an exploration if you want to reject securities with less than 200 data points. Edited by user Tuesday, November 10, 2015 3:35:52 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Member
Groups: Guests
Joined: 5/6/2007(UTC) Posts: 25
|
Thank you very much for your help.
I have solved my problem.
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Special Interest Groups
»
Basic Coding Techniques
»
How come the "isundefined" function seems not working at all? Please help
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.