Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 2/27/2007(UTC) Posts: 1
|
When I use the Metastock function: Security("symbol", data array)
I have some problems.
For example, if the directory for HKHSI is: C:/MSDATA/HKINDEX
Then the correct form should be:
Security("C:/MSDATA/HKINDEX/HKHSI",C)
But when I apply this to my data, for example, I want to use STI in D: AR-Data\SGX\Indices
I met the following error:
The following error occurred while calculating bai-security:
Error retrieving data for Security() function.
Symbol not found in the folder Path:
D: AR-Data\SGX\Indices\ Symbol: STI
Appreciation for your kind help.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Can you please cut-and-paste your exact code in a post so that we can see what you have/have not done. Please note: do not retype the information into a post as you might have one thing in MS and another thing in the post; we need to see exactly what you have in your formula.
Hopefully this may help us to identify the problem.
wabbit [:D]
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 10/29/2004(UTC) Posts: 24
|
Pardon me for butting in, but I'm curious about the "security" function as well.
Looking at the previous post, I wonder if he has his back-slashes and forward-slashes mixed up?
<rant>
(I hate this forum -- I can't see the original post...)
(and I had to re-register yet again just to gain access -- of course I got some damn server error for the first two hours I tried...)
</rant>
So let's say I have a security "GLD" residing in "x:\MetaStock Data\Gold & Silver"
and want to create an indicator consisting of that security ("GLD") / (divided by) the "base security".
My aim would be to drag and drop the indicator on the price of an open chart, and have a new inner window open showing that stock price's security/"GLD".
Mind, the open chart may reside in a completely different directory: I may want to chart "X:\MetaStock Data\Index\SPY" against the GLD indicator.
Any help would be appreciated in clarifying the use of the "security" function.
Thanks,
Jim
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey bai[censored]xing..... unless i'm mistaken, if your metastock program itself is in drive "c" then your data folders need to be in "c"..... it appears you have data files on both "c" and "d" drives..... hence the error.....
hey jim..... to see the original post when replying , click on the reply tab attached to it.... sometimes its nice to see all posts in the thread.... if so, you can right click on that tab and choose open in new window.....
your indicator idea should work.... the 2, or more, securities do not have to be in the same folder..... just put the full file path like you suggested......h
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
hayseed wrote:if your metastock program itself is in drive "c" then your data folders need to be in "c" h and All, Data can reside anywhere on any drive, any network locations need to have virtual drive assigned. You just need to fully specify the drive and path to the required data. e.g. My mswin.exe is on C, my data is on Z (a network drive) Security("Z:\Custom Folders\_myFavourites\ABC",C) works... If the called Security() data is in the same folder as the underlying data, then you do not need specify the drive and path, it is automatically assumed to be in the same location. e.g. Open chart is Z:\Custom Folders\_myFavourites\ABC. If I want to compare this with XYZ which happens to also reside in Z:\Custom Folders\_myFavourites\ then I can call this data just using: Security("XYZ",C); without specifying the whole path. I do NOT recommend this short cut often it will lead to problems later when attempting retrieving data from other directories. It is better to "bullet-proof" the code and use the full drive and path to avoid any complications. -- Just a warning to users about the Secuity() function and how it behaves if there is data in the underlying chart on a particular date, but there is no data for that date in the called Security(), and vice versa. This can lead to problems and erroneous data, which is why Jose developed the URSC which can deal with such issues. One can use a couple of other techniques in MS to overcome these problems, but these can get rather messy and are not recommended except for the experienced MS users and the brave! wabbit [:D]
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
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.