Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

How to Enter to an specific price

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

    How to Enter to an specific price

    Hello,

    I have an strategy that has to submit a short order when there is a pullback bar after the price crossed a support line, the entry price that I'm trying to set is 2 ticks bellow Low[0] for the pullback bar but the order is being filled in a price above what I set.

    I'm ussing EnterShortLimit for entry order, ExitShortStopMarket for stop order and ExitShortLimit for profit order.

    I tried EnterShortStopLimit but I got and error "sell stop or sell stop limit orders can't be placed above the market affected order"

    Could you recommend how I can implement this?

    Best regards,

    Victor

    #2
    Originally posted by [email protected] View Post
    Hello,

    I have an strategy that has to submit a short order when there is a pullback bar after the price crossed a support line, the entry price that I'm trying to set is 2 ticks bellow Low[0] for the pullback bar but the order is being filled in a price above what I set.

    I'm ussing EnterShortLimit for entry order, ExitShortStopMarket for stop order and ExitShortLimit for profit order.

    I tried EnterShortStopLimit but I got and error "sell stop or sell stop limit orders can't be placed above the market affected order"

    Could you recommend how I can implement this?

    Best regards,

    Victor
    if you want to use an EnterShortStopLimit order, your Stop Price must be below the market price at the time you place the order, and the Limit Price at which you want a fill must be at or below the Stop Price that you want to use. The rules of the order structure must be followed.

    Comment


      #3
      Hello, thanks for your note.

      Short stop limit orders need to be placed below the market price. If you need a short order above the market, use a sell limit or a sell MIT order.

      Best regards.
      Chris L.NinjaTrader Customer Service

      Comment


        #4
        Thanks koganam and ChrisL, I'm new to ninjatrader and I'm looking for the best command to put my order, for example I have a reversal bar (Low:2853.50, Open:2854.25, Close:2855.25, High:2856.25) and I want to set a short order 2 ticks bellow this bar so I set limit price of 2853.25 ...but the order got filled at 2855 using EnterShortLimit. Is there a way to implement this? best regards.

        Comment


          #5
          Hello [email protected],

          Sell Limit orders placed below the market will fill at the market price since they fill at the limit price or better. You could use EnterShortMIT() to place a market If touched order, which will have NinjaTrader submit a market order to sell at that price once the price touches.

          Order Types - https://www.ninjatraderbrokerage.com...er_limit_order

          All order methods can be referenced here - https://ninjatrader.com/support/help...d_approach.htm

          Please let us know if we can be of further assistance.
          JimNinjaTrader Customer Service

          Comment


            #6
            Hello NinjaTrader_Jim,

            I changed my script to make EnterShortMIT() but the order is still filled bellow (2855.25) the price I set. (2853.25). My current bar is (Low:2853.50, Open:2854.25, Close:2855.25, High:2856.25).

            5/10/2019 10:09:01 AM Strategy 'Estrategia basada de metodo BPT V1.0/179107469': Entered internal SubmitOrderManaged() method at 5/10/2019 10:09:01 AM: BarsInProgress=0 Action=SellShort OrderType=MIT Quantity=1 LimitPrice=0 StopPrice=2853.25 SignalName='Open Short' FromEntrySignal=''
            5/10/2019 10:09:00 AM Submitted limitPrice:0 stopPrice:2853.25 averageFillPrice:0 Open Short
            5/10/2019 10:09:00 AM Accepted limitPrice:0 stopPrice:2853.25 averageFillPrice:0 Open Short
            5/10/2019 10:09:00 AM Working limitPrice:0 stopPrice:2853.25 averageFillPrice:0 Open Short
            5/10/2019 10:09:00 AM Filled limitPrice:0 stopPrice:2853.25 averageFillPrice:2855.25 Open Short

            Best regards.

            Comment


              #7
              Hello [email protected],

              You could use a condition that checks if Close == 2853.25 and then submit a market order with EnterShort() to achieve the result you are looking for. MIT does have some behaviors similar to limit orders which would be why the order submitted and filled at the better price. Note that you will receive slippage when using market order and the order may not fill at that exact price.

              We look forward to being of further assistance.
              JimNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Christopher_R, Today, 12:29 AM
              0 responses
              8 views
              0 likes
              Last Post Christopher_R  
              Started by sidlercom80, 10-28-2023, 08:49 AM
              166 responses
              2,235 views
              0 likes
              Last Post sidlercom80  
              Started by thread, Yesterday, 11:58 PM
              0 responses
              3 views
              0 likes
              Last Post thread
              by thread
               
              Started by jclose, Yesterday, 09:37 PM
              0 responses
              7 views
              0 likes
              Last Post jclose
              by jclose
               
              Started by WeyldFalcon, 08-07-2020, 06:13 AM
              10 responses
              1,415 views
              0 likes
              Last Post Traderontheroad  
              Working...
              X