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 06-01-2010, 11:29 AM   #1
quantdeveloper
Junior Member
 
Join Date: Feb 2010
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
Default Using TradeStation dll to send orders

I am using TradeStation to send orders to ninja.
First I would like to know if i can send entry orders and then have Ninja use an ATM strat to exit the trade. I can see the entry price on the DOM but it does not look like the ATM strategy picks up the entry. Does the ATM used in the DOM trader only work with orders entered by hand?

Second if i do have to handle the entry and exits in TradeStation does anyone have any good ideas for tracking the orders. I will use NTMarketPosition to get Ninja position but I am limited to checking at end of bar( I am using P&F charts).I will build the order interface on tick chart if i have to. Just checking to see if there is an easier way.
Thanks
QD
quantdeveloper is offline  
Reply With Quote
Old 06-01-2010, 12:25 PM   #2
NinjaTrader_Tim
NinjaTrader Customer Service
 
NinjaTrader_Tim's Avatar
 
Join Date: Nov 2009
Location: Denver, CO
Posts: 1,424
Thanks: 0
Thanked 3 times in 3 posts
Default

Hi quantdeveloper,

Using the NTCommand() you can pass in the parameter for "strategy" which would be the ATM strategy name.

More info at - http://www.ninjatrader-support.com/H...html?Functions
NinjaTrader_Tim is offline  
Reply With Quote
Old 06-11-2010, 11:52 AM   #3
quantdeveloper
Junior Member
 
Join Date: Feb 2010
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
Default

I am sending an order for 2 contracts and have 1 stop and 2 targets. I am calling a ninja "ATM" to handel the stops and targets. I am using the following code to handel stop and reverse trades

if NTMarketPosition("") = 2
then begin
NT_size=(4);
end;
if NTMarketPosition("") = 1
then begin
NT_size=(3);
end;
if NTMarketPosition("") = 0
then begin
NT_size=Position_size;
end;

the question is can ninja cancel the targets and stops from a buy if i reverse into a sell
or do i need to do it from tradestation with a cancel dll
quantdeveloper is offline  
Reply With Quote
Old 06-11-2010, 01:06 PM   #4
NinjaTrader_Tim
NinjaTrader Customer Service
 
NinjaTrader_Tim's Avatar
 
Join Date: Nov 2009
Location: Denver, CO
Posts: 1,424
Thanks: 0
Thanked 3 times in 3 posts
Default

Hi quantdeveloper,

You can use the NTCommand() to cancel the order as well, then resubmit if necessary.
NinjaTrader_Tim 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
ninjatrader does not send the orders to tws cesas Automated Trading 13 06-08-2009 09:42 AM
Send orders from Super Dom nachig ATM Strategies (Discretionary Trading) 3 03-23-2009 03:51 PM
Is it possible to send out OCO orders using NT DLL? clearpicks Automated Trading 8 05-24-2008 07:28 PM
send many orders in one instrument dantes Strategy Development 6 04-23-2008 10:16 AM
How to Send an MOC order from TradeStation AJNIN Automated Trading 1 11-20-2007 02:39 AM


All times are GMT -6. The time now is 04:47 AM.