Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Automatically Record Results?

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

    Automatically Record Results?



    Hi there, is there an automated method to transpose results into a spreadsheet or database?

    It's not usual that I'm running with 500+ strategies in Simulation mode, to test variations. At the end of the trading day, I've been copying over the results into a spreadsheet. Of course, this is time consuming and subject to error. I wish there was some way to download the results out of the Control Center / Strategy tab, and then import into a spreadsheet. Or, maybe download the results into a CSV file, which I can then import.

    Do you have thoughts on the best way to automatically extract the results out of the Strategies tab? Thanks,



    #2
    Hello timmbbo,

    Thank you for your post.

    If you simply want to export the information from the strategies tab, you could right-click the tab > select Export > name the file > Save. This will allow you to export the information on the Strategies tab to an XLSX or CSV file that may be viewed in Excel.

    You could also consider adding logic to your strategy that accesses the SystemPerformance data to get different TradesPerformance values from a TradeCollection and then use StreamWriter to write that information to a text file programmatically while the strategy is enabled. Then, there may be a way to convert that text file to a CSV using an outside program. Otherwise, you could always right-click a performance window, such as Trade Performance or Strategy Performance, and then export it from there as a CSV file. Manually exporting might not be ideal in your situation depending on whether you are looking to export each strategy's information separately or export the data from all strategies at once. We have a reference sample demonstrating how to write to a text file within NinjaScript here:As for programmatically creating a CSV file, there is an indicator that writes chart data to a CSV file you could review as an exapmle. This indicator is publicly available on our NinjaTrader Ecosystem website:
    Here is a basic guideline of how to import NinjaScript add-ons in NinjaTrader 8:

    Note — To import NinjaScripts you will need the original .zip file.

    To Import:
    1. Download the NinjaScripts to your desktop, keep them in the compressed .zip file.
    2. From the Control Center window select the menu Tools > Import > NinjaScript Add-on...
    3. Select the downloaded .zip file
    4. NinjaTrader will then confirm if the import has been successful.

    Critical - Specifically for some NinjaScripts, it will prompt that you are running newer versions of @SMA, @EMA, etc. and ask if you want to replace, press 'No'

    Once installed, you may add the indicator to a chart by:
    • Right-click your chart > Indicators... > Select the Indicator from the 'Available' list on the left > Add > OK

    Here is a short video demonstration of the import process:
    Please let me know if I can be of further assistance.

    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    56 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    132 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    73 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X