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

Order cancellation

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

    Order cancellation

    Hi NT experts,

    Assume the following: I have a target and stop loss orders submitted after entry fill. And neither the target nor the stop loss is hit yet.

    Then I exit my position with market order. Will NT internal logic cancel the target and stop loss orders associated with the position after position close?

    If I also do CancelOrder after position close, will it cause conflict with NT's internal logic?

    Regards,

    #2
    binwang2, which methods are you using? Exit's or Set's?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      I use Exit such as ExitLong();

      Comment


        #4
        binwang2, thanks - so how do you place your exits? If you placed them with the Set() methods, those would be cancelled as the associated position would be close, Exit methods such as for example ExitLongLimit you would need to cancelOrder() as needed.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Thanks Bertrand.
          I have a question on teh set() method.

          But i would like to change stoploss or target price dynamically. The online help guide indicates the price value has to be reset for Set() method. Suppose it is not reset but the position is closed and the strategy is stopped and restarted. Will the stoploss/target price be reset automatically by restating the startegy?

          Regards,

          Comment


            #6
            It would be 'initialized' then as it cycles through the historical OnBarUpdate() portion, best would be resetting to a default value when there's no strategy position (as also done in our sample below) -

            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by samish18, Yesterday, 08:31 AM
            4 responses
            14 views
            0 likes
            Last Post elirion
            by elirion
             
            Started by funk10101, Yesterday, 09:43 PM
            1 response
            13 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by TheWhiteDragon, 01-21-2019, 12:44 PM
            5 responses
            551 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by rtwave, 04-12-2024, 09:30 AM
            5 responses
            37 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by funk10101, Today, 12:02 AM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Working...
            X