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

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?
    BertrandNinjaTrader Customer Service

    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?
        BertrandNinjaTrader Customer Service

        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
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Barry Milan, Yesterday, 10:35 PM
            5 responses
            16 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by DanielSanMartin, Yesterday, 02:37 PM
            2 responses
            13 views
            0 likes
            Last Post DanielSanMartin  
            Started by DJ888, 04-16-2024, 06:09 PM
            4 responses
            13 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by terofs, Today, 04:18 PM
            0 responses
            12 views
            0 likes
            Last Post terofs
            by terofs
             
            Started by nandhumca, Today, 03:41 PM
            0 responses
            8 views
            0 likes
            Last Post nandhumca  
            Working...
            X