• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.

    https://ninjatrader.com/support/help..._files_oif.htm

    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 TikDaddy, Today, 02:08 PM
        2 responses
        8 views
        0 likes
        Last Post NinjaTrader_JoshG  
        Started by Brillo, Today, 01:52 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by TazoTodua, 02-09-2018, 08:40 AM
        10 responses
        880 views
        0 likes
        Last Post NinjaTrader_JoshG  
        Started by TazoTodua, Yesterday, 04:35 AM
        6 responses
        18 views
        0 likes
        Last Post eDanny
        by eDanny
         
        Started by MattP, Today, 12:25 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_PatrickG  
        Working...
        X