PDA

View Full Version : NTMarketPosition in EFS script


Oli
02-27-2007, 04:13 AM
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?

NinjaTrader_Ray
02-27-2007, 04:24 AM
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

Oli
02-27-2007, 04:44 AM
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

NinjaTrader_Ray
02-27-2007, 04:47 AM
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