Topic: Defining a custom ASCII file format

Hello Popov

i noticed that data folder in forex strategy builder contains IBM stock data which has different format of ASCII

So how many ASCII data format supported by FSB

Re: Defining a custom ASCII file format

This is the full answer:

        SpacePattern  = @"[\t ;,]";
        DatePattern   = @"\d{1,4}[\./-]\d{1,4}[\./-]\d{1,4}";
        TimePattern   = @"\d{1,2}(:\d{1,2}){1,2}";
        PricePattern  = @"\d+([\.,]\d+)?";
        VolumePattern = @"\d{1,10}";

Separator between columns can be tab, space, semicolon or comma
Date can be three groups of digits separated by point, dash or '/' : 2012-03-21, 12.03.21, 12/2/1
Price can be with decimal point or without one: 1.234 or 1,234 or 1234
Volume must be an integer number 1 to 10 digits

Re: Defining a custom ASCII file format

hello popov and thanks for the answer  ,  May you ease the instrument name  to be able to read any name  for example names containing "^" and "." .

Also  may you add the option of sub-folder in data directory.

Regards

Re: Defining a custom ASCII file format

Forex names are fixed to 6 chars.
Sub-folders of Data folder are called "Data Sources" in FSB Pro, Data sources also comprise all symbol settings of its data.

Re: Defining a custom ASCII file format

Popov wrote:

Forex names are fixed to 6 chars.
Sub-folders of Data folder are called "Data Sources" in FSB Pro, Data sources also comprise all symbol settings of its data.

I know  But i considering trade with interactive brokers now and they offer global stocks plus forex as well  this is why iam asking to make FSB more fixable in reading the instruments names , if that happens the FSB itself will have more benefits for any market  and BTW this small modification will spread the use of FSB hugely


Regards And thanks for the great job

Re: Defining a custom ASCII file format

What names do you want to use?

Re: Defining a custom ASCII file format

Note : ''and its not an Ad to the software '' iam using Mldownloader to obtain EOD data , AND they have a good ASCII editor  , one of the options there when selecting the name of file ( either Name or Symbol or both )  iam selecting both  so the format comes like that (Stock Name_Symbol) 


this come with empty Spaces , Dots ,^ ,_,- ,& and numbers)  also it comes with no 1440 at the end of the name

Example Nasdaq 100  stocks

Nasdaq 100_^NDX
Activision Blizza_ATVI 
Apple Inc._AAPL
Bed Bath & Beyond_BBBY
O'Reilly Automoti_ORLY

Regards

8 (edited by ahmedalhoseny 2013-02-02 09:58:24)

Re: Defining a custom ASCII file format

TO make FSB read these names i have to edit the stock files every day when the price get updated

I used advanced renamer which is a free software to rename bulk amount of files  So for example

Apple Inc._AAPL             Becomes    AppleIncAAPL1440

O'Reilly Automoti_ORLY  Becomes    OReillyAutomotiORLY1440  but this process couldnot be done every day or even every week using 100s of stock data 


With these steps i managed to export and edit 10 historical stock data and FSB read them perfectly

It will be better if FSB manage to read these names without the external editing process


Regards

9 (edited by ahmedalhoseny 2013-02-02 09:55:33)

Re: Defining a custom ASCII file format

mldownloader ASCII format setup that can be  used with FSB attached

Post's attachments

ASCII for FSB.jpg 185.83 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Defining a custom ASCII file format

Data after editing works fine with FSB

Post's attachments

chart after editing.jpg 201.63 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Defining a custom ASCII file format

I can easily allow FSB to read no-forex symbols (Stocks, Indexes) containing requested by you symbols.
But adding the numerical representation of the period (1, 5, 15,... ,1440) is obligatory. There is no other way for FSB to know what data period is in a file.
Without '1440', FSB must open and read all files in order to determine the period and this will be unpractical.

Re: Defining a custom ASCII file format

It will be nice At least we need only to add 1440 at the end of file name . Thanks in advance




Another idea i dnonot if it is applicable or not !! 

The idea is : to write a function that will add 1440 to (only EOD stock data from FSB  instrument editor ) ??

Thanks again

Re: Defining a custom ASCII file format

I managed to convert stock data EOD using Mldownloader and text editor to make it compatible with FSB

i applied it on Nasdaq Composite Stocks and it works fine


i uploaded  data here if any one interested to test 

http://www.4shared.com/rar/wqi3H8Rw/Nasdaq_Composite.html?

Post's attachments

Nasdaq Composite.jpg 179.07 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Defining a custom ASCII file format

1st notice  : to edit instrument for each stock one by one it will be a time wasting for 100s of stocks , Do you have a way to edit multiple instruments and/or edit instruments by folder not one by one !!!

Another Notice Regarding to ambiguous bars why all stocks come with that huge number of  ambiguous bars 


Regards

15 (edited by ab 2013-02-06 11:25:30)

Re: Defining a custom ASCII file format

The reason that you are seeing so many ambiguous bars is likely that you don't have any intraday data loaded (ie. you only have the EOD bars).  When there are times when FSB needed to perform actions inside a bar, and if there is no intraday data to support the backtester, the bar is marked as ambiguous.

Some further information on this is available at http://forexsb.com/wiki/fsb/manual/ambiguous_bars and http://forexsb.com/wiki/fsb/manual/scanner.

I would suggest trying to find some stock data that you can get EOD and intraday data files for, and then run some tests in FSB to see if the accuracy is improved.  Not sure about how to do this with mldownloader, although I have successfully used non-FX data in FSB using QCollector as per the documentation available at http://forexsb.com/wiki/fsb/manual/iqfeed_esignal_data.

ab