Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NTMarketPosition in EFS script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    NTMarketPosition in EFS script

    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?

    #2
    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
    RayNinjaTrader Customer Service

    Comment


      #3
      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


      Comment


        #4
        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
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        77 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        45 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        27 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        32 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        63 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X