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

[amibroker] Re: Holes and new "repairing" data



PureBytes Links

Trading Reference Links

Well, here it is !!
You may fill every last missing bar with
// SELECT THE INDEX OF YOUR DATABASE, Apply to current stock, all 
quotations
N="RATL";// PLACE YOUR STOCK HERE
ROPEN=Foreign(N,"O",1);
RHIGH=Foreign(N,"H",1);
RLOW=Foreign(N,"L",1);
RCLOSE=Foreign(N,"C",1);
RVOLUME=Foreign(N,"V",1);
X1=BarsSince(IsTrue(ROPEN));
Filter=1;
AddColumn(X1,"");
AddTextColumn(N,"<TICKER>");
AddTextColumn("D","<PER>");
AddColumn(19000000+DateNum(),"<DTYYYYMMDD>",1.0);
AddColumn(IIf(IsEmpty(ROPEN),Ref(ROPEN,-X1),ROPEN),"<OPEN>");
AddColumn(IIf(IsEmpty(RHIGH),Ref(RHIGH,-X1),RHIGH),"<High>");
AddColumn(IIf(IsEmpty(RLOW),Ref(RLOW,-X1),RLOW),"<Low>");
AddColumn(IIf(IsEmpty(RCLOSE),Ref(RCLOSE,-X1),RCLOSE),"<Close>");
AddColumn(IIf(IsEmpty(RVOLUME),Ref(RVOLUME,-X1),RVOLUME),"<Volume>");

It is fair to repeat the logo "everything can be done with amibroker".
Dimitris [happy] Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Dimitris Tsokakis" <TSOKAKIS@xxxx> 
wrote:
> There is no reason to do it through EXCEL macro, Amibroker is here 
to do the job.
> Suppose my suspect stock is "RATL" with Feb 12, 18, 19 and the last 
8 sessions missing for some reason.
> The ASCII format I use is
> 
> <TICKER>,<PER>,<DTYYYYMMDD>,<OPEN>,<HIGH>,<LOW>,<CLOSE>,<VOL>
> MSFT,D,20030224,24.44,24.5,23.84,24.07,62502679
> 
> I may fill THE INTERMEDIATE HOLES if I create new RATL arrays, with 
the
> 
> // SELECT THE INDEX OF YOUR DATABASE, Apply to current stock, all 
quotations
> N="RATL";// PLACE YOUR STOCK HERE
> ROPEN=Foreign(N,"O",1);
> RHIGH=Foreign(N,"H",1);
> RLOW=Foreign(N,"L",1);
> RCLOSE=Foreign(N,"C",1);
> RVOLUME=Foreign(N,"V",1);
> Filter=1;
> AddTextColumn(N,"<TICKER>");
> AddTextColumn("D","<PER>");
> AddColumn(19000000+DateNum(),"<DTYYYYMMDD>",1.0);
> AddColumn(ROPEN,"<OPEN>");
> AddColumn(RHIGH,"<HIGH>");
> AddColumn(RLOW,"<LOW>");
> AddColumn(RCLOSE,"<CLOSE>");
> AddColumn(RVOLUME,"<VOLUME>");
> 
> Export the results to a csv file and delete the first two columns. 
> Fill the last empty lines and, thats it !!!
> Dimitris Tsokakis


------------------------ Yahoo! Groups Sponsor ---------------------~-->
New Yahoo! Mail Plus. More flexibility. More control. More power.
Get POP access, more storage, more filters, and more.
http://us.click.yahoo.com/Hcb0iA/P.iFAA/46VHAA/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/