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 geotrades1, Today, 10:02 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by ender_wiggum, Today, 09:50 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by rajendrasubedi2023, Today, 09:50 AM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by bmartz, Today, 09:30 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by geddyisodin, Today, 05:20 AM
        3 responses
        26 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X