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

What's the point of limit orders if...

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

    What's the point of limit orders if...

    Greetings,

    I got an error upon a "limit" order submission, it states that a "short limit order cannot be less than the current bid" or something similar to that. Isn't that the whole point of having limit orders...that is to specify a certain price where you wish the trade to enter/execute? If you cannot specify a price outside the bid/ask range then what's the point of even having limit orders??

    thanks in advance

    #2
    This is for FX, correct? If yes, this is since most FX brokers do not allow that type of order although in futures and stocks its valid.
    RayNinjaTrader Customer Service

    Comment


      #3
      Yes, it is for FX. Thus for those brokers that do not allow such an order how can I create a "work-around" so that perhaps I can submit a market order when the current price hits the desired price level?

      Comment


        #4
        Burga,

        In this case if your are submitting the order via the superDOM or chart trader you would hit the sell market or buy markey buttons. Though I see this is in the NinjaScript section and if you are submitting this via NinjaScript you would want to use the follow orders. You would need to monitor the price and then submit the below as needed.

        EnterLong() to submit a long market order:

        http://www.ninjatrader-support.com/H...EnterLong.html

        EnterShort() to submit a short market order:



        Let me know if I can be of further assistance.

        Comment


          #5
          Yes, thank you I understand that part however what is the best way to "simulate" a limit order by placing the desired entry price level into a variable and then executing the market orders when the current price meets that desired price level (as a limit order would do...)?

          Comment


            #6
            Hello,

            Just wanted to let you know we did receive your note and will respond shortly.

            Thank you for your patience.

            Comment


              #7
              Thank you, no problem...

              Comment


                #8
                Hello,

                In this case you would use

                if(Close[0] <= VariablePrice)
                {
                EnterLong();
                }

                If the current price is less then or equal to the limit price then submit the market order. Do the reverse of this for a short position.

                Let me know if I can be of further assistance.

                Comment


                  #9
                  Thank you. What would you code to set the "VariablePrice"? For example if I want it to be 15 pips from the "current" price how would you code that...

                  Comment


                    #10
                    Burga,

                    You would use:

                    VariablePrice = Close[0] + 15*TickSize;



                    Make sure to only set this when your entry conditions are true, since if this is left in OnBarUpdate it will constantly adjust your entry price based off the close on each Bar Update.


                    Let me know if I can be of further assistance.

                    Comment


                      #11
                      OK thanks for confirming that and all your help.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by techgetgame, Yesterday, 11:42 PM
                      0 responses
                      8 views
                      0 likes
                      Last Post techgetgame  
                      Started by sephichapdson, Yesterday, 11:36 PM
                      0 responses
                      2 views
                      0 likes
                      Last Post sephichapdson  
                      Started by bortz, 11-06-2023, 08:04 AM
                      47 responses
                      1,613 views
                      0 likes
                      Last Post aligator  
                      Started by jaybedreamin, Yesterday, 05:56 PM
                      0 responses
                      10 views
                      0 likes
                      Last Post jaybedreamin  
                      Started by DJ888, 04-16-2024, 06:09 PM
                      6 responses
                      20 views
                      0 likes
                      Last Post DJ888
                      by DJ888
                       
                      Working...
                      X