NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 12-13-2010, 01:38 AM   #1
freewind
Senior Member
 
Join Date: Jan 2010
Posts: 273
Thanks: 15
Thanked 4 times in 3 posts
Default Futures and Currency symbols in an Enum

Hi All,

For an indicator I'm writing I'm using an Enum that will hold all the tickers.
Code:
public enum Tickers
    {
        AA ,
        AXP,
        BA,
        BAC,
        CAT,
        CVX,
        DD,
        DIS,
        GE,
        HD,
        HPQ,
}
When I'm trying to add future contracts such as ES 12-10 and currency pairs $EURUSD I get error because the '$', '-' and number after space are not valid for the Enum.

Do you have any suggestion how to solve this?

Thanks in advance!
freewind is offline  
Reply With Quote
Old 12-13-2010, 06:34 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
Default

freewind, I would then just use the MasterInstrument name without individual contract expiries - http://www.ninjatrader.com/support/h...trument_na.htm

Additionally, parse should also do the trick - http://www.cambiaresearch.com/c4/1df...-Instance.aspx
Last edited by NinjaTrader_Bertrand; 12-13-2010 at 06:37 AM.
NinjaTrader_Bertrand is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Enum Mindset Version 7 Beta General Questions & Bug Reports 14 01-14-2010 11:09 AM
can put 2 different futures contracts/stock symbols on on chart? qwert12 Charting 1 11-25-2009 03:38 AM
Switched from FOREX to Currency Futures .WHY johncare Suggestions And Feedback 0 11-13-2009 09:13 AM
New Zealand currency futures rretch Miscellaneous Support 2 06-01-2009 10:19 AM
Mini Currency Futures NickA Miscellaneous Support 2 05-24-2009 05:45 AM


All times are GMT -6. The time now is 06:09 PM.