![]() |
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
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Oct 2009
Posts: 22
Thanks: 0
Thanked 1 time in 1 post
|
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 |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
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
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Oct 2009
Posts: 22
Thanks: 0
Thanked 1 time in 1 post
|
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 |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |