• 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

Inserting historical data to NJ from text file using C#

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

  • Farmer George
    replied
    Originally posted by NinjaTrader_PatrickH View Post
    Hello Farmer George,

    Please let me know if you have any questions after reviewing the reference sample and attempt to implement this for your .csv file.
    Thanks, will do.

    Leave a comment:


  • NinjaTrader_PatrickH
    replied
    Hello Farmer George,

    Please let me know if you have any questions after reviewing the reference sample and attempt to implement this for your .csv file.

    Leave a comment:


  • Farmer George
    replied
    Originally posted by NinjaTrader_PatrickH View Post
    Hello Farmer George,

    If you are running NinjaTrader 7 you would download the file SampleStreamReader_NT7.zip.
    Thanks. Still not sure what I'm doing. Essentially, I want to import a CSV file with data, not OHLC data, and then create an indicator from the data and view it on a chart with a given series (COT data has been used in certain example and I'd like to use inflation rates).

    Leave a comment:


  • NinjaTrader_PatrickH
    replied
    Hello Farmer George,

    If you are running NinjaTrader 7 you would download the file SampleStreamReader_NT7.zip.

    Leave a comment:


  • Farmer George
    replied
    Originally posted by NinjaTrader_ChelseaB View Post
    Hi globalscholar,

    You can read from a file, parse that information, and then add the data to a custom dataseries or an array.

    Below is a link to a reference sample that reads data from a file.
    http://www.ninjatrader.com/support/f...ead.php?t=3476

    Also, here is a link to a reference sample that uses a custom dataseries.
    http://www.ninjatrader.com/support/f...ead.php?t=7299
    Which of the two files do I download in the first link? Thanks.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hi globalscholar,

    You can read from a file, parse that information, and then add the data to a custom dataseries or an array.

    Below is a link to a reference sample that reads data from a file.
    http://www.ninjatrader.com/support/f...ead.php?t=3476

    Also, here is a link to a reference sample that uses a custom dataseries.
    http://www.ninjatrader.com/support/f...ead.php?t=7299

    Leave a comment:


  • globalscholar
    replied
    Hi,

    You said it is not possible if it is not the current running script. So, do you mean that it is possible for me to push History for the current instance of script. If yes, can you please tell me how? . I need it to load the data easily without manual intervention, via code, to simplify things.

    Regards,
    GS

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello globalscholar,

    If you are trying to add historical data to NinjaTrader (and not to a specific running instance of a script) this will not be possible.

    To import you must use the Historical Data Manager with an importable txt file.
    http://www.ninjatrader.com/support/h.../importing.htm

    Leave a comment:


  • globalscholar
    replied
    Load History data into Ninjatrader - C#

    Is there a way to push csv/txt history data into NinjaTrader from a C# program? . I know there is a way to do it manually. Can you please tell me how to do it via code?

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hi smyaseen,
    Originally posted by smyaseen View Post
    Hi,

    I need to develop a C# program which insert the historical data (date, time, high, low, close, volume) from a txt or csv file to NJ. I tried to use Ninjatrader.Client.dll but unable to import historical data row. Please help.

    Regards,
    S.M.Yaseen.
    Are you wanting to import the data as historical data so that the data appears on your chart? Or are you just wanting to read the values into memory for use with an indicator without saving this as historical data?

    If you are wanting to import the data as historical data:
    You can manually import historical data as per the instructions at the link below.
    http://www.ninjatrader.com/support/h.../importing.htm

    Please note that the data needs to be in a certain format, see below.
    Tick Format
    Each tick must be on its own line and fields must be separated by semicolon (.

    The format is:
    yyyyMMdd HHmmss;price;volume
    Sample data:
    20061107 000431;1383.00;1
    20061107 000456;1383.25;25
    20061107 000456;1383.25;36
    20061107 000537;1383.25;14


    If you are wanting to read the data from the file to store in memory and use for an indicator without importing the data as historical data, you can do this with the StreamReader.

    Below is a link to an official reference sample on using StreamReader.
    http://www.ninjatrader.com/support/f...ead.php?t=3476

    Please let me know if I can be of further assistance.

    Leave a comment:


  • Inserting historical data to NJ from text file using C#

    Hi,

    I need to develop a C# program which insert the historical data (date, time, high, low, close, volume) from a txt or csv file to NJ. I tried to use Ninjatrader.Client.dll but unable to import historical data row. Please help.

    Regards,
    S.M.Yaseen.

Latest Posts

Collapse

Topics Statistics Last Post
Started by chrismcdermut, Today, 01:46 PM
0 responses
2 views
0 likes
Last Post chrismcdermut  
Started by dpolyakov, Today, 01:13 PM
3 responses
13 views
0 likes
Last Post dpolyakov  
Started by tjendra, Today, 12:15 PM
3 responses
9 views
0 likes
Last Post tjendra
by tjendra
 
Started by lunardiplomacy, Today, 11:46 AM
4 responses
16 views
0 likes
Last Post lunardiplomacy  
Started by trdninstyle, Today, 10:38 AM
2 responses
17 views
0 likes
Last Post trdninstyle  
Working...
X