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

Is this really correct ?

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

    Is this really correct ?

    On this page of the Online Help, http://www.ninjatrader.com/support/h...d_approach.htm, I find the following:

    Methods that generate orders to exit a position will be ignored if:
    ...
    A position is open and an order submitted by a set method (SetStopLoss() for example) is active

    Is that really correct? I cannot abandon a postion and just say: "Get me out!" before my set Stop is hit?

    #2
    koganam,

    Do you plan on manually closing the position, or are you looking to programmatically exit/abandon the position?

    You should be able to Cancel the order programmatically so long you have the correct order ID.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Originally posted by NinjaTrader_Matthew View Post
      koganam,

      Do you plan on manually closing the position, or are you looking to programmatically exit/abandon the position?

      You should be able to Cancel the order programmatically so long you have the correct order ID.
      Matthew,

      I was talking about programatically.

      That text in the Help seems to be saying that if a SetStopLoss() generated order is active, NT will ignore an Exit() order placed susequently.

      Comment


        #4
        koganam,

        Yes, that is correct - this it to prevent any unwanted positions from opening, however you can always use the unmanaged approach to set your own order handling:



        But as I said, you can use CancelOrder() to cancel the position if a condition is true:

        MatthewNinjaTrader Product Management

        Comment


          #5
          koganam

          We've been down this road before. What Mathew is not telling you, nor does NinjaTrader make very clear, is that Advanced Order Handling also allows you to cancel orders. But the explanation are very unclear. You need to piece together a few of the Sample Strategies to see how to accomplish this. This goes back to a thread I had on Reversing Limit Orders which were ignored because of the same Order Handling Rules.

          Personally I think it's should be the trader's option and that these rules have no place overiding code. You need to setup IOrders for each entry signal, target, exit, and stop. You need to use the OnOrderUpdate for Canceling and OnExecution for monitoring the status or your orders.

          Check out SampleCancelOrder.cs and SampleOnOrderUpdate.cs for some NinjaTrader reference.

          Comment


            #6
            Internal order handling rules do not apply to market orders. You can still use ExitLong(), ExitShort() when a stop loss submitted by SetStopLoss() is active.
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by DayTradingDEMON, Today, 11:25 PM
            0 responses
            3 views
            0 likes
            Last Post DayTradingDEMON  
            Started by Day_Storay1, Today, 09:06 PM
            0 responses
            6 views
            0 likes
            Last Post Day_Storay1  
            Started by Rudmax, 07-02-2024, 05:40 AM
            59 responses
            1,056 views
            1 like
            Last Post QuantVPS  
            Started by tomtom2000, Today, 12:56 PM
            3 responses
            18 views
            0 likes
            Last Post jabowery  
            Started by stoner, 01-16-2020, 08:07 AM
            20 responses
            514 views
            0 likes
            Last Post IanS00
            by IanS00
             
            Working...
            X