Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can i set ExitLongStopLimit and EnterShortStop at the same price

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

    Can i set ExitLongStopLimit and EnterShortStop at the same price

    Hi everyone. In my strategy i need to set two orders (ExitLongStopLimit and EnterShortStop) at the same price.

    i did it this way

    Code:
     orderCloseLong = ExitLongStopLimit(Close[1], Close[1], "ExitLong", "LongStopLimit");
    orderCloseLong.IsLiveUntilCancelled = true;
    
    orderShort = EnterShortStopLimit(1, Close[1], Close[1], "ShortStopLimit");
    orderShort.IsLiveUntilCancelled = true;
    but

    21.12.2020 9:16:01 Strategy 'Test/221732070': Entered internal SubmitOrderManaged() method at 21.12.2020 9:16:01: BarsInProgress=0 Action=Sell OrderType=StopLimit Quantity=0 LimitPrice=3704,50 StopPrice=3704,50 SignalName='ExitLong' FromEntrySignal='LongStopLimit'
    21.12.2020 9:16:01 Strategy 'Test/221732070': Entered internal SubmitOrderManaged() method at 21.12.2020 9:16:01: BarsInProgress=0 Action=SellShort OrderType=StopLimit Quantity=1 LimitPrice=3704,50 StopPrice=3704,50 SignalName='ShortStopLimit' FromEntrySignal=''
    Strategy 'Test/221732070': An Enter() method to submit an entry order at '21.12.2020 9:16:00' has been ignored. Please search on the term 'Internal Order Handling Rules' in the Help Guide for detailed explanation.

    help me pleeease

    #2
    I think your problem is here: https://ninjatrader.com/support/helpGuides/nt8/index.html?managed_approach.htm#InternalOrderHandl ingRulesThatReduceUnwantedPositions

    Comment


      #3
      Leeroy_Jenkins, thanks for the hint, but unfortunately I didn't find the answer, it seems I don't know something about the rules of placing orders

      Comment


        #4
        Hello Kovalev,

        This would not be possible because of the types of orders you have chosen.

        A buy stop order must have the stop price above the current ask. A sell stop must have the stop price below the current bid.

        These cannot be set to the same price.
        Before trying to place the orders through NinjaScript, try placing these manually first.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello NinjaTrader_ChelseaB, please tell me - are there any ways to solve my problem?

          Comment


            #6
            Hello Kovalev,

            You would need to choose order types that are valid at those price levels.

            Buy limit orders are placed below the ask, sell limit orders are placed above the bid. A buy stop order must have the stop price above the current ask. A sell stop must have the stop price below the current bid.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            62 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            134 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            75 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            45 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            50 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X