相信係使用的方法問題:
你可以於 Help 內找到幾個使用方法:
你可能使用實時資料中, 所以可以試試 Security("ONLINE:hk;2318",C)
如是使用硬盤中目錄的資料可以用全目錄路徑名: Security("C:\Metastock Data\Sample\hk;2318",C)
這樣使用只是指明現時同一目錄下的股票: Security("hk;2318",C)
原 Help 內文字:
Referencing Securities with the Security Data Function
The Security Data function allows a formula to access price data for any online or local security. This function can be used in any of MetaStock's formula tools. Online securities are referenced by including "ONLINE:" before the symbol. Local securities are referenced by including the full path to the security file. If the security exists in the same folder as the base security, the path does not need to be included. The symbol, including the path or online reference, is enclosed in quotation marks.
To reference Microsoft's close as an online security: Security("ONLINE:MSFT",C)
To reference Microsoft's close as a local security using the full path: Security("C:\Metastock Data\Sample\MSFT",C)
To reference Microsoft's close as a local security in the same folder as the base security: Security("MSFT",C)
The last type of reference is particularly useful if you use local data exclusively, and store all of your securities in the same local data folder.
For example, the following indicator displays a 30-day moving average of Microsoft's close on any chart, if your online data vendor is active. Mov(Security("ONLINE:MSFT",C),30,S)
The same formula could be written as: Security("ONLINE:MSFT",Mov(C,30,S))
|