NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 12-08-2009, 08:37 PM   #1
nutz505
Junior Member
 
Join Date: Oct 2009
Posts: 22
Thanks: 0
Thanked 1 time in 1 post
Default Using InstrumentType in a Custom Indicator

I am trying to use InstrumentType in a custom indicator and it is telling me that it does not exist in the current context.

I am calling this from the OnBarUpdate function.

Is there a declaration I need to add so I can use it for a comparision?

Thanks
Rich
nutz505 is offline  
Reply With Quote
Old 12-09-2009, 05:10 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

Rich, welcome to the forums - please post the code snippet you use, it's accessible for indicators and strategies - http://www.ninjatrader-support.com/H...umentType.html
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 12-09-2009, 07:32 AM   #3
nutz505
Junior Member
 
Join Date: Oct 2009
Posts: 22
Thanks: 0
Thanked 1 time in 1 post
Default

Bertrand,

I was trying to do this
( Instrument.MasterInstrument.InstrumentType == InstrumentType.Currency ? TickSize*
10 : 1 )

I figured out that you need to include the NinjaTrader.CBI namespace in the declarations.

Thanks for your help
Rich
nutz505 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
Initialize property based on InstrumentType astrolobe Strategy Development 1 11-22-2009 11:25 PM
How access a custom indicator from another custom indicator? Mzsolt Indicator Development 2 07-14-2009 09:19 AM
Custom Indicator velocity General Programming 7 08-04-2008 01:01 PM
InstrumentType check Lost Trader Strategy Development 1 01-12-2008 02:07 AM
Indicator: Removing and Custom Formatting an Indicator’s Chart Label NinjaTrader_Josh Reference Samples 0 12-30-2007 06:49 PM


All times are GMT -6. The time now is 12:43 PM.