“GETDATA” with custom codes

Optuma Forums Optuma Scripting “GETDATA” with custom codes

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #62287
    • Topics: 14
    • Replies: 10
    • Posts: 24

    “GETDATA” in a script that is using a custom code (XLK/SPX) not working? The script works with normal symbols.


    • Topics: 5
    • Replies: 332
    • Posts: 337


    I’ve done a few tests here using GetData and custom codes and it appears to be working correctly.  Looking at your example I think there is a typo in the first line, where : is being used instead of /

    V1 = GETDATA(CODE=XLK:SPX:Formula Codes);

    Should it read as…

    V1 = GETDATA(CODE=XLK/SPX:Formula Codes);

    1 user thanked author for this post.
    • Topics: 63
    • Replies: 557
    • Posts: 620

    Because the GETDATA() function uses a colon to determine which exchange to use you cannot create a custom symbol containing one. For example, XLK:SPX is telling GETDATA to look for XLK in the SPX exchange, which doesn’t exist so therefore won’t return any values.

    We’ll look into a possible fix for this, but in the meantime you would need to change your custom code symbols to eg XLK/SPX if you wish to reference it in a GETDATA() function.

    1 user thanked author for this post.
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.