Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I hope I am not posting in the wrong thread but I need help formatting some 3rd party data for TS
I would like to exclude the last 2 lines in this data sample . I am aware that the instructions has to be written in the attributes folder and that ( ,, ) needs to be written on the header line, but I am not sure how to do it correctly. Below in my sample data you will see there are 9 columns of data, representing
date open high Low close, volume open interest, I would like to exclude the last 2 columns
199503,461.45000000
I can delete them using Excel, but I wanted to know if there was a easier way using either the attribute folder, or including some instructions in the header line within the data
date open high Low close, volume open interest
19950103,821.75000000,822 .50000000,820.75000000,82 2.00000000, 48984, 211544,199503,461.45000000
THANKS VERY MUCH
Can you help answer these questions from other members on NexusFi?
If you want to exclude those last two columns from every line, then awk ( AWK - Wikipedia, the free encyclopedia) is the best command line tool to do the job. There are versions for windows that will work.
Regards,
-C
“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
I just reviewed the details on the website, but since I am not a programmer, I will not be able to follow those instructions. I am sure that there must be a easier way to accomplish this task. The instructions in the Tradestation manual reads.
"Consecutive delimiters allow fields to be omitted from individual lines of data. In other words, if a header reads: 'Symbol', 'Category','Exchange','Description','PriceScale', you would have a data line that looks like this: MSFT, Stock, Nasdaq ,, 1/100. This would allow you to omit the entry for the Description. This can be done for any field or for multiple fields."
So it appears that a double comma (,,) has to be included, but I am not exactly sure how to do this, I have been experimenting but it has not worked yet so far
GT - I don't think the double comma will work because it is intended for the data rows, not the header row.
I think that if you just add two more field names called "Other", then the data should work. In other words, the header row and one row of data would look like this:
Here are links to the guidelines for using ASCII data in Tradestation. If you have a lot of data files, you can put the header row in a "parameter file" to be used by all the data files. This would eliminate the need to add a header row to each data file. But I have never tried this approach.
hi Lampert
Thanks a million times, you are the absolute BEST, you are an absolute Genius, I will implement your idea and yes I have a lot of data files 10 years for each commodity. I dont quite understand what you meant by placing this information in a header instead of placing it in each commodity file, but I will start by trying it with one data folder first, hopefully it will also remove those extra zeroes or perhaps it does not matter
hi Lampert
I took your advise and tried the header as you suggested but the data is not appearing properly on the chart, I am not sure if its because of the extra zeroes in the price data