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

Example of best method for recalling an executed orders trade price

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

    Example of best method for recalling an executed orders trade price

    I've used Private Series to store values (e.g. the executed trade price) but the issue i'm having is when i've closed out the strategy (e.g. shutdown NT for efficiency maintenance) and then attempt to generate a new (but the same) strategy to return to trading. the stored values are not retained (assumably due to the fact that the strategy is starting anew).

    Should i not be "removing" the strategies upon restart of the system?
    If that's the case, i feel that to be a fragile method of retention and, if so, would there be example of a more definitive way to reference the trade value of a particular execution?

    As always, thank you.

    #2
    Hi larkmail, thanks for posting. The strategy will run through the historical data every time it is restarted, so the values in the Series should be filled during the historical state. So, is the series getting filled with the proper values during the historical state?

    Kind regards,
    -ChrisL
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      It populates but i feel it's with a "fresh" (so-to-speak) historical perspective. Best description i could give is when reviewing real-time trades for the day and comparing them to the same time period within the Strategy Analyzer". They're close but not identical.

      L

      Comment


        #4
        Hi larkmail, thanks for your reply.

        If you need to save data between strategy instances it will need to be saved to the disk in the form of a .txt file, then the data can be accessed at a later time. We have an example of file IO here:


        Kind regards,
        -ChrisL
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bortz, 11-06-2023, 08:04 AM
        49 responses
        1,769 views
        0 likes
        Last Post NinjaTrader_RyanS  
        Started by Vietanhnguyen2hotmailcom, Today, 10:29 AM
        3 responses
        9 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by milfocs, Yesterday, 07:23 PM
        3 responses
        13 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by kenz987, Today, 10:20 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by PaulMohn, 04-24-2024, 03:49 AM
        2 responses
        33 views
        0 likes
        Last Post PaulMohn  
        Working...
        X