Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SubmitOrderUnmanaged from an Indicator

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

    #16
    Thank you for the quick response

    Comment


      #17
      I know this is an old thread, but I'm struggling with contract limits when placing orders like this via an indicator. It seems like Ninja incorrectly calculates the number of contracts allowed. I have my own indicator with this issue, but I was able to reproduce it with the provided indicator in this thread ProfitChaseStopTrailIndicatorExample.

      All you have to do is change the number of contracts to 10 in the indicator and then set the account to have a max number of 10 contracts allowed. This will cause the TP and SL to fail to be filled. This indicator is following what I understand to be the correct behavior of waiting until the market order is filled before trying to place the TP and SL orders...

      Any advice would be appreciated.

      Comment


        #18
        Hello Blaze212,

        The ProfitChaseStopTrailIndicatorExample was a simple example only designed to work with one contract.

        If you have multiple contracts you need logic in the Account.ExecutionUpdate event handler method to change the quantity of the exit orders on each part fill of the entry.

        The example below provides similar logic for a strategy of tracking part fills that could be adapted to the addon approach.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #19
          If I wait for the market order to be Filled then I wouldn't have to deal with any of the partially filled order logic, right?
          I could just ignore the Partially Filled state, and then when Filled hits submit my bracket orders, that should eliminate any too many open contact type errors, right?

          Comment


            #20
            Hello Blaze212,

            Correct, if the order is fully filled you would not have to adjust exit orders for partially filled entry orders.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Today, 05:17 AM
            0 responses
            50 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            126 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            69 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            42 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            46 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X