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 tonydavisonline, Yesterday, 08:01 AM
            1 response
            22 views
            0 likes
            Last Post tonydavisonline  
            Started by cbentrikin, Today, 05:30 AM
            1 response
            10 views
            0 likes
            Last Post cbentrikin  
            Started by slimtrading, 04-05-2024, 04:23 PM
            4 responses
            187 views
            0 likes
            Last Post Sam2515
            by Sam2515
             
            Started by bltdavid, 03-04-2023, 05:05 PM
            13 responses
            1,332 views
            0 likes
            Last Post Gerry-N
            by Gerry-N
             
            Started by stevenwilkins3, Today, 03:42 AM
            0 responses
            8 views
            0 likes
            Last Post stevenwilkins3  
            Working...
            X