NinjaTrader Support Forum  

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

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 11-06-2009, 01:01 AM   #1
Buthus
Junior Member
 
Join Date: May 2009
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Question How to determine whether an instrument is dealable or not

Is there a way to determine whether an instrument is dealable or not? Something like Instrument.MasterInstrument.IsDealable? If there's no such property, what's the best practice to determine this value?

Regards,
Daniel
Buthus is offline  
Reply With Quote
Old 11-06-2009, 05:13 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

Daniel, are you referring to tradable on the current connection you use? Generally you could check for the type of instrument and excludes indices then - http://www.ninjatrader-support.com/H...umentType.html
NinjaTrader_Bertrand is online now  
Reply With Quote
Old 11-06-2009, 05:22 AM   #3
Buthus
Junior Member
 
Join Date: May 2009
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Default

Hello Bertrand,

yes I mean tradable on the current connection. I have a multi instrument strategy that analyzes several currency pairs, but some of them are not tradeable, so I get wrong results. For example: The last bar for $SGDJPY appeared today 06:00am; obviously this pair will not be tradable until next week.

Regards,
Daniel
Buthus is offline  
Reply With Quote
Old 11-06-2009, 05:33 AM   #4
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

Daniel, unfortunately there's no property returning this - I would limit the strategy via time filters for each symbol you intend trading with it.
NinjaTrader_Bertrand is online now  
Reply With Quote
Old 11-06-2009, 05:35 AM   #5
Buthus
Junior Member
 
Join Date: May 2009
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Default

Ok, thanks. Maybe for future Versions of NT: There's a flag in Gains API "D=Status, Dealable or Referred". It would be great if this flag will become available in NinjaScripts.

Regards,
Daniel
Buthus is offline  
Reply With Quote
Old 11-06-2009, 05:41 AM   #6
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

Daniel, thanks for this suggestion, appreciated.
NinjaTrader_Bertrand is online now  
Reply With Quote
Old 11-06-2009, 06:14 AM   #7
Buthus
Junior Member
 
Join Date: May 2009
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Default

It's me again.

I've contacted Gain to ask them for a time table. The short answer: "There is no such table". The problem was that I was not subscribed to this pair, so NT loaded the historical data, but got no updates from the rates service.

Isn't it possible to change the subscriptions at runtime depending on which pairs are used (in charts, strategies and whatever)?

Regards,
Daniel
Buthus is offline  
Reply With Quote
Old 11-06-2009, 06:30 AM   #8
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

Unfortunately not Daniel, those would be managed at Gain directly for your login.
NinjaTrader_Bertrand is online now  
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
How to programatically determine if I am in a trade? DancesWithBears Indicator Development 2 08-20-2009 03:50 PM
Easy way to determine last bar? terenyi General Programming 2 09-08-2008 03:44 PM
Determine Woodies LSMA color Koffie Strategy Development 3 05-04-2008 11:43 PM
Need help to determine fastest integration method Slimbeaux Automated Trading 1 01-08-2008 07:49 AM
How to determine if a bracket order completed gracefully. mkundi Automated Trading 4 06-27-2005 08:09 AM


All times are GMT -6. The time now is 07:01 AM.