NinjaTrader Support Forum  

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 04-13-2012, 07:39 AM   #1
pablobentancor
Junior Member
 
Join Date: Sep 2011
Posts: 7
Thanks: 1
Thanked 0 times in 0 posts
Default opening orders

Hello guys!

I'm new to ninjascript and I have a problem that might seem basic to most people here, but I read the documentation and tried everything I could but wasn't able to figure this out.

I want to open an order and already tried with managed and unmanaged approach.
The orders are sent, I got a fill confirmation on the OnExecution event but the orders are not being opened in the platform...

This is a simulation account from optimusfutures.com using Rithmic.

Here's the code and the logs from the OnExecution event

managed

entryOrder = EnterLong(1, "Enter Long" + DateTime.Now.Second.ToString() + DateTime.Now.Millisecond.ToString());


log from the OnExecution event

Execution='NT-00000' Instrument='ES 06-12' Account='Sim101' Name='Enter Long9282' Exchange=Default Price=1374,5 Quantity=1 Market position=Long Commission=0 Order='NT-00000' Time='09/04/2012 08:31:40 p.m.'

Execution='NT-00001' Instrument='ES 06-12' Account='Sim101' Name='Exit on close' Exchange=Default Price=1356,75 Quantity=1 Market position=Short Commission=0 Order='NT-00001' Time='10/04/2012 08:15:00 p.m.'

-------------------------------------------------------------

unmanaged

entryOrder = SubmitOrder(0, OrderAction.Buy, OrderType.Market, 1, 0, 0, "", "Enter Long"+ DateTime.Now.Second .ToString() + DateTime.Now.Millisecond.ToString() );

log from the OnExecution event
Execution='NT-00000' Instrument='ES 06-12' Account='Sim101' Name='Enter Long35512' Exchange=Default Price=1374,5 Quantity=1 Market position=Long Commission=0 Order='NT-00000' Time='09/04/2012 08:31:40 p.m.'

Execution='NT-00001' Instrument='ES 06-12' Account='Sim101' Name='Exit on close' Exchange=Default Price=1356,75 Quantity=1 Market position=Short Commission=0 Order='NT-00001' Time='10/04/2012 08:15:00 p.m.'


Any help is really appreciated. Thanks!
pablobentancor is offline  
Reply With Quote
Old 04-13-2012, 08:01 AM   #2
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello pablobentancor,
Welcome to the forum and I am happy to assist you.

You are submitting the orders in the Simulator account (Sim101). To send the order to your borkers account please make sure you have live license key and you have selected your brokers account name in the Strategy parameters.

Please let me know if I can assist you any further.
NinjaTrader_Joydeep is offline  
Reply With Quote
Old 04-13-2012, 08:14 AM   #3
pablobentancor
Junior Member
 
Join Date: Sep 2011
Posts: 7
Thanks: 1
Thanked 0 times in 0 posts
Default

Thanks a lot for your quick reply.

All I have is the simulated account, that's the only account shown in the accounts tab, and the only one available in the strategy parameters.

However, shouldn't I be able to see my trades sent to this sim account?
I mean in the platform as if I submitted them manually....

Thanks again for helping me.
pablobentancor is offline  
Reply With Quote
Old 04-13-2012, 08:28 AM   #4
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello pablobentancor,
You can find all the orders in the Orders tab in Control Center http://www.ninjatrader.com/support/h...orders_tab.htm
You can find all the executed trades in the Execution tab in Control Center http://www.ninjatrader.com/support/h...utions_tab.htm

You can also see the trades on the chart, depending on how you have set the Plot executions property. Please refer to this YouTube video which demonstrates it http://www.ninjatrader.com/support/h...utions_tab.htm

Please let me know if I can assist you any further.
NinjaTrader_Joydeep is offline  
Reply With Quote
Old 04-13-2012, 08:33 AM   #5
pablobentancor
Junior Member
 
Join Date: Sep 2011
Posts: 7
Thanks: 1
Thanked 0 times in 0 posts
Default

Thank you.

Yes, I'm familiar with the orders and executions tabs but the orders are not shown there. Only the ones I submit manually from the platform are displayed there, but not the ones sent through ninjascript. Is that normal?
pablobentancor is offline  
Reply With Quote
Old 04-13-2012, 09:09 AM   #6
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
Default

Hello pablobentancor,
Are the orders results from a backtest? If so then they will not show up in Control Center.

Also I could see the trades are for previous dates.
Quote:
Execution='NT-00000' Instrument='ES 06-12' Account='Sim101' Name='Enter Long35512' Exchange=Default Price=1374,5 Quantity=1 Market position=Long Commission=0 Order='NT-00000' Time='09/04/2012 08:31:40 p.m.'

Execution='NT-00001' Instrument='ES 06-12' Account='Sim101' Name='Exit on close' Exchange=Default Price=1356,75 Quantity=1 Market position=Short Commission=0 Order='NT-00001' Time='10/04/2012 08:15:00 p.m.'
The Order/Execution tab displays the orders/trades for the current day only.

You can find the historical trades (not backtest trades) from the Account Performance tab in the Control Center.
http://www.ninjatrader.com/support/h...rmance_tab.htm

Please let me know if I can assist you any further.
NinjaTrader_Joydeep 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
Opening New Chart rt-trader Suggestions And Feedback 1 03-07-2011 11:37 PM
Ninja submits orders when opening Jim68 ATM Strategies (Discretionary Trading) 3 02-22-2011 10:32 AM
NT 7 not opening ikeehawes Version 7 Beta General Questions & Bug Reports 2 08-03-2010 04:50 AM
Order opening germano Strategy Development 2 09-29-2009 02:19 PM
Opening NT dgregor5 Historical NinjaTrader 6.5 Beta Threads 4 01-19-2008 03:08 PM


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