Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Records in my text file

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

    Records in my text file

    Hello,
    I'm developing a strategy that write the results of the trades in a text file. But when I check this file I find a lot of records that my strategy has not written. I attach the text file. My strategy only wrote the first five records.
    Thanks in advance for your help.
    Attached Files

    #2
    soyjesus, sorry would not know where those other entries would be coming from - could another strategy file write to the same file name perhaps?

    Comment


      #3
      Hello Bertrand,

      I have deleted the text file more than once. But when I run the strategy an then check the file I find all of these records.

      Comment


        #4
        soyjesus, sorry I would not really know without seeing the code you use to write to the txt file - it seems those are entries from days where the strategy simply did not trade?

        Comment


          #5
          Bertrand, I need that my strategy only write the real-time trades, but not the historical trades from days prior. And when I enable the strategy there are a lot of records before the corresponding to the real-time trades.

          Comment


            #6
            Then you have 2 options to accomplish that :

            1) Return out of your OnBarUpdate() for historical bars - http://www.ninjatrader.com/support/h...historical.htm

            2) Access realtime trades info only from the Performance class - http://www.ninjatrader.com/support/h...erformance.htm

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by kinfxhk, 07-14-2026, 09:39 AM
            0 responses
            125 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Started by kinfxhk, 07-13-2026, 10:18 AM
            0 responses
            105 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Started by kinfxhk, 07-13-2026, 09:50 AM
            0 responses
            85 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Started by kinfxhk, 07-13-2026, 07:21 AM
            0 responses
            105 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Started by kinfxhk, 07-11-2026, 02:11 AM
            0 responses
            84 views
            0 likes
            Last Post kinfxhk
            by kinfxhk
             
            Working...
            X