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 02-27-2007, 04:13 AM   #1
Oli
Member
 
Join Date: Feb 2007
Location: , ,
Posts: 83
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

I am just cutting my teeth with NT - hope my questions are not annoying...

I have eSignal and NT communicating very well - but I need to take it up a notch at the moment -

there few seconds lag that comes naturally from the time it takes an order to process is causing me some minor glitches...

I am correct to assume that NTMarketPosition is only updated when NTOrderStatus is "filled"?

If any other eSignal users have code which they use to "tell" the current ATI EFS script wait for the order just submited to fill, order is now filled, current position is (long short flat) I'd appreciate a look. At the moment I have a whole bunch of nested logic switches using NTOrderStatus and NTMarketPosition and I was thinking someone else might have something more elegant and less processor hungry?
Oli is offline  
Reply With Quote
Old 02-27-2007, 04:24 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
Post imported post

Oli,

NTMarketPosition() is updated when NT internal position objects are updated which can be driven by different events depending on the broker API in use.

To get around lag, you should really consider using NinjaTrader Version 6 NinjaScript which has full support for custom indicator, custom automated strategy development and automated trading. NinjaScript is C# based which is very similar to JavaScript which is what eSignal uses. Your learning curve should be fairly quick.

Ray
NinjaTrader_Ray is offline  
Reply With Quote
Old 02-27-2007, 04:44 AM   #3
Oli
Member
 
Join Date: Feb 2007
Location: , ,
Posts: 83
Thanks: 0
Thanked 0 times in 0 posts
Post imported post

Thanks Ray,

I will think about a C# port...

My problem though I think will belanguage independent- the trade signals are coming clearly but they have to be related to the current portfolio position which in turn is dependent on order processing. This creates the grey area between the logic which decides that a trade is on and the current portfolio status which can be in a "long" (5-6 second) trasnition process...

I appreciate the help in these forums and am very pleased with my decision to go with Ninja Trader instead of MENT trader services...

Oli


Oli is offline  
Reply With Quote
Old 02-27-2007, 04:47 AM   #4
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
Post imported post

I see. NinjaScript does have plumbing that can take care of worrying about position management for you. For example, you could have something like:

EnterLong();
ExitLong();

Where both methods (functions) are called but are internally ignored if there "is no position to exit" or if a position exists etc...

Ray
NinjaTrader_Ray 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


All times are GMT -6. The time now is 09:54 PM.