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

Limit price can't be smaller than current bid

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

    Limit price can't be smaller than current bid

    Hello,

    While submitting an EnterShortLimit order, I've received the following error:

    Limit price can't be smaller than current bid. affected Order: SellShort 10 Limit @ 123.781

    At the time the order was submitted, the values where:
    Close[0]: 123.810
    Ask: 123.818
    Bid: 123.811

    And my limit price was 123.781

    I do not understand why I got that error, I'm giving myself a few pips (I'm trading foreX) to make sure the order will be filled (I am not interested in a market order since the slippage might b to large). Does the limit has to be 123.811 (current bid) or higher? why?

    Thank you

    #2
    Hello kiss987,

    Thank you for your post.

    Short Limit orders would need to be above the Bid price. Limit orders are set to enter at the price they are set or better. If you wish to go below the market for your short you would need to use a Stop Market or a Stop Limit order.

    There is some publicly available information on Limit orders at the following link: http://www.investopedia.com/terms/l/limitorder.asp

    Please let me know if you have any questions.

    Comment


      #3
      Thank you for your reply

      In that case, can I define a maximum slippage when I submit a MARKET order?

      Comment


        #4
        Hello kiss987,
        Thanks for your reply.
        No, market orders indicate you are willing to be filled at the best available market price.
        BrandonNinjaTrader Customer Service

        Comment


          #5
          I am having a similar issue in a strategy. Because forex is now 5 decimal places, the slightest move will modify the the price before the execution occurs. Especially during fast markets when trying to Buy Bid and Sell Ask. It causes an error like the picture shown so there is some sort of feedback. How can I access that event so I can tell the strategy to resubmit when it occurs?
          Attached Files

          Comment


            #6
            Hello cutzpr,

            Thank you for your post.

            There is no event to access for that message. You would instead need to prevent such order submissions to invalid price levels in your code.

            Please let me know if you have any questions.

            Comment


              #7
              Originally posted by hirezsqwave View Post
              SubmitOrderUnmanaged(0, OrderAction.Buy, OrderType.Limit, Quantity, 0, ssPrice, "", "Enter SStop");
              The LimitPrice argument is incorrect.

              For a LIMIT order, the LimitPrice should not be zero.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Javierw.ok, Today, 04:12 PM
              0 responses
              2 views
              0 likes
              Last Post Javierw.ok  
              Started by timmbbo, Today, 08:59 AM
              2 responses
              10 views
              0 likes
              Last Post bltdavid  
              Started by alifarahani, Today, 09:40 AM
              6 responses
              40 views
              0 likes
              Last Post alifarahani  
              Started by Waxavi, Today, 02:10 AM
              1 response
              18 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Started by Kaledus, Today, 01:29 PM
              5 responses
              15 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X