Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Two orders in opposite direction

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

    Two orders in opposite direction

    I'd like to set two limit orders in opposite direction:
    ...
    if (enterOrderL == null && enterOrderS == null){
    enterOrderL = EnterLongLimit(0, true, DefaultQuantity, GetCurrentBid()-SpredVal * TickSize, "");
    enterOrderS = EnterShortLimit(0, true, DefaultQuantity, GetCurrentAsk() + SpredVal * TickSize, "");
    }
    ...

    EnterLongLimit() executed correctly, but EnterShortLimit() shows this error:
    "**NT** An Enter() method to submit an entry order at '01.10.2012 13:53:15' has been ignored. Please search on the term 'Internal Order Handling Rules' in the Help Guide for detailed explanation."

    After using "Unmanaged = true" EnterShortLimit() shows another error:
    "**NT** Error on calling 'OnBarUpdate' method for strategy 'Spreader_a/ee88b08fcd2a4c3c83f65ccff284d70b': 'EnterLongLimit' method can't be called on unmanaged strategies."

    Is there any way to deceive "Internal Order Handling Rules that Reduce Unwanted Positions"?

    #2
    Hello n0_namer,
    You cannot place bracket orders using the Managed approach. You have to use the Unmanaged approach to do it.

    You are placing the orders using the Enter() methods, which you cannot use if you set Unmanaged = true.

    Please use the SubmitOrder() method to place the order. Please refer to our help guide to know more

    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Hi,

      I'm trying to sort out my issue here with this. I want 2 orders in the market in opposite directions AT THE SAME TIME. I've turned on the unmanaged approach in the initialise function.
      I'm using the submit orders functions ie:

      Code:
      if (Close[0] > SMA(20)[0] && entryOrder == null)
               			entryOrder = SubmitOrder(PERIOD_M1_ASK, OrderAction.Buy, OrderType.Limit, 1, GetCurrentBid(), 0, "", "Long Limit");
      				
      				if (Close[0] < SMA(20)[0] && entryOrder2 == null)
               			entryOrder2 = SubmitOrder(PERIOD_M1_ASK, OrderAction.Sell, OrderType.Limit, 1, GetCurrentAsk(), 0, "", "Short Limit");

      however when the second order gets executed, it closes out the first position.
      I need both positions remaining open in both directions.

      Please tell me how to stop the above happening.;

      thanks
      Daniel
      Last edited by PolarBear; 02-10-2013, 07:19 PM.

      Comment


        #4
        Daniel, I have replied directly to your email sent to support - thanks.

        Comment


          #5
          Bertran:

          Please help me on this one. I want to enter 1 contract at market and 1 contract at limit price at the same signal.

          Thanks.

          Comment


            #6
            luxurious_04, please open a new thread for your unrelated issue - thanks.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            66 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            41 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            24 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            26 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            53 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X