Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Intercept OIF files placed into the incoming folder

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

    Intercept OIF files placed into the incoming folder

    Hello,

    I am on the NT7 platform and make use of the OIF files created in the folder: My Documents\<NinjaTrader Folder>\incoming for my trades.

    I have a need where I want to intercept the files that are being dropped / created / copied over to the incoming folder. I tried to attach a file system watcher to that folder but NT7 seems to be removing the file before I can read the contents of the file. Is there anything in NT7 that I can perhaps hook into to get the contents of each of these OIF files that are read?

    I can write a custom indicator if need be. Please advise.

    Thanks,
    Sai Kodi

    #2
    Hello Sai,

    The files placed in the Documents\NinjaTrader 7\Incoming are deleted as the file is processed. This how that specific order is completed and not run again.



    I am not certain that I am understanding. Are you manually placing files in this folder but you are wanting to read them before placing them in this folder?

    Would it be possible to not move them from where they are being written and read them in this location before they are moved?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello Chelsea,

      So I have several indicators that place orders using OIF files in NT7. I cannot change all of them. Hence I am looking at a way to read these files before they are being processed/deleted by NT7. So I am wanting to read the files after they are placed in this folder but before they are deleted by NT7. Is there any event I can subscribe to within the NT strategy or indicator framework that will let me read the file content when NT7 processes these files?

      Thanks,
      Sai Kodi

      Comment


        #4
        Hello Sai,

        OIF files are intended to be an interface for external applications or a way of manually externally interfacing with NinjaTrader.

        If you are using scripts to place orders internally in NinjaTrader, this would be faster, easier to write, and less prone to issues as a NinjaScript Strategy.

        Below is a public link to a forum post with helpful information about getting started creating NinjaScript Strategies.
        http://ninjatrader.com/support/forum...678#post493678

        However, in your script you can change the logic to not write the files directly to the Documents\NinjaTrader 7\Incoming folder and write them to a different folder path instead and then copy them to the Incoming folder using System.IO general C# methods.
        Chelsea B.NinjaTrader 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