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

Method After OnBarUpdate

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

    Method After OnBarUpdate

    Hello,

    I have a multi-timeframe strategy that I run over a list of instruments (so not just one but several at once).

    I would like to write all data from these instruments into one file. When I put the File.Write method in the OnBarUpdate it writes it for every instrument at a time. I would like to do that at the end.

    So I was thinking to create an Global Array variable that I fill in the OnBarUpdate.

    Question: is there a method that I can make that runs after the OnBarUpdate so I can write the global array into a file in one take?

    Or any other ideas are welcome.

    Thanks

    #2
    Hi Siroki, so you mean you want an event after you've done backtesting your script or disabled it? I would look into OnTermination() then.

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Great, exactly what I was looking for.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by SnailHorn, Today, 10:49 PM
      0 responses
      7 views
      0 likes
      Last Post SnailHorn  
      Started by naanku, Today, 07:25 PM
      0 responses
      8 views
      0 likes
      Last Post naanku
      by naanku
       
      Started by milfocs, Today, 07:23 PM
      0 responses
      6 views
      0 likes
      Last Post milfocs
      by milfocs
       
      Started by PaulMohn, Today, 06:59 PM
      0 responses
      8 views
      0 likes
      Last Post PaulMohn  
      Started by bortz, 11-06-2023, 08:04 AM
      48 responses
      1,756 views
      0 likes
      Last Post carnitron  
      Working...
      X