• 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

Strategy accessing orders created manually

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

    Strategy accessing orders created manually

    Is it possible for an umanaged Strategy to do any of the following:

    1) view the Orders created manually?

    2) manipulate (such as delete) the Orders created manually?


    #2
    Hello NinjaCustomer,
    Thanks for your post.

    NinjaScript Strategies are not able to see trades that are placed manually or from another instance of a strategy. You could have a strategy use AdoptAccountPosition as a Start Behavior to have the strategy begin managing from the current Account position.

    More on AdoptAccountPosition here: https://ninjatrader.com/support/help...ccountPosition

    It would also be possible to accomplish something like this by using the Addon framework to watch for account events like an order fill, and then execute other logic. I believe this will be easier than trying to work around the framework of what an automated strategy is supposed to be. This help guide page has a great example of listening for account updates.

    https://ninjatrader.com/support/help...ount_class.htm

    Perhaps simply watching the Account.Orders collection for orders that do not have specific order names that you have set would be a good way to determine if an order is manually generated.
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      is it possible to communicate between addons and strategies using static variables?

      Comment


        #4
        NinjaCustomer,

        That would be possible with a public static variable. Please see the following forum post for a sample on how to accomplish this with partial classes

        https://ninjatrader.com/support/foru...ument-backtest
        Josh G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ttodua, Today, 01:12 AM
        2 responses
        18 views
        0 likes
        Last Post ttodua
        by ttodua
         
        Started by kujista, Today, 02:57 PM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by henord, Today, 02:40 PM
        6 responses
        26 views
        0 likes
        Last Post NinjaTrader_RyanS  
        Started by Johnny Santiago, Today, 01:57 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_RyanS  
        Started by Bigbear57, Today, 01:37 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_RyanS  
        Working...
        X