[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: TJ or Group: Question on Sharing AB Database (File Splitter)



PureBytes Links

Trading Reference Links

Ok, I exported data for 4 stocks (for 1 month) into one file to try 
this out.

Data exported to a new folder & file  C:\StockData\alldata.csv

If I understand correctly I change the following in your formula:

as_filename = "c:\out.csv" becomes  "c:\StockData\alldata.csv"

and
 
as_directory = "d:\stocks\" becomes "c:\StockData\"

Are these the required changes?

Thanks for your help!
Jim










--- In amibroker@xxxxxxxxxxxxxxx, walt <WSCHWARZ@xxxx> wrote:
> jim,
> 
> after you export the file run this script from the indicator 
builder and it
> will split the exported file into separate files for you...
> Note: Change the "filename" & directory to suit...
> 
>                     Walt
> 
> //*****************************************************
> EnableScript("vbscript");
> 
> <%
> 
> ab_excludeTick = True
> 
> as_filename = "c:\out.csv"
> 
> as_directory = "d:\stocks\"
> 
> Set io_fso = CreateObject("Scripting.FileSystemObject")
> 
> Set lo_txtAll = io_fso.OpenTextFile(as_filename)
> 
> ls_lastTick = ""
> 
> ls_line = lo_txtAll.ReadLine()
> 
> ls_line = lo_txtAll.ReadLine()
> 
> do while Len(Ls_line)>0
> 
> ls_items = Split(ls_line, ",")
> 
> if UBound(ls_items) = 6 Then
> 
> if ls_items(0) <> ls_lastTick Then
> 
> if Len(ls_lastTick) > 0 Then
> 
> lo_txt.Close
> 
> End if
> 
> ls_curTick = Trim(ls_items(0))
> 
> ls_curTick = Replace(ls_curTick, "^", "")
> 
> ls_curTick = Replace(ls_curTick, "$", "")
> 
> ls_curTick = Replace(ls_curTick, "\", "")
> 
> ls_curTick = Replace(ls_curTick, "/", "")
> 
> ls_curTick = Replace(ls_curTick, "?", "")
> 
> Err.Clear
> 
> 'On Error Resume Next
> 
> Set lo_txt = io_fso.OpenTextFile(as_directory + ls_curTick 
+ ".csv", 2, -1)
> 
> lb_fileOpen = (Err = 0)
> 
> End if
> 
> if lb_fileOpen Then
> 
> ls_lastTick = ls_curTick
> 
> if ab_excludeTick Then
> 
> ls_line = Replace(ls_line, ls_curTick + ",", "")
> 
> do while NOT IsNumeric(Left(ls_line, 1))
> 
> ls_line = Right(ls_line, Len(ls_line) - 1)
> 
> Loop
> 
> End if
> 
> lo_txt.writeline ls_line
> 
> End if
> 
> End if
> 
> err.Clear
> 
> on error resume next
> 
> ls_line = lo_txtAll.ReadLine()
> 
> if err=62 then exit do
> 
> Loop
> 
> lo_txt.Close
> 
> lo_txtAll.Close
> 
> %>
> 
>   -----Original Message-----
>   From: jnk1997 [mailto:jnk1997@x...]
>   Sent: Saturday, May 31, 2003 9:41 AM
>   To: amibroker@xxxxxxxxxxxxxxx
>   Subject: [amibroker] Re: TJ or Group: Question on Sharing AB 
Database -
> Bob
> 
> 
>   I still don't get it.
> 
>   Can I run that exploration on all stocks in Amibroker database 
for a
>   period of 2 years for example, export to one .csv file named
>   ALLStocks. Then, Import that file as my database in the other
>   program?
>   Or do I have to save the data stock by stock (seperate file for 
each
>   stock?)and have all those individual data files in a folder named
>   ALLStocks?
> 
> 
>   Thanks
>   Jim
> 
> 
> 
> 
> 
> 
>   --- In amibroker@xxxxxxxxxxxxxxx, "Bob Jagow" <bjagow@xxxx> wrote:
>   > That's the old form--like using GraphN instead of plot().
>   > Easier to use
>   > Filter = 1; /* all stocks and quotes accepted */
>   > addcolumn(O,"open",1.4);
>   > addcolumn(H,"high",1.4);
>   > addcolumn(L,"low",1.4);
>   > addcolumn(C,"close",1.4);
>   > addcolumn(V,"volume",1.0);
>   >
>   > Bob
>   >
>   >
>   >
>   >   -----Original Message-----
>   >   From: walt [mailto:WSCHWARZ@x...]
>   >   Sent: Friday, May 30, 2003 5:29 PM
>   >   To: amibroker@xxxxxxxxxxxxxxx
>   >   Subject: RE: [amibroker] Re: TJ or Group: Question on Sharing 
AB
>   Database
>   >
>   >
>   >   Jim,
>   >
>   >   I found this code in the helpf ile; Run it in the AA "explore"
>   and then use the "export" button. Then "import" it into your
>   > program...
>   >
>   >                           Walt
>   >
>   >
>   >
>   >   Filter = 1; /* all stocks and quotes accepted */
>   >
>   >   NumColumns = 5;
>   >
>   >   Column0 = Open;
>   >
>   >   Column1 = High;
>   >
>   >   Column2 = Low;
>   >
>   >   Column3 = Close;
>   >
>   >   Column4 = Volume;
>   >
>   >   Column0Name = "open";
>   >
>   >   Column1Name = "high";
>   >
>   >   Column2Name = "low";
>   >
>   >   Column3Name = "close";
>   >
>   >   Column4Name = "volume";
>   >
>   >   Column0Format = 1.4;
>   >
>   >   Column1Format = 1.4;
>   >
>   >   Column2Format = 1.4;
>   >
>   >   Column3Format = 1.4;
>   >
>   >   Column4Format = 1.0;
>   >
>   >     -----Original Message-----
>   >     From: jnk1997 [mailto:jnk1997@x...]
>   >     Sent: Friday, May 30, 2003 6:50 PM
>   >     To: amibroker@xxxxxxxxxxxxxxx
>   >     Subject: [amibroker] Re: TJ or Group: Question on Sharing AB
>   Database
>   >
>   >
>   >     Sorry, Right!
>   >     I use AmiQuote to retreive eod data from Yahoo.
>   >     Thanks
>   >     Jim
>   >
>   >
>   >
>   >     --- In amibroker@xxxxxxxxxxxxxxx, "Chuck Rademacher"
>   >     <chuck_rademacher@x> wrote:
>   >     > Jim, you told us what kind of data Forecaster Plus can 
read
>   and we
>   >     know what
>   >     > kind of data AB can read.   What we don't know (in order 
to
>   help
>   >     you) is
>   >     > what kind of data you already are using.
>   >     >
>   >     > With that long list of data types that Forecast Plus is 
able
>   to
>   >     use, I'm
>   >     > reasonbly sure you will be able to share data between the 
two
>   >     software
>   >     > packages.
>   >     >   -----Original Message-----
>   >     >   From: jnk1997 [mailto:jnk1997@x...]
>   >     >   Sent: Friday, May 30, 2003 6:17 PM
>   >     >   To: amibroker@xxxxxxxxxxxxxxx
>   >     >   Subject: [amibroker] TJ or Group: Question on Sharing AB
>   Database
>   >     >
>   >     >
>   >     >   I received an interesting software CD with my renewal to
>   TASC.
>   >     >   It is called Pattern Forecaster Plus by Matheny 
www.ment.com
>   >     >   The software does not include a downloader but will 
read the
>   >     >   following file types:
>   >     >
>   >     >   How can I set up AB to share my database?
>   >     >
>   >     >   Pattern Forecaster Reads the following data files 
formats:
>   >     >
>   >     >   PFP/StockVue File Types
>   >     >   Technical Tools File Types
>   >     >   FutureSource File Types
>   >     >   FutureLink/SuperCharts File Types
>   >     >   MetaStock/Computrak File Types
>   >     >   Megatech/Knight Ridder File Types
>   >     >   Telescan ASCII file Types
>   >     >   DBC Signal File Types
>   >     >   Worden Brothers TC2000 File Types
>   >     >   AIQ ASCI File Types
>   >     >   Apex (CandlePower) File Types
>   >     >   Aspen Graphics ASCII File Types
>   >     >   TradeStation ASCII File Types
>   >     >   Live Wire ASCII File Types
>   >     >   Dial Data ASCII File Types
>   >     >
>   >     >   Thanks
>   >     >   Jim
>   >     >
>   >     >
>   >     >         Yahoo! Groups Sponsor
>   >     >
>   >     >
>   >     >
>   >     >
>   >     >
>   >     >   Send BUG REPORTS to bugs@xxxx
>   >     >   Send SUGGESTIONS to suggest@xxxx
>   >     >   -----------------------------------------
>   >     >   Post AmiQuote-related messages ONLY to:
>   amiquote@xxxxxxxxxxxxxxx
>   >     >   (Web page: 
http://groups.yahoo.com/group/amiquote/messages/)
>   >     >   --------------------------------------------
>   >     >   Check group FAQ at:
>   >     > 
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>   >     >
>   >     >   Your use of Yahoo! Groups is subject to the Yahoo! 
Terms of
>   >     Service.
>   >
>   >
>   >
>   >     Send BUG REPORTS to bugs@xxxx
>   >     Send SUGGESTIONS to suggest@xxxx
>   >     -----------------------------------------
>   >     Post AmiQuote-related messages ONLY to: 
amiquote@xxxxxxxxxxxxxxx
>   >     (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>   >     --------------------------------------------
>   >     Check group FAQ at:
>   http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>   >
>   >     Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>   Service.
>   >
>   >
>   >         Yahoo! Groups Sponsor
>   >
>   >
>   >
>   >   Send BUG REPORTS to bugs@xxxx
>   >   Send SUGGESTIONS to suggest@xxxx
>   >   -----------------------------------------
>   >   Post AmiQuote-related messages ONLY to: 
amiquote@xxxxxxxxxxxxxxx
>   >   (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>   >   --------------------------------------------
>   >   Check group FAQ at:
>   http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>   >
>   >   Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>   Service.
> 
> 
>         Yahoo! Groups Sponsor
> 
> 
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
>   (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>   --------------------------------------------
>   Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> 
>   Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/