Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Signal Names in Orders

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

    Signal Names in Orders

    I discovered today that NinjaTrader silently ignores orders that reference an invalid signal name when the order is placed from a strategy. And while after carefully rereading the documentation I realize the error was mine, I question the logic of the position of signal names in Order syntax (why REQUIRE a fromEntrySignal in order to attach a signal to an exit order??).

    The use case: the strategy opened a position, with a signal name (e.g. Open Long), then added to the position with a signal name (e.g., Add Long). So far so good. But when the strategy decided to exit the position, I used a single signal name parameter (Exit Long) to exit the entire position (ExitLongMIT(price, "EXIT LONG"), thinking the string parameter was "signal name". HOWEVER the string parameter is "fromEntrySignal", and since "EXIT LONG" was not an entry signal, the order was not placed, but nor was it logged (in either the Log tab or the log files).

    After re-reading the documentation, I see that in order to use a Signal Name for an ExitLongMIT (or other Exits), you must first provide a "fromEntrySignal". But if the position comprises multiple entry orders, it appears two exit orders would have to be submitted in order to get a signal name on a chart. This seems bizarre, and could be avoided if the order of parameters were reversed (if only one string is provided, it is the signal name; if two strings are provided the second is the fromEntrySignal. This would arguably also better match the syntax of Openxxx orders which take a signal name parameter.

    While I acknowledge changing the syntax may not be feasible (it would be an operation breaking action, though code would still execute), I think that if an order is ignored due to an invalid fromEntrySignal, then at minimum that should be logged somewhere.
    Jack

    #2
    Hello TurtleBeach,

    Any orders that are ignored will appear in the Output window with an explanation of why they were ignored, when TraceOrders = true; is enabled.

    This is also true with NinjaTrader 7.

    It is not required to submit a signal name with any order.

    It is not required to use a fromEntrySignal when providing a signalName to exit order.

    You can use string.Empty in place of any string that you do not want to use.
    For example:
    ExitLongMIT(Low[0] - 5 * TickSize, "MIT Exit Order", string.Empty)
    ExitLongMIT(double stopPrice, string signalName, string fromEntrySignal)

    Anytime an overload is used that does not have the fromEntrySignal, or the fromEntrySignal is an empty string, the exit order will apply to all entry orders and will not be attached to a specific entry. Using string.Empty will not cause the order to be ignored.

    Attached is an example.

    If a fromEntrySignal is supplied and this does not match any working order, the order will be ignored.
    Attached Files
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Chelsea,

      A belated thanks. However, it seems that the detail you provided (and much other detail) ought to be in the documentation. I have been working with NT8 only since December 2015, but as best I can tell there has been no update to the documentation - so users waste time searching a less then well-organized set of forum posts for sometimes trivial questions, and you and your colleagues waste time responding to multiple posts of similar nature that could and should be answered in the documentation. One knowledgeable person, locked in a room for one week, could make substantial progress. On a related point, why can't your documentation tool automatically create a pdf file for download?
      Cheers,

      Comment


        #4
        Hello TurtleBeach,

        The behavior and the documentation for signal names has not changed from NinjaTrader 7 to NinjaTrader 8.

        I am happy to put in a feature request to change the language of the help guide.
        I will suggest the language for fromEntrySignal to be "The entry signal name. This ties the exit to the entry and exits the position quantity represented by the actual entry. Use string.Empty to attach to all entries."
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by fernandobr, Today, 09:11 AM
        0 responses
        0 views
        0 likes
        Last Post fernandobr  
        Started by itrader46, Today, 09:04 AM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by timmbbo, Today, 08:59 AM
        0 responses
        2 views
        0 likes
        Last Post timmbbo
        by timmbbo
         
        Started by bmartz, 03-12-2024, 06:12 AM
        5 responses
        33 views
        0 likes
        Last Post NinjaTrader_Zachary  
        Started by Aviram Y, Today, 05:29 AM
        4 responses
        14 views
        0 likes
        Last Post Aviram Y  
        Working...
        X