Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Language, names of orders change by language

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

    Language, names of orders change by language

    Hi,
    I'm developing an strategy and in OnOrderUpdate event I ask for the name of the order to take some actions. But in one PC giveme error and I put Prints to see what is happening.
    Printing order name.
    In english,
    - Close position
    - Buy to cover
    - Sell
    In Spanish
    - Cerrar posición
    - ...
    - Vender
    And interesting thing, the state of orders are in english even for spanish language like Filled, Accepted, Working...

    Why is that? I need to ask for order name, but I don't think to put all languages because have clients with diferent languages installed. I have NT 8.
    Thank you.

    #2
    Hello ervin,

    Thanks for your post.

    You specify the SignalName (such as "LongEntry") for an order in your script when calling your Entry/Exit order methods and then in OnOrderUpdate() check if the order.Name == "LongEntry" in your script for example.

    EnterLong("LongEntry");
    ExitLong("LongExit", "LongEntry");


    EnterLong(): https://ninjatrader.com/support/help.../enterlong.htm
    ExitLong(): https://ninjatrader.com/support/help...8/exitlong.htm

    The SignalName will print to the Output window in English when printing order.Name in OnOrderUpdate() regardless of what language the platform is set to use.

    The orderState is an enum and this will also print to the Output window in English when printing orderState in OnOrderUpdate(). So you could check if order.OrderState == OrderState.Filled in OnOrderUpdate(), for example.

    See the 'Order Entry Methods' section of the help guide page linked below for more information about using SignalNames for Entry/Exit orders. See the 'How to close a position' section of the help guide page below as well for information about FromEntrySignal which is used for Exit orders.

    Managed Approach: https://ninjatrader.com/support/help...d_approach.htm
    Last edited by NinjaTrader_BrandonH; 08-24-2023, 03:02 PM.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Thank you for your ansqer Brandon.
      I use names on my entries and I controll it on OnOrderUpdate like you said. But I have a condition in OnBarUpdate when if Position is Long I code EnterShort. So, NT closes the long s and open the short with the name that I give to it.
      But when NT close the position, NT put the name in english "Close position" in Spanish "Cerrar posición". Y lo mismo pasa en los casos Buy to Cover, Sell, Exit on Session, in spanish changes the name.
      Like the image I attach.
      In OnOrderUpdate I look for the name but I realize that the NT put in spanish.

      Click image for larger version

Name:	imagen.png
Views:	111
Size:	12.9 KB
ID:	1266077

      Comment


        #4
        Hello ervin,

        This is expected that users in other countries are able to read the order names and types.

        If this is an issue, it may necessary to switch to using the unmanaged approach so that you can completely control the order signal names.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thank you,
          I want to use managed approach, but what do you sugest? how can I ask for a name of one order if the name changes in each language? I mentioned some examples, Close position, Close on en session, buy to cover, etc.

          Comment


            #6
            Hello ervin,

            Thanks for your notes.

            If NinjaTrader 8 is set to a language other than English and you call an Entry order in the opposite direction while using the Managed Approach method for handling orders, the name of the order will be in the Language that the platform is set to.

            As my colleague Chelsea stated, "If this is an issue, it may necessary to switch to using the unmanaged approach so that you can completely control the order signal names."

            See this help guide page for more information about coding a strategy using the Unmanaged Approach for placing and managing orders in a NinjaScript strategy: https://ninjatrader.com/support/help...d_approach.htm
            <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by furelaong, 06-18-2025, 11:04 PM
            0 responses
            21 views
            0 likes
            Last Post furelaong  
            Started by futurenow, 12-06-2021, 05:49 PM
            19 responses
            1,005 views
            0 likes
            Last Post Redders
            by Redders
             
            Started by mathfrick2023, 05-08-2025, 12:51 PM
            8 responses
            118 views
            0 likes
            Last Post Yogaman
            by Yogaman
             
            Started by several, 04-22-2025, 05:21 AM
            1 response
            280 views
            0 likes
            Last Post Lukasxgtx  
            Started by NTEducationTeam, 06-12-2025, 02:30 PM
            0 responses
            44 views
            0 likes
            Last Post NTEducationTeam  
            Working...
            X