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

  • 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 CarlTrading, Yesterday, 11:51 AM
0 responses
16 views
0 likes
Last Post CarlTrading  
Started by CarlTrading, Yesterday, 11:48 AM
0 responses
21 views
0 likes
Last Post CarlTrading  
Started by CaptainJack, 03-25-2026, 09:53 PM
0 responses
16 views
0 likes
Last Post CaptainJack  
Started by CaptainJack, 03-25-2026, 09:51 PM
0 responses
13 views
0 likes
Last Post CaptainJack  
Started by Mindset, 03-23-2026, 11:13 AM
0 responses
20 views
0 likes
Last Post Mindset
by Mindset
 
Working...
X