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

How to identify the ATM Strategy

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

  • luxurious_04
    replied
    Originally posted by MarceloF View Post
    Hi Jesse

    Jesse I got it ... it was very difficult but I got it ... it was by the Globals.AllWindows ... regards and see you soon THANKS
    Hello MarceloF I would like to know how did you get the strategy template in the Order Tab. Kindly share it please.

    Leave a comment:


  • MarceloF
    replied
    Hi Jesse

    Jesse I got it ... it was very difficult but I got it ... it was by the Globals.AllWindows ... regards and see you soon THANKS

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello MarceloF,

    While you likely can access the grid in undocumented ways I would have no suggestion on how to try and access the single rows of the grid in a way which would also allow access to the end result displayed data. In general, this is not a good approach at accessing data due to having to use dispatchers to invoke code on the UI thread. You are free to try it out though and see if you can access the information you wanted with the grid in some way. Once I have the tracking ID for the feature request I will provide that here as well.



    I look forward to being of further assistance.

    Leave a comment:


  • MarceloF
    replied
    thanks Jesse
    Another way is if we have accese to "Orders Tab", if we can do that.. i can find the orders Ids and cross the informations.. is possible??
    Attached Files

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello MarceloF,

    After speaking with development further I will need to put in a feature request as this information is not already exposed for NinjaScript access.

    It is currently not possible to access the template name historically, this is also not an item that is associated directly with an Order object. Looping over the orders will not contain this information but it is possible to loop over the strategies collection to locate active atm strategies that contain the same order. This is cleared once the orders fill which makes that not valid to continually locate the name based on an order. There would be no specific suggestion at this time for a way to access this, once I have the tracking ID for this request I will provide that here.

    Please let me know if I may be of additional assistance.

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello MarceloF,

    Thank you for the reply.

    As noted because this is a manual order, I will need to do further research on this topic. At this time I do not have a specific suggestion but once I have more information on this I will reply back with that information.

    I look forward to being of further assistance.

    Leave a comment:


  • MarceloF
    replied
    Do you have any tips on where I think I find this information?
    thanks

    Leave a comment:


  • MarceloF
    replied
    Hi Jesse thanks for the answer

    manual orders... from SuperDOm

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello MarceloF,

    Thank you for the reply.

    I understand you want the name of the strategy, but I would still need to know what scope you are submitting these orders. Are these manual orders or is the indicator submitting the order?

    For manual orders or orders that did not originate from this script, I would need to further research this to see if there is an exposed property or method to access the template name. Currently, I can't see any object in the Order object which would represent the template name.

    For orders that originated from this script, you should instead be tracking the template name in your logic based on the order's name, orders object or other logic you choose.

    I look forward to being of further assistance.

    Leave a comment:


  • MarceloF
    replied
    Hello great Jesse
    What I just would like to know which ATM is being used in each order executed (Entry) along the code in an indicator. I already have access to the orders this way:

    lock (myAccount.Orders)
    foreach (Order orderAux in myAccount.Orders)
    {

    }


    I do not want to send order or know ATM status.
    I just want to know the name of the ATM that is being used at the instant of opening a position, the name as shown in the table atached.

    Thanks
    Attached Files

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello MarceloF,

    Thank you for the post.

    Can you provide more context on how these orders have been generated?

    For ATM strategies and NinjaScript, there are specific ways to submit orders which would also entail that you already have the name of the associated template when you submit the order.

    Are you manually submitting an ATM strategy order and later trying to retrieve it? The GetOwnerStrategy() is not a documented item so I would be unable to provide any further detail on what you are trying in this example.

    I look forward to being of further assistance.

    Leave a comment:


  • MarceloF
    started a topic How to identify the ATM Strategy

    How to identify the ATM Strategy

    Hi masters

    I have the orders and now i need to know what ATM Strategy name is used each order.
    For sample, I tried to code this way:

    var teste = order.GetOwnerStrategy();
    string ATMName = teste.Name; // doesnt work

    error message: Error on calling 'OnStateChange' method: Object reference not set to an instance of an object.

    Thnaks

Latest Posts

Collapse

Topics Statistics Last Post
Started by rocketman7, Today, 09:41 AM
4 responses
15 views
0 likes
Last Post rocketman7  
Started by selu72, Today, 02:01 PM
1 response
9 views
0 likes
Last Post NinjaTrader_Zachary  
Started by WHICKED, Today, 02:02 PM
2 responses
12 views
0 likes
Last Post WHICKED
by WHICKED
 
Started by f.saeidi, Today, 12:14 PM
8 responses
21 views
0 likes
Last Post f.saeidi  
Started by Mikey_, 03-23-2024, 05:59 PM
3 responses
53 views
0 likes
Last Post Sam2515
by Sam2515
 
Working...
X