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 algospoke, Yesterday, 06:40 PM
            2 responses
            22 views
            0 likes
            Last Post algospoke  
            Started by ghoul, Today, 06:02 PM
            3 responses
            14 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by jeronymite, 04-12-2024, 04:26 PM
            3 responses
            45 views
            0 likes
            Last Post jeronymite  
            Started by Barry Milan, Yesterday, 10:35 PM
            7 responses
            21 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by AttiM, 02-14-2024, 05:20 PM
            10 responses
            181 views
            0 likes
            Last Post jeronymite  
            Working...
            X