![]() |
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
|
|||||||
| 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. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Jun 2011
Posts: 42
Thanks: 24
Thanked 0 times in 0 posts
|
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? |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
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
Bertrand
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Bertrand for this post: |
|
|
|
#3 |
|
Member
Join Date: Jun 2011
Posts: 42
Thanks: 24
Thanked 0 times in 0 posts
|
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?
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
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
Bertrand
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Bertrand for this post: |
|
|
|
#5 |
|
Member
Join Date: Jun 2011
Posts: 42
Thanks: 24
Thanked 0 times in 0 posts
|
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?
|
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
Correct, you would then see no historical position or backtesting, just a strategy that will process logic after the first realtime bar is seen.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Bertrand for this post: |
|
|
|
#7 |
|
Member
Join Date: Jun 2011
Posts: 42
Thanks: 24
Thanked 0 times in 0 posts
|
Bertrand, you are the best :-)
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |