Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

scaling in with ATI

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

    scaling in with ATI

    hi,

    anyone knows hows how to add to a position using NTDirect.dll? I can open/amend/close the initial position but not add contracts to an existing position.

    thanks,
    tom

    #2
    Hello Tom,

    Thanks for your post and welcome to the forums.

    To add to a position using NTDirect.DLL, use the place command.

    In the description of the Place command, "...To apply an order to an active ATM Strategy (existing strategies Stop Loss and Profit Target orders are amended) pass in the active strategy ID value and leave the strategy name field blank."

    Here is a link to the help guide: http://www.ninjatrader.com/support/h...parameters.htm I quoted from the 3rd section on that page.

    Please let me know if I can be of further assistance.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      thanks for your quick reply. i meant to add to an existing long/short position. e.g:

      1 long @ 152.10 (stop @ 152.03 / target 152.20) <= the entry is already filled
      (_ntClient.Command("PLACE", "Replay101", _symbol, "BUY", 1, "LIMIT", px, 0, "GTC", "", atX, strategyX);

      now i would like to add another 3 contracts to strategyX. this works with the PLACE command but allows for multiple entries. i was looking for some way to avoid this by using an orderId like 'Entry2' or such. so that it behaves like 'Entry' (which i can fire as often as i want without placing additional orders).

      Comment


        #4
        Hello Tom,

        Thanks for your reply.

        You would need to manage the ordering with your code/logic

        Something along the lines of a check to see you are long and have not yet added and the conditions are right to add, then add and set a flag to say you have added so that you only do that once. When you are flat you would reset the add flag.
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bmartz, Today, 09:30 AM
        2 responses
        11 views
        0 likes
        Last Post bltdavid  
        Started by f.saeidi, Today, 11:02 AM
        1 response
        2 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by geotrades1, Today, 10:02 AM
        4 responses
        12 views
        0 likes
        Last Post geotrades1  
        Started by rajendrasubedi2023, Today, 09:50 AM
        3 responses
        16 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by lorem, Today, 09:18 AM
        2 responses
        11 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X