NexusFi: Find Your Edge


Home Menu

 





Convert H Data TS to NT


Discussion in NinjaTrader

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




 
Search this Thread
  #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?
UMA Votes Tonight: Polymarkets $80M Strategy Bitcoin Bat …
Prediction Markets & Event Contracts
CFTC Opens First COT Report Review in 20 Years -- Asks W …
Traders Hideout
Warsh Opens Today, Hormuz June 19 -- WTI Below $80, Fran …
Prediction Markets & Event Contracts
Would a node-based workflow for automated trading be useful?
Traders Hideout
Post-Summit Scorecard: $36M in May 15 Bets Settle Near-Z …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
8 thanks
Darmok and Jalad at Tanagra
1 thanks
  #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


© 2026 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 - Downloads - Top
no new posts