in Search

Use SECURITY as a variable

Last post 09-07-2006, 21:26 by hayseed. 1 replies.
Sort Posts: Previous Next
  •  08-27-2006, 9:08 20545

    Use SECURITY as a variable

    I've imported a small set of dates -- not consecutive -- which all have "1" as the closing price.

    EXAMPLE:

    Code:

    Date         Close

    8/31/1998     1

    9/21/2001     1

    10/9/2002     1

    Using The Downloader's CONVERT function to import, the data seems OK.  Now, using the "Security" function in an indicator (on any security)...

    Code:

    Security("C:\METASTOCK DATA\IMPORT\_Bull",C);

    ...and plotting in a separate window, the security ALWAYS shows up as an horizontal line with the value of "1".  I expected the "1" value ONLY on the dates imported, but it shows up as a constant value of "1" on every date.

    What's wrong?


    --Johnathan
  •  09-07-2006, 21:26 20742 in reply to 20545

    closed until further notice

    hey johnathan.... the trouble is close is close untill further notice.... a closing value of 1 stays 1 untill it's different...

    possibly you can achieve your goal by using something like

    Security("aaaa",C)>Ref( Security("aaaa",C),-1)

    of course you'd use your data path.... consecutive days might pose a problem..... just a quick thought....h

View as RSS news feed in XML