• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to identify the ATM Strategy

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

  • 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 Kelsoner, Yesterday, 11:31 AM
1 response
4 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by GeoOrtiz, 02-21-2020, 03:44 PM
1 response
10 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by KeenEdge, Today, 04:08 PM
0 responses
3 views
0 likes
Last Post KeenEdge  
Started by aipjcnow, Yesterday, 12:56 PM
2 responses
11 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by Nice-Spread, Yesterday, 02:02 AM
2 responses
14 views
0 likes
Last Post Nice-Spread  
Working...
X