• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

The problem with placing limit orders at a certain price

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

    The problem with placing limit orders at a certain price

    Good day, help please, I try to put in strategy limit order at the price of Upper/Lower lines of Bollinger when CalculateOnBarClose = false; in this way EnterLongLimit(DefaultQuantity, Bollinger(numStdDev, period).Upper[0], ""); but the program exposes them randomly where it wants to, what am I doing wrong???

    #2
    Hello Papercut110,

    A Limit order will fill at the specified price or better.
    http://www.investopedia.com/terms/l/limitorder.asp

    EnterLongLimit() will place a buy limit order which must be placed below the ask price. If placed above the ask price, the order will fill at the current ask price.

    May I confirm that you have a condition that ensures the value you are using for the limit price is below the current ask price?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      NinjaTrader_ChelseaB, I have no such conditions, if I understand you correctly.
      I would be eternally grateful if you give an example of such conditions

      Comment


        #4
        Hello Papercut110,

        A if statement checking that a price is less than a current bid may look like this,

        Code:
        	if(myLimitPriceVar-2*TickSize < GetCurrentBid())
        	{
        					
        	}
        Where myLimitPriceVar is your price variable you are passing to your enter long method. I subtract 2 ticks from the price variable to be certain it is off the market.

        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          NinjaTrader_AlanP, thanks, I'll try

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by rainbow47, Today, 06:10 AM
          0 responses
          3 views
          0 likes
          Last Post rainbow47  
          Started by stenberg98, Today, 04:53 AM
          2 responses
          7 views
          0 likes
          Last Post NinjaTrader_Marco  
          Started by wukefuha, Today, 03:20 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Marco  
          Started by mbcmbc, Yesterday, 10:12 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_ChrisSch  
          Started by fx.practic, Today, 03:44 AM
          1 response
          14 views
          0 likes
          Last Post NinjaTrader_Marco  
          Working...
          X