Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Export list of executions with code

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

    Export list of executions with code

    Hello, I need to export the list of executions (all of them that appears when I check the tab "Executions") automaticly with code, not manually. How can I do it? Thanks in advance and regards.

    #2
    Hello soyjesus,

    Thanks for your post.

    You would need to implement a StreamWriter into your script to write information, such as executions in OnExecutionUpdate(), to a file.

    See this reference sample demonstrating the use of a StreamWriter: https://ninjatrader.com/support/help...b=streamwriter

    OnExecutionUpdate(): https://ninjatrader.com/support/help...tionupdate.htm
    Execution: https://ninjatrader.com/support/help.../execution.htm
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Ok Brandon, but I need to export all the executions (manually and by strategies). I can use StreamWriter with my strategies but what about the executions from ATM or directly in the chart?

      Comment


        #4
        Hello soyjesus,

        Thanks for your notes.

        NinjaScript strategies cannot see orders placed manually on the chart and cannot see ATM Strategies submitted from Chart Trader.

        Something you could consider trying is subscribing to Account ExecutionUpdate events and using a StreamWriter to write the execution information to a file.

        Account: https://ninjatrader.com/support/help...ount_class.htm
        OnExecution: https://ninjatrader.com/support/help...tionupdate.htm
        Executions: https://ninjatrader.com/support/help...executions.htm

        Otherwise, manually submitted orders and ATM Strategy orders would have to be manually exported by right-clicking on the Executions tab of the Control Center and selecting 'Export'.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment


          #5
          Sorry, but is there any file where Ninjatrader save all the executions? I could read this file with an external software and check it.

          Comment


            #6
            Hello soyjesus,

            Thanks for your notes.

            There are no files that could be accessed through supported NinjaScript code that saves executions that were made.

            As previously noted, NinjaScript strategies cannot see orders placed manually on the chart and cannot see ATM Strategies submitted from Chart Trader.

            Manually submitted orders and ATM Strategy orders would have to be manually exported by right-clicking on the Executions tab of the Control Center and selecting 'Export'.
            <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            88 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            134 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            68 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by cmoran13, 04-16-2026, 01:02 PM
            0 responses
            118 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            67 views
            0 likes
            Last Post PaulMohn  
            Working...
            X