• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Does NTMarketPosition() work on IB FA accounts?

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

    Does NTMarketPosition() work on IB FA accounts?

    If via TradeStation 9.1 Easy-Language code (using NT8 DLL method) we place a limit order to buy 100 gold contracts in an IB FA master account and only 50% of the working order gets filled, if in TS EL code we call the NTMarketPosition(Gold,"MasterAccount#") function in relation to the master account will calling this function return a value of 50?

    Also will calling NTOrderStatus() return a "PartFilled" string? Reason we ask is that if Ninja places orders into the IB FA master account we need to be able to monitor how much of the order actually gets filled and also be able to monitor the total market position for Gold in the master account, so then when we go to exit the position via ninja/TS we know exactly how many contracts to sell to exit the gold position completely. Is this possible?

    Thanks in advance. Regards, Rod.
    Last edited by Rocket130713; 03-01-2018, 07:39 AM.

    #2
    Hello Rocket130713,

    Thanks for opening the thread.

    If via TradeStation 9.1 Easy-Language code (using NT8 DLL method) we place a limit order to buy 100 gold contracts in an IB FA master account and only 50% of the working order gets filled, if in TS EL code we call the NTMarketPosition(Gold,"MasterAccount#") function in relation to the master account will calling this function return a value of 50?
    When an order is submitted to the master account, we will only see order feedback for Working/Accepted, Cancelled, or Rejected. The executions and positions are delegated to the sub accounts and we would not see the the executions or positions on the master account. I would not expect this to return a useful value when looking at the position on the master account.

    Also will calling NTOrderStatus() return a "PartFilled" string? Reason we ask is that if Ninja places orders into the IB FA master account we need to be able to monitor how much of the order actually gets filled and also be able to monitor the total market position for Gold in the master account, so then when we go to exit the position via ninja/TS we know exactly how many contracts to sell to exit the gold position completely. Is this possible?
    NTOrderStatus() will return any of the order state definitions listed in our help guide. Partial fills should be seen if they have occurred.

    Order State definitions - https://ninjatrader.com/support/help...efinitions.htm

    For additional consideration, NinjaScript strategies enabled on the master account will hit the same behavior using FA accounts where the executions and positions are delegated to the sub account and the strategy will not see Order/Position/Execution updates for the orders it submits. Additional programming to use Account level event handlers like we see in AddOns will need to be implemented into the strategy to manage the positions.

    Given the behavior discussed with position tracking with FA accounts, I may suggest looking into using NinjaScript strategies with the Account class event handlers over Easy Language and the DLL interface to accomplish your goal.

    Please see the AddOn Account class for information on implementing the event handlers for Order/Position/Execution updates - https://ninjatrader.com/support/help...ount_class.htm

    If there is anything else I can do to help, please let me know.
    Last edited by NinjaTrader_Jim; 03-01-2018, 08:25 AM.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by tvaughan4, 12-13-2019, 10:46 PM
    2 responses
    14 views
    0 likes
    Last Post tvaughan4  
    Started by digibob, 12-13-2019, 10:01 PM
    3 responses
    12 views
    0 likes
    Last Post digibob
    by digibob
     
    Started by ldissinger, Yesterday, 12:55 PM
    1 response
    14 views
    0 likes
    Last Post ldissinger  
    Started by pstrusi, Yesterday, 09:06 AM
    1 response
    25 views
    0 likes
    Last Post marcus2300  
    Started by vpzdcv, Yesterday, 02:31 AM
    0 responses
    13 views
    0 likes
    Last Post vpzdcv
    by vpzdcv
     
    Working...
    X