Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is there a way to restrict an execution?

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

    Is there a way to restrict an execution?

    Is there a way to code an "indicator"/strategy that would restrict you from executing a trade?

    Example:
    1. I draw 3 lines/rectangle/ranges in the morning where I should place trades based on my plan
    2. A script runs that disallows me to trade outside of these predefined areas?

    #2
    Hi Jacob, thanks for posting. There is no supported way to block trading or blocking orders from going through.

    Comment


      #3
      jacobvanags As NinjaTrader_ChrisL says, there is no way to "block" trades/orders. However, you could try to "prematurely terminate" orders prior to their submission to the broker. This would require a Strategy that used OnOrderUpdate to validate that orders are within your pre-defined areas. It is essential to know the lifecycle of an Order (the progression though the OrderState Values): https://ninjatrader.com/support/help.../nt8/order.htm

      Knowing that, you could respond to the updates to Orders in OnOrderUpdate by checking against your designated trading zones and if the Order fails, you could Cancel it before it is submitted. This would require good coding to ensure you know the trading zones, the Order "location" in relation to those zones, and the OrderState, so that you "trap" Orders that are "invalid" as soon as possible in the Order lifecycle. You have until OrderState.Filled (or OrderState.PartFilled) to achieve that, in theory, but you would want to Cancel at, or as soon after OrderState.Initialized as possible.

      No guarantees here as timing is crucial, but it might work for you.

      Thanks.
      Multi-Dimensional Managed Trading
      jeronymite
      NinjaTrader Ecosystem Vendor - Mizpah Software

      Comment


        #4
        Gotcha, okay thanks.

        I assume there would be a way to write a script that could, say, alert when prices is X% near a drawing (i.e. a line or drawn area) or price level?

        And conversely, would it be possible to warn a trader when price is NOT near the drawing or price level (outside of X%)?

        And finally, AFTER an entry or exit is executed... would a script be able to auto-notate text on the chart?

        ---

        I'm not looking for specific how-tos... just curious on if something like this could be possible with an experienced NT8 script writer.

        Thanks!

        Comment


          #5
          jacobvanags All those things seem like they would be doable.

          Thanks.
          Multi-Dimensional Managed Trading
          jeronymite
          NinjaTrader Ecosystem Vendor - Mizpah Software

          Comment


            #6
            Okay, awesome. Thanks for your repsonses!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Today, 05:17 AM
            0 responses
            44 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            124 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            65 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            42 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            46 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X