Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Direction dependent Limit Order

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

    Direction dependent Limit Order

    Hello traders,

    I have a question about filling orders. In some cases when a position is taken the market turns on you before hitting the first (small) target and never comes back (false move). You end up losing all your positions against your StopLoss price. Creating a very tight StopLoss protects you against big losses, but will often stop you out too early in a potential good trade.

    Question: Would it be possible to make a Limit order that looks at the direction it is appoached?

    Example for long order:
    1. Go long conditions are met
    2. Submit Limit order few Ticks below the market
    3. Market goes down below the Limit price
    4. Limit order does not get filled yet!

    Scenario 1:
    5. Market turns up before hitting the StopLoss
    6. Go long conditions are still met
    7. Market hits Limit price and order gets filled
    8. Market keeps on rising making a good trade!

    Scenario 2:
    5. Market does not turn up
    6. Go long conditions are no longer met
    7. Limit order will be cancelled
    8. It was a false move but no money lost!

    To my knowledge there is no standard order type with that behavior. Are there any suggestions for some code that simulates this behavior? It should work with 'calculate on bar close' too!

    Thanks,

    Ducman

    #2
    Hello Ducman_nl,

    Welcome to the NinjaTrader forums!

    Unfortunately I'm not familar with an order type that does exactly this or how you might simulate with code. If you can identify the conditions objectively, then you should be able to submit a market order at the appropriate time.

    You may consider looking into stoplimit orders and simulated stop orders. Stoplimit orders can be used to specify a limit price that is better than the stop price. These orders are not supported by exchanges but can be simulated by NinjaTrader. Simulated stop orders allow you to specify a real time bid /ask volume threshold that must be satisfied before the order is submitted. See the link below for more information on simulated stops.

    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the quick reply,

      I briefly looked into simulated orders but I see quite some risks mentioned that are attached to this when in a quick moving market or in case the internet connection is lost. Missing an entry is not so bad but when there is the risk of being in the market without a stoploss order submitted is not so great. I will look into simulated orders more deeply to make a good judgement.

      Ducman

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      567 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      330 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      548 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      548 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X