Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adopt a manually entered Position in a strategy

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

    Adopt a manually entered Position in a strategy

    Is there a way to adopt a manually entered position in a strategy? So that I can programmatically close it? If so is there an example anywhere?

    #2
    Hello dmisselhorn,

    Thank you for your post.

    The order methods used in strategies only manage the strategy position. With that said, you could use the AddOn-style approach, even within a strategy or indicator script, and utilize the Account class to detect and manage manual orders and positions:


    You can subscribe to Order, Execution, and Position updates for the desired account and then use methods such as CreateOrder(), Submit(), Change(), and Cancel() to manage even a manually entered position from within a strategy script without interfering with the Strategy position and how it is calculated. Here are the links to the event methods, and the order management methods available to the Account class are also listed in the methods and properties at the link above:There is an example that utilizes the Account class on this page at the link "AddOn Framework NinjaScript Basic"


    Please let us know if we may be of further assistance.

    Comment


      #3
      I guessing I could do something similar in a strategy as well. Correct?

      Comment


        #4
        Originally posted by dmisselhorn View Post
        I guessing I could do something similar in a strategy as well. Correct?
        Yes, as I mentioned, "With that said, you could use the AddOn-style approach, even within a strategy or indicator script, and utilize the Account class to detect and manage manual orders and positions"

        Please feel free to reach out with any additional questions or concerns.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        43 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        21 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        30 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        50 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        40 views
        0 likes
        Last Post CarlTrading  
        Working...
        X