PureBytes Links
Trading Reference Links
|
Dear Tomasz
PLEASE help ! I am only starting out with
scripting now and unfortunately have to ask for your help on this one...a friend
of mine recently bought AB from you and I wish to make importing the daily
update files easy for him..and also a few other South African users...I have
come across.
In the current AB there is an "Sharenet Import "
function under the "tools" option. I know how to add more
scripts to this menu, what I do not know is how the script should be written to
do the following:
We all have a data folder located
at: <FONT
color=#0000ff>c:\ID
In this folder lives the daily update file with thename
of e.g. <FONT
color=#0000ff>20011011.eed<FONT
color=#0000ff>
I have already written an working import function which
lives in the following place: <FONT
color=#0000ff>c:\Program
Files\AmiBroker\Formats\
I now wish to put a menu option with the others in the
tools menu to update this file and then delete it when finished and then to
automatically save the new amended database thereafter instead of clicking on
the "save" button.
The following is an clipping from one of the update
files and the format of these lines are as follows:
Ticker, Date_YMD, Close, High, Low,
Volume, Open, OpenInt , DY, EY
AMROC 20010920 3 3 3 20000 3 0
0 1333333SANLAM 20010920 854 890 850 8543605 890 0 35128 124824SANTAM
20010920 3400 3550 3400 110092 3400 0 42794 93234SAPPI 20010920 6970 7160
6700 844606 7100 0 26838 158536
Here is the code for the manual import I currently
use:
$FORMAT
Ticker, Date_YMD, Close, High, Low, Volume, Open, OpenInt$SKIPLINES
0$SEPARATOR $PRICEFACTOR 0.01 <FONT
color=#ff0000>( very important this line, otherwise prices go all haywire!
)$AUTOADD 1$DEBUG 1
<FONT
color=#000000>
OK, nowthere is
also another file that accompanies this data file, almost like the header file
that comes with sharenet's eod file. Here are two samples of these type of
files which deals with "new shares listed " , " name changes "
etc....
<FONT
color=#000000>
Example #1:
NEW
UB-INT-P3 YYYYYN 1 8 59 0
0 I suspect these figures has
something to do with sector placement and
can be ignored for the meantime
as this process can be done manually...NEW UB-MCE-C3 YYYYYN 1 8 59 0
0NEW UB-NED-P3 YYYYYN 1 8 59 0 0NEW UB-OML-P3 YYYYYN 1 8 59 0 0NEW
BP-SOL-C5 YYYYYN 1 8 59 0 0NEW KINGCO-NP YYYYYN 3 14 37 0
0
Example #2:
DEL BP-AGL-C1DEL BP-FSR-C1DEL
BP-GFI-C1DEL BP-AMS-C2DEL BP-VNF-C3DEL BP-STX-C5DEL
CLYDE
Example #3:
FIX ANGLOS 20011005 11440 11700 11360 3479603
11500 0 0 0FIX ANGLOPLAT 20011005 30820 31100 30500 446906 30500 0 0
0FIX ANGGOLD 20011005 30880 31500 30700 352972 30700 0 0 0DEL
UD-SAB-P3DEL CCH
Here price errors were rectified - very important
....
Please help me to help the other's as we have all had the
same problems with data quality from Sharenet and have all changed over to
Investordata....I have already helped all these people change their database and
so on...I really love AB and I'm telling the whole world about it, I think and
hope that last week you sold another package to a young chap in
Johannesburg...I have already sent him a copy of the new database and he is
running at full steam....
Kind regards
Louw Coetzer
|