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

GetOwnerStrategy()

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

    GetOwnerStrategy()

    In an indicator, I'm showing a visual on the Chart Panel related to working orders. But it should only happen when a working order is associated with an Atm Strategy. To identify this I'm using the following logic:

    if(order.GetOwnerStrategy() != null)
    if(order.GetOwnerStrategy().Name != null)
    if(order.GetOwnerStrategy().Name=="AtmStrategy")
    // do stuff

    Is the GetOwnerStrategy() method the best way to find out if an order is associated with an Atm Strategy? If so, are there other default NT values that this method might return instead of "AtmStrategy"?

    Thanks.

    #2
    Hello martyn73,

    Thanks for your post.

    GetOwnerStrategy() is not documented and behavior may be subject to change, but it appears that you can use the method as you have described. Through testing, this will return the name of a NinjaScript strategy if the order belongs to a NinjaScript strategy. Manual orders which do not have an owning strategy will not have a print here.

    You should be able to move forward using this method, but as a reminder, please be sure to check the functionality with new updates as this method is not locked into documentation.

    Please let us know if we can be of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thanks, that helps.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by alifarahani, Today, 09:40 AM
      6 responses
      36 views
      0 likes
      Last Post alifarahani  
      Started by Waxavi, Today, 02:10 AM
      1 response
      17 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by Kaledus, Today, 01:29 PM
      5 responses
      14 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by Waxavi, Today, 02:00 AM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by gentlebenthebear, Today, 01:30 AM
      3 responses
      17 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X