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 > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 07-01-2011, 04:31 AM   #1
greed999
Member
 
Join Date: Jun 2011
Posts: 42
Thanks: 24
Thanked 0 times in 0 posts
Default Strategy remains yellow after 15 mins?

What have I done wrong?

Somtimes it starts instantly and turns green in seconds, sometimes remains yellow for 15 mins or for a half of an hour... how can I fix this?
greed999 is offline  
Reply With Quote
Old 07-01-2011, 04:43 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

Hi greed999, it depends if there's a historical strategy position it waits to get flat from or not - here are all the states explained - http://www.ninjatrader.com/support/h...egies_tab2.htm
NinjaTrader_Bertrand is offline  
Reply With Quote
The following user says thank you to NinjaTrader_Bertrand for this post:
Old 07-04-2011, 04:53 AM   #3
greed999
Member
 
Join Date: Jun 2011
Posts: 42
Thanks: 24
Thanked 0 times in 0 posts
Default

Well, actually I don't use any historical data... It doesn't allow me to set 'days to load' parameter to 0... Does it mean that strategy has to load one day? 'min bars required' is set to 0 also... Can I avoid the delay?
greed999 is offline  
Reply With Quote
Old 07-04-2011, 06:15 AM   #4
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

If you do not want to deal with historical calcs on OnBarUpdate() calls you could simply call OnBarUpdate() only for realtime data going forward, here's how:

http://www.ninjatrader.com/support/h...historical.htm
NinjaTrader_Bertrand is offline  
Reply With Quote
The following user says thank you to NinjaTrader_Bertrand for this post:
Old 07-04-2011, 10:16 AM   #5
greed999
Member
 
Join Date: Jun 2011
Posts: 42
Thanks: 24
Thanked 0 times in 0 posts
Default

And thats all? In order to prevent script from hanging during startup I just need to add

if (Historical) return;

into OnBarUpdate() procedure before my main code?
greed999 is offline  
Reply With Quote
Old 07-04-2011, 10:23 AM   #6
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

Correct, you would then see no historical position or backtesting, just a strategy that will process logic after the first realtime bar is seen.
NinjaTrader_Bertrand is offline  
Reply With Quote
The following user says thank you to NinjaTrader_Bertrand for this post:
Old 07-04-2011, 10:26 AM   #7
greed999
Member
 
Join Date: Jun 2011
Posts: 42
Thanks: 24
Thanked 0 times in 0 posts
Default

Bertrand, you are the best :-)
greed999 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
Yellow Status Bar on Live Strategy andrewnyc Connecting 2 08-12-2012 11:19 PM
Yellow strategy name mtthwbrnd Strategy Analyzer 10 05-19-2011 02:43 AM
Strategy will not enable, always yellow Torso Version 7 Beta General Questions & Bug Reports 2 09-10-2010 12:16 PM
NInja strategy colors when starting being yellow richa61416 Version 7 Beta General Questions & Bug Reports 1 06-21-2010 10:22 AM
ControlCenter>Strategies: Yellow Strategy? MXASJ Version 7 Beta General Questions & Bug Reports 3 11-11-2009 02:43 AM


All times are GMT -6. The time now is 11:19 AM.