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

Buy limit above market price

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

    Buy limit above market price

    Hi,

    I am writing a strategy and would need to place a limit order that is above the market price. Would want that executed only if the current price is touches that limit. (a normal limit order would execute immediately at market price since limit price is above market.)

    How can i do it?

    Additionally would also want to simultaneously place a stop loss, that obviously below the market price. (in case of LONG)

    I tried using EnterLongStopLimit, but that doesnt seem to do the trick.

    #2
    Hello GauthamK,

    Welcome to the NinjaTrader forums!

    The nature of a limit order is that it fills at the specified price or better. If the market price is better, it fills at the market price.

    Below is a link to an educational resource on how limit orders work.


    A buy limit fills at the ask. For it to remain working it must be below the ask.
    A sell limit fills at the bid. For it to remain working it must be below the bid.

    If you want an order on the other side of the ask or bid, use a stop or stop limit order and not a limit order.

    Using EnterLongStopMarket() does this achieve your goal of placing a buy entry above the ask?

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      it doesnt help me. but thank you.

      Let me give you an example.

      Say prev bar high is 100. current market price is 96. I want to buy only if the current market price crosses above 100. If it doesnt reach 100 in this bar, i want to cancel that order.

      I will get to the stop loss once we resolve this.

      Comment


        #4
        EnterLongStopMarket resolves it. Try it.

        For short, if low is at 96 and current market price is 100, and you want to enter when price crosses below 96, you would use EnterShortStopMarket.

        Comment


          #5
          Hello GauthamK,

          When you say it does not help you, what is causing an issue?

          Is a rejection error appearing with the enter long stop order?

          What is the stop price of the order and what is the current ask price at the time of submission?
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by stafe, 04-15-2024, 08:34 PM
          9 responses
          42 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by frslvr, 04-11-2024, 07:26 AM
          7 responses
          111 views
          1 like
          Last Post caryc123  
          Started by rocketman7, Today, 09:41 AM
          3 responses
          8 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by traderqz, Today, 09:44 AM
          2 responses
          5 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by rocketman7, Today, 02:12 AM
          7 responses
          31 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X