NexusFi: Find Your Edge


Home Menu

 





Convert H Data TS to NT


Discussion in NinjaTrader

Updated
    1. trending_up 1,851 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread

Convert H Data TS to NT

  #1 (permalink)
 elopezh 
Oviedo Asturias/Espaņa
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL
Posts: 5 since Dec 2018
Thanks Given: 1
Thanks Received: 9

Good night,

I need a program/script to convert "historical data" from Tradestation to Ninja (*.txt). I've been looking in the forums etc, but I haven't got anything.
If anyone has it, or knows the way to automate the conversion I would appreciate it greatly

input TS-outPut NT:

"Date", "Time", "Open", "High", "Low", "Close", "Up", "Down"
12/18/1998,08:44,4755.0,4755.0,4750.0,4750.0,245,5
"Date" "Time"; "Open"; "High"; "Low"; "Close", "Up+Down" (dont include this line in output *)
19981218 084400; 4755.0;4755.0;4750 .0;4750.0;250

In essence it is:
1. Date format mm/dd/yyyy --> yyyymmdd
2. Character "," " " (space) and time format hh:mm:ss --> hhmmss
3. Rest of fields separated by "," -> ";"
4. The Up and Dow fields only-> Up+Down field
5. Oh, and the first line of the input F disappears in the output file (*)

Thanks

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
Strategy stop orders partially filled
EasyLanguage Programming
REcommedations for programming help
Sierra Chart
Quantum physics & Trading dynamics
The Elite Circle
 
  #2 (permalink)
weeclemans
Moscow + Moscow Oblast/Russia
 
Posts: 13 since Nov 2020
Thanks Given: 3
Thanks Received: 8

Hi,
if still relevant, you can try to write your own script using one of the high-level programming languages (Perl, Python, UNIX SHELL), which will convert files with quotes ...

Of course you will have to spend time studying regular expressions, but I think it is worth it, it will be useful for you in the future.

Reply With Quote




Last Updated on December 3, 2020


© 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