“GETDATA” with custom codes

Optuma Forums Optuma Scripting “GETDATA” with custom codes

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #62287
    James
    • Topics: 21
    • Replies: 11
    • Posts: 32

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

    Thanks!

    #62360
    Matthew
    • Topics: 5
    • Replies: 631
    • Posts: 636

    Hi,

    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.
    #62373
    Darren
    • Topics: 71
    • Replies: 880
    • Posts: 951

    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