NexusFi: Find Your Edge


Home Menu

 





Import Historical data from text file


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one spinnybobo with 4 posts (0 thanks)
    2. looks_two Big Mike with 2 posts (2 thanks)
    3. looks_3 markus1000 with 1 posts (0 thanks)
    4. looks_4 linuxtor with 1 posts (0 thanks)
    1. trending_up 9,082 views
    2. thumb_up 2 thanks given
    3. group 6 followers
    1. forum 9 posts
    2. attach_file 0 attachments




 
Search this Thread

Import Historical data from text file

  #1 (permalink)
 
spinnybobo's Avatar
 spinnybobo 
Crete, IL/USA
 
Experience: Intermediate
Platform: NinjaTrader, Mt4
Broker: Tradestation/Tradestation, NinjaTrader, FXCM and Tallinex
Trading: ES, CL, EUR/USD, TF
Posts: 173 since Aug 2009
Thanks Given: 105
Thanks Received: 61

Hello

I am having a problem. I currently have lots of historical daily data from Genesis Financial for the Dow and wanted to put it into Ninja Trader for C# coding. It is in the form of ASCII. Name of file is DJIA.txt
It is in the format:
yyyyMMdd;open price;high price;low price;close price;volume

It is from 01/30/1920 to 01/25/2012


It is currently formatted correctly. When I go to the Historical Data Manager tab, and follow the promps from
NinjaTrader Version 7
it says imported successfully!

So, I went to the instrument manager to add the name of the instrument. In this case, the file name is DJIA.txt
So, I put in DJIA and filled in everything else.
Just don't seem to be figuring out how to put the imported data and "map" it to the symbol??
Do I need to specify the path on my computer for the URL or something?

thanks
Spencer

Follow me on Twitter Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
How to apply profiles
Traders Hideout
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
What is Markets Chat (markets.chat) real-time trading ro …
77 thanks
Spoo-nalysis ES e-mini futures S&P 500
55 thanks
Just another trading journal: PA, Wyckoff & Trends
37 thanks
Bigger Wins or Fewer Losses?
24 thanks
The Program
17 thanks
  #2 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,461 since Jun 2009
Thanks Given: 33,235
Thanks Received: 101,657

From memory, it is based on the filename.

So the symbol would be "DJIA".

You probably should rename the filename to YM ##-##.txt based on the default symbol mappings in NinjaTrader, then when you bring up the YM (mini dow) you'll get the imported data.

But make a backup of everything incase I am wrong, as I don't use NT and can't test this.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #3 (permalink)
 
spinnybobo's Avatar
 spinnybobo 
Crete, IL/USA
 
Experience: Intermediate
Platform: NinjaTrader, Mt4
Broker: Tradestation/Tradestation, NinjaTrader, FXCM and Tallinex
Trading: ES, CL, EUR/USD, TF
Posts: 173 since Aug 2009
Thanks Given: 105
Thanks Received: 61


Hi Mike

thank you as always for the reply:-) So, it sounds like you are saying to basically name it something that is already in NinjaTrader like the mini down.

ok, I will take a look at that.

thank you very much

Spencer

Follow me on Twitter Started this thread Reply With Quote
  #4 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,461 since Jun 2009
Thanks Given: 33,235
Thanks Received: 101,657


spinnybobo View Post
Hi Mike

thank you as always for the reply:-) So, it sounds like you are saying to basically name it something that is already in NinjaTrader like the mini down.

ok, I will take a look at that.

thank you very much

Spencer

Yes, unless it is not the mini-dow. If it is the cash price for instance and not futures, then you would want to just create your own symbol in instrument manager, then rename the file to match the base symbol and add ##-## for a continuous contract. Like DJIA ##-##.txt. But if it is futures, them YM ##-##.txt.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #5 (permalink)
 
spinnybobo's Avatar
 spinnybobo 
Crete, IL/USA
 
Experience: Intermediate
Platform: NinjaTrader, Mt4
Broker: Tradestation/Tradestation, NinjaTrader, FXCM and Tallinex
Trading: ES, CL, EUR/USD, TF
Posts: 173 since Aug 2009
Thanks Given: 105
Thanks Received: 61

Hey Mike

I think the problem is that I was importing as an Index, and for some reason, it kept adding that ^ symbol. Even when I changed the filename to ^DJIA.txt it did not work. However, when I created a stock or future with the symbol DJIA, then it worked.

They must have made it easier than before. The filename is DJIA.txt
When I import it, it automatically creates a new symbol as a stock. I can create it as a future if I want as long as I keep the names the same like you said.

This is just daily data from 1920 to 2012, so no minute data or anything.
Anyway, it worked out well, so thank you:-)

Spencer

Follow me on Twitter Started this thread Reply With Quote
  #6 (permalink)
linuxtor
bangalore
 
Posts: 1 since Feb 2015
Thanks Given: 0
Thanks Received: 0

Hi Sir,

I am new to ninja trader. I am facing an issue when importing historical data from a .csv / .txt file to my NT7. I am am from India and I am trying to import data for NSE. So for example there is a script named SBIN(When entered in google finance). So I am trying to get the data from this to my NT7.
I am following the below steps.
  1. In NT7 under tools clicked Historical data manager
  2. Then under import section i am selecting the parameters Format:Ninja Trader(Timestamp in import files represent start of bar time),Data Type :Last,Time zone:UTC+5.30
  3. Then clicked the import button.
The import is failing showing with the pop up "There has been an error in importing"

Pls help me out. I feel you have lots of experience in NT so might be you can help me out.

Thanks & Regards
LT

Reply With Quote
  #7 (permalink)
 
spinnybobo's Avatar
 spinnybobo 
Crete, IL/USA
 
Experience: Intermediate
Platform: NinjaTrader, Mt4
Broker: Tradestation/Tradestation, NinjaTrader, FXCM and Tallinex
Trading: ES, CL, EUR/USD, TF
Posts: 173 since Aug 2009
Thanks Given: 105
Thanks Received: 61


linuxtor View Post
Hi Sir,

I am new to ninja trader. I am facing an issue when importing historical data from a .csv / .txt file to my NT7. I am am from India and I am trying to import data for NSE. So for example there is a script named SBIN(When entered in google finance). So I am trying to get the data from this to my NT7.
I am following the below steps.
  1. In NT7 under tools clicked Historical data manager
  2. Then under import section i am selecting the parameters Format:Ninja Trader(Timestamp in import files represent start of bar time),Data Type :Last,Time zone:UTC+5.30
  3. Then clicked the import button.
The import is failing showing with the pop up "There has been an error in importing"

Pls help me out. I feel you have lots of experience in NT so might be you can help me out.

Thanks & Regards
LT

Hello

are you trying to import daily data or minute data? I am assuming it is daily since you said google finance probably only has EOD daily, etc..

according to Ninja's website, it might be a formatting error. What does the log say when it gives you an error?

NinjaTrader Version 7

go to the part that says

Understanding import file and data formats


you might need to build a program that opens the file and reads it, then reformats it

If you need a program I have one I built a while ago in Java. I would have to look for it though

Spencer

Follow me on Twitter Started this thread Reply With Quote
  #8 (permalink)
 Farmer George 
Krakow Poland
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Stocks
Posts: 19 since Oct 2014
Thanks Given: 11
Thanks Received: 1

Apologies if covered elsewhere, is it possible to bulk download the EOD for all the FTSE 100/FTSE 350 companies from Yahoo in one go for Ninjatrader, or is it company by company? From what I see Kinetick don't do individual FTSE companies. Thanks.

Reply With Quote
  #9 (permalink)
 markus1000 
Frankfurt
 
Experience: Beginner
Platform: Ninja Trader, TWS
Broker: Interactive Brokers, Mirus Futures
Trading: ES, TF, NQ, FDAX
Posts: 17 since Jul 2011
Thanks Given: 8
Thanks Received: 5

Is there an easy way to convert this minute data into ninjatrader format.

DATA

Date,Time,O,H,L,C,Volume
01/03/2012,0931,6.82,6.83,6.80,6.80,156087

to ninja format

yyyyMMdd HHmmss;open price;high price;low price;close price;volume

I can reformat most of it, the problem is how to replace only the first comma in a row with a space?

Reply With Quote
  #10 (permalink)
Revan
Brisbane, Australia
 
Posts: 95 since Mar 2018
Thanks Given: 72
Thanks Received: 26



spinnybobo View Post
It is currently formatted correctly. When I go to the Historical Data Manager tab, and follow the promps from
NinjaTrader Version 7
it says imported successfully!

Hello, I also have attempted importing historical data in .txt format via the data manager tab and likewise I have received the "imported successfully" message, however I then proceed to open a chart and the historical data is not loaded..

Any ideas to troubleshoot this?

Reply With Quote




Last Updated on May 19, 2019


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts