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

Marketable Limit order

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

    Marketable Limit order

    Hi,

    Is it possible to use marketable limit orders? I would like to buy/sell at market but only within a maximum amount range of pips. If the order tries to fill outside that range the order should be canceled.

    #2
    Hello siroki,
    Thanks for posting today.

    I believe what you are attempted can be done with a stop limit order.

    If that is not the case, can you provide further clarification by what you mean by within a maximum range of pips.

    Please let us know if we may be of further assistance for anything NinjaTrader.
    Alex G.NinjaTrader Customer Service

    Comment


      #3
      Well. I use the CalculateOnBarClose = true. Then I read the Close[0] price of the bar and hit a limit buy order for that Close[0] price.

      My broker is FXCM. Problem occurs when the current ask price is below the Close[0] that i'm trying to get filled. FXCM rejects the order because the price I'm willing to pay is above the market price. The reason I want to do it this way is because I dont want to use market order because the spreads can be infavorable. But I also dont want to miss out on the entry, so I try to get filled at the Close[0] which at that time maybe be above market price.

      I have also tried to do this with Interactive Brokers and they accept the order above market price, but just fill at current best price.

      Comment


        #4
        NT error

        Hello,

        Could you advise what does the following message mean. Is there problem with my script or it NT's problem. How can I fix it?

        **NT** Error on calling 'OnMarketData' method for strategy 'RealV3/8bade28107bd44488626b345a10d62ad': This key does not exist in dictionary (Данный ключ отсутствует в словаре).

        Comment


          #5
          Originally posted by trader_85 View Post
          Hello,

          Could you advise what does the following message mean. Is there problem with my script or it NT's problem. How can I fix it?

          **NT** Error on calling 'OnMarketData' method for strategy 'RealV3/8bade28107bd44488626b345a10d62ad': This key does not exist in dictionary (Данный ключ отсутствует в словаре).
          Please don't hijack my thread.

          Comment


            #6
            Hello siroki,
            Thanks for the reply.

            If you are trying to place a buy limit above the current ask price your order will get rejected.

            A solution would be to check the next open of the current bar and then decide if you want to place the order based on the price. You could check and see if the buy limit order would be allowed to be placed by knowing the current ask price.

            However, you would need to change your CalculateOnBarClose = true so that you can calculate on updates and not only on the close of the bar.

            The reason other brokerages would instantly fill is because the limit order would be filling at the current best price. The limit is the lowest you want to buy at. So if the price is below the limit it fill instantly because it will be buying at the best price which is better than your limit at the time. FXCM does not allow this and will reject that order versus filling you at the lower price.

            Please let us know if we may be of further assistance for anything NinjaTrader.
            Alex G.NinjaTrader Customer Service

            Comment


              #7
              Hello trader_85,
              Thanks for posting today and welcome to forum.

              To further investigate please send me your log and trace files for today so that I may look into what occurred.

              You can do this by going to the Control Center-> Help-> Mail to Platform Support.

              I look forward to your reply and further assisting.
              Alex G.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by halgo_boulder, 04-20-2024, 08:44 AM
              2 responses
              21 views
              0 likes
              Last Post halgo_boulder  
              Started by mishhh, 05-25-2010, 08:54 AM
              19 responses
              6,189 views
              0 likes
              Last Post rene69851  
              Started by gwenael, Today, 09:29 AM
              0 responses
              5 views
              0 likes
              Last Post gwenael
              by gwenael
               
              Started by Karado58, 11-26-2012, 02:57 PM
              8 responses
              14,830 views
              0 likes
              Last Post Option Whisperer  
              Started by Option Whisperer, Today, 09:05 AM
              0 responses
              2 views
              0 likes
              Last Post Option Whisperer  
              Working...
              X