Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Historical interferes with file write?

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

    Historical interferes with file write?

    Greetings,

    I've got a strategy that is writing some info to a file. It saves the file on the C: drive. The file appears on the C: drive as it should however it is empty, without any text written to it at all and it has "0" bytes. The very strange thing is, however, if I stop/remove the strategy from the chart the file then "populates" with the correct information as it should...I'm at a total loss to explain why this happens? I do believe it has something to do with the "historical only" code I placed in OnBarUpdate (i.e. if(historical){return;})...Any clues as to what causes this?

    #2
    Sorry, I do not.
    RayNinjaTrader Customer Service

    Comment


      #3
      Maybe you have something happening by where data is stored in memory and flushed out once the streamreader object is disposed of?
      RayNinjaTrader Customer Service

      Comment


        #4
        What would cause that? Do I have too many charts open perhaps? If it means anything if I remove the "Historical" limitation the file does seem to populate with all the past bar data...it seems to be only a "real-time" issue...

        Comment


          #5
          How you use the streamwriter object coud cause that...This is in the scope of C# programming and you will have to dig into it on your own. Has nothing to do with the NinjaScript layer.
          RayNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CaptainJack, 05-29-2026, 05:09 AM
          0 responses
          294 views
          0 likes
          Last Post CaptainJack  
          Started by CaptainJack, 05-29-2026, 12:02 AM
          0 responses
          191 views
          0 likes
          Last Post CaptainJack  
          Started by charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          186 views
          1 like
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          272 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          219 views
          0 likes
          Last Post CarlTrading  
          Working...
          X