Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Language, names of orders change by language

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

  • NinjaTrader_BrandonH
    replied
    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

    Leave a comment:


  • ervin
    replied
    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.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    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.

    Leave a comment:


  • ervin
    replied
    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:	108
Size:	12.9 KB
ID:	1266077

    Leave a comment:


  • NinjaTrader_BrandonH
    replied
    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.

    Leave a comment:


  • ervin
    started a topic Language, names of orders change by language

    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.

Latest Posts

Collapse

Topics Statistics Last Post
Started by michelz, 02-18-2025, 08:30 AM
18 responses
370 views
0 likes
Last Post neveral0n3  
Started by laketrader, 03-10-2025, 07:20 AM
4 responses
34 views
0 likes
Last Post laketrader  
Started by owensd, 04-21-2024, 11:34 PM
19 responses
190 views
0 likes
Last Post Leeroy_Jenkins  
Started by bokorb, 03-14-2025, 02:45 PM
2 responses
26 views
0 likes
Last Post bokorb
by bokorb
 
Started by Schools, 03-14-2025, 03:32 PM
1 response
26 views
0 likes
Last Post Schools
by Schools
 
Working...
X