![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Mar 2008
Posts: 731
Thanks: 0
Thanked 1 time in 1 post
|
I'm wondering how I can avoid these errors.
"Strategy 'test' submitted an order that generated the following error 'OrderRejected'. Strategy has sent cancel request, attempted to close the position and terminate itself." and "There is no market data available to drive the simulation..." I'm using a sim account, with OpenTick and I'm trying to work on some strategies, but these errors keep coming up, preventing me from loading a strategy. Is there a setting I need to change somewhere? thanks. |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Unforuntately there is no setting.
Simulator will only work if there is incoming data thus, please be sure that your connection to OT has data flowing for the market you are going to run the strategy on.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Mar 2008
Posts: 731
Thanks: 0
Thanked 1 time in 1 post
|
Ok, it seems a bit limiting to only be able to work on strategies during trading hours, but I'll try getting the historical data from OT and then connecting to a simulated feed and see if that works...
|
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Just connect to
File > Simulated Data Feed or Use Market Replay, record data tomorrow and you will forever have a consistent data set that you can use to test real-time operation.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Mar 2008
Posts: 731
Thanks: 0
Thanked 1 time in 1 post
|
Couldn't it be a matter of simple error handling? If a strategy is loaded at 3:00am EST and the instrument in question is traded on the NYSE, AMEX, NASDAQ, etc. it shouldn't demand new incoming data, then throw a fit and crash if it doesn't get any.
Simply wait until its 9:30am EST, start requesting data again...The most important use for this of course, is so that I can leave NT running overnight and use it as an alarm clock in the morning when the first trading signal is generated...
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Mar 2008
Posts: 731
Thanks: 0
Thanked 1 time in 1 post
|
I tried using the simulator as suggested and had the same issue.
I downloaded historical data for the instrument from OpenTick, disconnected from OpenTick, connected to the simulated data feed, loaded my strategy, and CRASH. My reason for loading strategies outside of market hours is so I can see how a strategy would perform on historical data. Watching a days replay, or simulating data with no correlation to the underlying instrument, doesn't help much. *EDIT* This problem only appears to happen if exit on close is set to false in the strategy properties. If there was a way to make the strategy 'exit on close' of the most recent day, but not the others would this solve the problem...
Last edited by Elliott Wave; 04-11-2008 at 03:44 PM.
|
|
|
|
|
|
#7 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Hi Elliott Wave,
The behavior you are experiencing is generally not normal. Please try testing with the Simulated Data Feed with the NT provided SampleMACrossOver strategy. You should have no problem with that strategy. If that works out for you then you most likely have a bug with your strategy that needs to be addressed.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2 instances of strategy when clicking "apply" and "okay" | dtf139 | Historical NinjaTrader 6.5 Beta Threads | 2 | 01-07-2008 11:25 PM |
| "Requested market data is not subscribed" from IB | Pete S | Historical NinjaTrader 6.5 Beta Threads | 7 | 12-28-2007 07:14 AM |
| Multiple Simultaneous Trades at "Exit on Close" With Setting "1 Entry Per Direction&q | KBJ | Strategy Analyzer | 1 | 04-27-2007 05:34 AM |
| Control center "strategies" tab, "Positions tab, and "Market Analyzer" not | funk101 | Strategy Development | 6 | 04-10-2007 03:44 AM |
| "No market data available" during eSignal TickReplay $PLAYBACK | ratherBgolfing | Automated Trading | 2 | 03-11-2006 12:18 AM |