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 CarlTrading, 03-31-2026, 09:41 PM
            1 response
            81 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            41 views
            0 likes
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            64 views
            2 likes
            Last Post CaptainJack  
            Started by CarlTrading, 03-30-2026, 11:51 AM
            0 responses
            66 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 03-30-2026, 11:48 AM
            0 responses
            54 views
            0 likes
            Last Post CarlTrading  
            Working...
            X