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

change of signal name triggers new order

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

    change of signal name triggers new order

    entryOrder = EnterLong(0, positionSize * 2, "signal1");

    entryOrder = EnterLong(0, positionSize * 2, "signal2");


    i have noticed that if i change the signal name, it creates a second order. how can i prevent the order duplicatioen and still be able to change signal names.

    #2
    Hello,

    Check your market position first. This link will help:
    DenNinjaTrader Customer Service

    Comment


      #3
      ok. you are not answering the core question. let me restate the quetion in a different way.
      i run this on barupdate to keep a trailing stop. i dont use the builtin trailing stop method because i have multiple exit conditions n my code.

      exitOrder = ExitLongStop(0, true, trailstopVolume, currentStop, "TRAIL_STOP", entryOrder.FromEntrySignal);

      based on certain conditions, i may decide to exit out immediately. i have to change the signalname so i know which condition caused the exit.


      exitOrder = ExitLong(0, true, trailstopVolume,"immediate_exit", entryOrder.FromEntrySignal);

      this would result in a duplicate order that i cannot manage. how do i avoid the duplicate order resulting out of a signal name.

      Comment


        #4
        You cannot change signal names. Changing signal names means a new order. You will need to first cancel your original and then submit your new.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          and obviously i cannot cancel because cancellation will result in new orders not getting accepted.
          what a nightmare.

          Comment


            #6
            Not following your reasoning why cancelling an order will cause new orders to not be accepted.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              based on your earlier response to this thread,

              Comment


                #8
                That should not hold true from going from a stop order to a market order.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  pl clarify with more detail. what can be cancelled and what cannot be

                  Comment


                    #10
                    Everything can be cancelled. Submitting market orders (as you have eluded to wanting in this thread) afterwards should work. Submitting the same exact order as you had before with just a changed name may not.
                    Josh P.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by ESHunter, Today, 08:06 PM
                    2 responses
                    10 views
                    0 likes
                    Last Post ESHunter  
                    Started by ETFVoyageur, 05-07-2024, 07:05 PM
                    19 responses
                    149 views
                    0 likes
                    Last Post ETFVoyageur  
                    Started by ETFVoyageur, Yesterday, 10:13 PM
                    3 responses
                    26 views
                    0 likes
                    Last Post ETFVoyageur  
                    Started by ETFVoyageur, Yesterday, 12:52 AM
                    3 responses
                    33 views
                    0 likes
                    Last Post ETFVoyageur  
                    Started by ETFVoyageur, Today, 02:10 AM
                    2 responses
                    27 views
                    0 likes
                    Last Post ETFVoyageur  
                    Working...
                    X