"/" in ticker symbol
Author: sf631
Creation Date: 7/9/2009 4:59 PM
profile picture

sf631

#1
I'm using forex rates in a strategy and have found that MSN has symbols representing the major currency pairs I need. They refer to yen to dollars as "/JPYUSD" etc... and when I attempt to SetContext("/JPYUSD", true), I get index out of range errors. This shouldn't be the case since the same doesn't happen when I call the symbol as GetExternalSymbol

Question 1: is there anything with C# or WLP syntax that makes it problematic to use a "/" character in a symbol?
Question 2: any way to force a different symbol than the one that the data provider uses (eg use USDJPY instead of /JPYUSD)

Thanks
profile picture

Eugene

#2
"/" is a character that is invalid in file and directory names. However, an illegal symbol like that is not a problem for the MSN provider because it was designed to convert and unconvert these characters on-the-fly.

You're right, the behavior of SetContext shouldn't be an issue and I can't duplicate it. Please post the code and steps required to reproduce the error.

Does the following code fail? For me, it works:
CODE:
Please log in to see this code.
profile picture

sf631

#3
seems to be working now... I'm still having fits with getting the margins/point values to come out right on the futures, but let me do some more digging in the archives to see if I can work it out
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).