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 CarlTrading, 03-31-2026, 09:41 PM
            1 response
            80 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            40 views
            0 likes
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            64 views
            2 likes
            Last Post CaptainJack  
            Started by CarlTrading, 03-30-2026, 11:51 AM
            0 responses
            64 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 03-30-2026, 11:48 AM
            0 responses
            54 views
            0 likes
            Last Post CarlTrading  
            Working...
            X