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

Notification

Icon
Error

Options
Go to last post Go to first unread
maeday  
#1 Posted : Thursday, August 03, 2017 4:42:51 AM(UTC)
maeday

Rank: Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 2/21/2009(UTC)
Posts: 16

I am currently struggling to master MS15 after my horific discovery of not being able to reinstall my beloved MS11 onto a new computer. I used to be able to plot a yes/no custom indicator that showed whether an index (the XAO) was trading with the 10Emav above or below its 30Emav using the formula:

Security("C:\Shares\ASX\Indices\XAO", Mov(C ,10 ,E) <  Mov(C ,30 ,E )    )

I work off-line using local data and "C:\Shares\ASX\Indices\XAO"  was, and still is, the path to where my XAO data was held, however MS15 now returns the error message  "Error for receiving data for secutity()function.  No error  Symbol XAO"

The MS help section in MS15 gives as an example: Security("ONLINE:MSFT",Mov(C,30,S))     which is the same example given in the old MS11 manual.   It looks to me as though I am using the correct format but I'm guessing something has changed with MS15 and that I now have to add something else to pick up the off-line data.  Any help would be much appreciated.

 

wabbit  
#2 Posted : Thursday, August 03, 2017 2:03:56 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,105
Location: Perth, Western Australia

Was thanked: 11 time(s) in 11 post(s)

I'm not using MS15, so don't know all the bugs yet... Where'd I start is to open a chart of XAO and apply your indicator in it's simplest form:

Code:

Security("XAO", Mov(C ,10 ,E) <  Mov(C ,30 ,E ) );

If the function can call the data from within its own folder then there is no issue with the Security() function... so it's got to be someting else.  If the function doesn't plot, then your symbol could be wrong?  In MS, File > Open and navigate to the data folder, and just check the symbol is just XAO (sometimes it might be $XAO or .XAO or XAO.AX or something else. Beyond that...??? Sorry I couldn't help more.  Please keep us posted if you get this sorted out.

wabbit [:D]

P.S. A good way to easily get the data folder, apply the "Relative Strength Comparative" indicator to a chart and use the browse button to navigate to the required data source, then copy the folder to the clipboard and paste it into your formula.

MS Support  
#3 Posted : Thursday, August 03, 2017 3:24:40 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,345

Thanks: 22 times
Was thanked: 99 time(s) in 96 post(s)
Originally Posted by: maeday Go to Quoted Post

I am currently struggling to master MS15 after my horific discovery of not being able to reinstall my beloved MS11 onto a new computer. I used to be able to plot a yes/no custom indicator that showed whether an index (the XAO) was trading with the 10Emav above or below its 30Emav using the formula:

Security("C:\Shares\ASX\Indices\XAO", Mov(C ,10 ,E) <  Mov(C ,30 ,E )    )

I work off-line using local data and "C:\Shares\ASX\Indices\XAO"  was, and still is, the path to where my XAO data was held, however MS15 now returns the error message  "Error for receiving data for secutity()function.  No error  Symbol XAO"

The MS help section in MS15 gives as an example: Security("ONLINE:MSFT",Mov(C,30,S))     which is the same example given in the old MS11 manual.   It looks to me as though I am using the correct format but I'm guessing something has changed with MS15 and that I now have to add something else to pick up the off-line data.  Any help would be much appreciated.

 

Hi,

The security function has gone through various changes since version 11. In version 12, Local functionality was stripped from the function - making it so that all security function calls were treated as online calls (even if a path was defined).

As we have been adding local support back to MetaStock, we have revisited the Security function, adding back functionality that was removed but also expanding the functionality to support the new Local data types.

The Help file should discuss the various ways the Security function can be used.

SYNTAX      

security("SYMBOL",DATA ARRAY)

FUNCTION     

Returns the value of DATA ARRAY for the specified instrument.  The referenced instrument cannot be a CSV or TXT data file.

 

Four different tags can be put before the SYMBOL to designate the data format of the instrument: BASE, ONLINE, LEGACY, MSLOCAL.

 

BASE: indicates the base instrument's data source is to be used. If the base instrument is from online data, the function will also access online data.  If the base instrument is a local instrument (either legacy or MS local) the security data function will use the same path. A security function without a tag or a path implies BASE. Note: if the base instrument is a CSV or TXT file, using the BASE tag will be undefined.

ONLINE: indicates the instrument is to be requested as an online instrument. Note: It is not valid to include a path with the ONLINE tag.

LEGACY: indicates the symbol is a local instrument in the old MetaStock data format.  A data path by itself is presumed to be a reference to a legacy data file.  Note: Use of the LEGACY tag without a path will only be defined if both the base instrument and the referenced instrument are legacy data files and both are in the same data folder.

MSLOCAL: indicates the symbol is a local instrument in the new MS Local format. Note: Use of the MSLOCAL tag without a path will only be defined if both the base instrument and the referenced instrument are MS local data files and both are in the same data repository.

 

EXAMPLES  

Using BASE 

Security("BASE:IBM",C)

Security("IBM", C)

 

Using ONLINE 

Security("ONLINE:IBM",C)

 

Using LEGACY 

Security("LEGACY:C:\MetaStock Data\My Stocks\IBM",C)

Security("C:\MetaStock Data\My Stocks\IBM",C)

Security("LEGACY:IBM",C)

 

Using MSLOCAL 

Security("MSLOCAL:C:\MetaStock Local Data\Watchlist\IBM",C)

Security("MSLOCAL:IBM",C)

What I would suggest is adding the Legacy prefix to the Security function in the manner of the example above: Security("Legacy:C:\Shares\ASX\Indices\XAO", Mov(C ,10 ,E) <  Mov(C ,30 ,E )    )

If you let the Security function assume "Base" it attempts to look for a security in the same format as the base security. So if you had some data stored in the MSLocal format and attempted to insert your Security function into the chart as an indicator, it would likely fail as it would be looking for MSLocal data in the path above vs. the Legacy (MSFL) formatted data.

It could possibly be failing for other reasons, but I would rule out these potential issues first. In theory, the data path alone should cause the formula to assume Legacy but it would be good to rule this out by explicitly specifying Legacy. Another test would be to simply add the Data folder as a Local list and see if you are able to open the instrument (XAO) that directly as a chart.

Edited by user Thursday, August 03, 2017 4:07:59 PM(UTC)  | Reason: Not specified

maeday  
#4 Posted : Sunday, August 06, 2017 6:17:14 AM(UTC)
maeday

Rank: Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 2/21/2009(UTC)
Posts: 16

Thanks wabbit, your suggestion didn't help but I appreciate the attempt. And thanks also MS support - its complicated but I'll try and sort it once I get some other issues I'm now having with MS15 sorted.

Surprised you haven't "graduated" to MS15 yet wabbit. I've always admired and appreciated your contributions and knowing you haven't moved makes me feel a lot better about my reluctance to move until I was forced to after having been unable to reinstall MS11 after a computer crash.

I have been given a link that does allow reinstallation of MS11 if anyone is interested. It has worked for me altho not wholly successfully as it seems to have acquired a number of virus like symptoms which is why I am rather reluctantly having to try and master 15.  

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.