Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Updating account position when restarting a closed strategy

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

    Updating account position when restarting a closed strategy

    Greetings all. I am looking for the best way to deal with a closed strategy (for example maintenance, dropped connection, or other dropping from the server) and restart to replicate as if restarting from same position (the current account net position for a specific instrument and the unrealized PnL for that position).

    I understand that per default the automatic sync can only work to update the account position as dictated by the strategy position, and that the strategy could not adopt the real world account position. I am looking for the best way to work around that as my strategy is always long or short and exits at the end of the week. It seems to me the best way is to manually update it into the history when restart the strategy.

    Can anyone give me their input on how to deal with this? How would I programmatically enter on a historical bar the needed qty currently present in your account so the strategy would manage this strategy position then when restarted which would then be in sync to my account? Thanks. ~ Jeremiah

    #2
    Hello,

    Thank you for the question,

    You do have some options on syncing the account position in NinjaTrader,
    This is a video that outlines the different built in options for syncing that you can use.

    Download NinjaTrader FREE at http://www.ninjatrader.comThis video demonstrates the differences between Strategy positions and Account positions and how to sy...


    I do not believe there is a supported method for programmatically entering on a historical bar. however there is an unsupported method on querying the account position, I would not be able to assist you in using this but the information is there if you choose to use it.

    Support for the development of custom automated trading strategies using NinjaScript.


    We also have this document which outlines the difference between strategy position and account position if you have not read it yet:


    Please let me know if I may be of additional assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Barry Milan, Today, 10:35 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by WeyldFalcon, 12-10-2020, 06:48 PM
    14 responses
    1,428 views
    0 likes
    Last Post Handclap0241  
    Started by DJ888, Yesterday, 06:09 PM
    2 responses
    9 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by jeronymite, 04-12-2024, 04:26 PM
    3 responses
    40 views
    0 likes
    Last Post jeronymite  
    Started by bill2023, Today, 08:51 AM
    2 responses
    16 views
    0 likes
    Last Post bill2023  
    Working...
    X