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

Changing signalName

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

    Changing signalName

    Hi,

    I cannot find an answer to this in the forum. In the documentation, most if not all of the managed order methods define signalName as "User defined signal name identifying the order generated. Max 50 characters". However, for SubmitOrderUnmanaged it states "A string representing the name of the order. Max 50 characters.".

    I use the unmanaged approach. In this case is 'signalName' still user-defined? I would like to change the signal name of the order once I get the order object back in OnOrderUpdate or OnExecutionUpdate. Can this be done, or does the NT engine use this value such that changing it might cause issues in the engine? Specifically, I am wanting to change the signalName before calling the ChangeOrder method, so I can track that I have changed the order.

    Thanks,

    #2
    Hello ChazJ,

    The signalName for order is actually supplied as a string and specified by the developer and is not specified by the user, unless the developer makes a separate string input and supplies this input as the parameter to the order. This is the same thing for managed or unmanaged orders.

    Yes, the signalName supplied for SubmitOrderUnmanaged will be the Name of the order in OnOrderUpdate/OnExecutionUpdate().

    Below is a link to examples that set the signalName in both managed and unmanaged approaches.


    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,

      My question was whether I can change the signalName after the order has been created. Before submitting a call to the 'ChangeOrder' method, I want to change the signalName. Is that OK, or will that cause a problem in the NT engine? (See example below)

      private Order MyOrderObject;
      ...


      protected override void OnBarUpdate()
      {
      {
      ...
      if (entrysignal)
      {
      MyOrderObject = SubmitOrderUnmanaged(0, OrderAction.Buy, OrderType.Limit, 1, 1000, 0, "", "MySignalName");
      }
      ...
      if (MyOrderObject.State != OrderState.Filled)
      {
      MyOrderObject.Name = "NewSignalName"; // <== Will this cause a problem inside NT? Will the new signal name be maintained through the remainder of the object's life i.e., is there any chance NT may change it back to the original from an internally stored copy, perhaps?
      ChangeOrder(MyOrderObject, MyOrderObject.Quantity + 1, 1000, 0);
      }
      ...
      }
      ...
      }

      Thanks,

      Comment


        #4
        Hello ChazJ,

        No, the signalName for an order cannot be changed and this would cause internal issues.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Dang! That is unfortunate!

          So I guess the only way for me to accomplish what I am looking for is to cancel the pending order and submit a new one. I was trying to avoid that as it just causes order churning at the exchange, plus the additional order management.

          Thanks for your help.

          Comment


            #6
            Hello ChazJ,

            Yes, the order would need to be cancelled and re-submitted.

            Why do you need the name of an order, which identifies that order, to change?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              When I open a position, I always place a disaster stop loss order with it. It has a signalName identifying it as a stop loss order. When I close out my position at any other time than a disaster stop, I just change the stop price of my stop loss order. When it executes the name is shown on the chart, and it appears as a disaster stop, rather than a profit taking or other position close. The name also appears in performance data and debug logs I write out. I would like to differentiate a closing order that is due to profit taking as opposed to a disaster stop loss.

              It would be nice if the 'ChangeOrder' method supported an additional parameter to change the signalName along with quantity, limit price and stop price.

              Comment


                #8
                Hello ChazJ,

                I will submit a feature request on your behalf for the development team to consider allowing signal names to be changed.

                Once I have a tracking ID for this request I will post in this thread for future reference.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Thank you!

                  Comment


                    #10
                    Hello ChazJ,

                    I have received tracking ID# SFT-3441 for this request to change the signal name of an order.

                    As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted in the Release Notes page of the Help Guide.

                    Release Notes — https://ninjatrader.com/support/help...ease_notes.htm


                    Chelsea B.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by DJ888, 04-16-2024, 06:09 PM
                    6 responses
                    18 views
                    0 likes
                    Last Post DJ888
                    by DJ888
                     
                    Started by Jon17, Today, 04:33 PM
                    0 responses
                    1 view
                    0 likes
                    Last Post Jon17
                    by Jon17
                     
                    Started by Javierw.ok, Today, 04:12 PM
                    0 responses
                    6 views
                    0 likes
                    Last Post Javierw.ok  
                    Started by timmbbo, Today, 08:59 AM
                    2 responses
                    10 views
                    0 likes
                    Last Post bltdavid  
                    Started by alifarahani, Today, 09:40 AM
                    6 responses
                    41 views
                    0 likes
                    Last Post alifarahani  
                    Working...
                    X