Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Limit Order Exits not working

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

    Limit Order Exits not working

    I'm attaching some screen shots to further explain my question. I have a very simple scalping strategy that I am testing. I use a short moving avg of the bar highs and a separate short ma of the bar lows. Depending on any trend in the market, I am trying to enter a limit order sell at the high avg, and exit that trade with a limit buy at the low avg. Vice versa for the opposite situation. My problem is the system gets me into a trade, but never exits unless my separate stop is hit. Even when the price drops below the low avg on the chart, the limit order is never issued. I looked on the log and did see an error message, (included in the screen shots) but I'm not sure what it means, and I was trying to exit an order not enter one so I'm not even sure if it applies to this situation. Any advice on correcting my problem will be greatly appreciated.
    DaveN
    Attached Files

    #2
    If you are backtesting you can only enter positions at the end of the signal bar which coincides with the opening of the next bar. If you are in realtime please make sure you are running in CalculateOnBarClose = false if you want your things to execute within the bar.

    Your ExitShortLimit() order is likely hitting the Internal Order Handling Rules. Please see the Help Guide article for Internal Order Handling Rules because according to your last screenshot you are running into them.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      it is normal you see those entries/exit when backtesting, in realtime and if you chose signal at close = false, you dont see that entry. Also choose close at the end = false, it will not exit like that as well.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      72 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      39 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X