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 > NinjaScript Development Support > Strategy Development

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

Reply
 
Thread Tools Display Modes
Old 04-08-2008, 07:03 AM   #1
Elliott Wave
Senior Member
 
Join Date: Mar 2008
Posts: 731
Thanks: 0
Thanked 1 time in 1 post
Default "'OrderRejected'. Strategy has sent cancel requests" & "There is no market data..."

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.
Elliott Wave is offline  
Reply With Quote
Old 04-08-2008, 07:27 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

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.
NinjaTrader_Ray is offline  
Reply With Quote
Old 04-08-2008, 12:30 PM   #3
Elliott Wave
Senior Member
 
Join Date: Mar 2008
Posts: 731
Thanks: 0
Thanked 1 time in 1 post
Default

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...
Elliott Wave is offline  
Reply With Quote
Old 04-08-2008, 01:02 PM   #4
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

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.
NinjaTrader_Ray is offline  
Reply With Quote
Old 04-10-2008, 01:13 AM   #5
Elliott Wave
Senior Member
 
Join Date: Mar 2008
Posts: 731
Thanks: 0
Thanked 1 time in 1 post
Default

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...
Elliott Wave is offline  
Reply With Quote
Old 04-11-2008, 02:27 PM   #6
Elliott Wave
Senior Member
 
Join Date: Mar 2008
Posts: 731
Thanks: 0
Thanked 1 time in 1 post
Default

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.
Elliott Wave is offline  
Reply With Quote
Old 04-12-2008, 12:03 AM   #7
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

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.
NinjaTrader_Josh 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
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


All times are GMT -6. The time now is 11:21 PM.