Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Access to ATM OnPositionUpdate events within strategy

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

    Access to ATM OnPositionUpdate events within strategy

    Working a strategy that creates ATM orders while in real-time mode.

    It is desirable to be able to access the callback events for things like OnPositionUpdate, OnOrderUpdate, etc to manage the logic and do some error handling.

    Normally these are not called back from an ATM execution, only from a normal managed order execution.
    https://ninjatrader.com/support/help...rderupdate.htm
    states:
    "You will NOT receive position updates for manually placed orders, or orders managed by other strategies (including any ATM strategies) in OnPositionUpdate(). The Account class contains a pre-built event handler (PositionUpdate) which can be used to filter position updates on a specified account."


    It seems like these types of events are available for the entire account via PositionUpdate within the addon functionality?
    https://ninjatrader.com/support/help...tionupdate.htm

    Is there a way to access this within the strategy?
    (I'm struggling especially with the other required code to manage the addon tab, maybe an example would be enough to get me there
    "// Other required NTTabPage members left out for demonstration purposes. Be sure to add them in your own code." )

    Thanks,
    John

    #2
    Welcome to the forums MKV17!

    Your understanding is correct. ATM strategies are started as separate strategies and would not be accessible in the NinjaScript strategy's OnPositionUpdate event method. You could use the AddOn Framework PositionUpdate event to get account level PositionUpdate events, and this would reflect the actual position updates that are happening on the account. This reflects the entire account however, and would not be specific for an ATM strategy.

    When monitoring and manipulating an ATM strategy through a NinjaScript strategy, the ATM Strategy methods should be used.

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

    If you are looking to wire in OnPositionUpdate events or similar, the ATM strategy would be better implemented directly in a NinjaScript strategy as opposed to being initiated through the ATM Strategy methods.

    Please let us know if you have any questions.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Grantx, 01-25-2017, 07:15 AM
    4 responses
    881 views
    0 likes
    Last Post Adfra
    by Adfra
     
    Started by mv075sn, Today, 03:42 PM
    2 responses
    15 views
    0 likes
    Last Post mv075sn
    by mv075sn
     
    Started by vantojo, Today, 03:06 PM
    4 responses
    14 views
    0 likes
    Last Post vantojo
    by vantojo
     
    Started by Amore44, Today, 01:34 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Anthony_0709, Today, 01:48 PM
    1 response
    18 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Working...
    X