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

RE: [amibroker] Re: Automation Object Model export.vbs



PureBytes Links

Trading Reference Links

Fred, thanks for the code. With the help of dingo I finished my little task.
But I'll take a look at your solution.
Thanks again.
Olli 

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of Fred
Sent: Freitag, 17. Februar 2006 23:31
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Automation Object Model export.vbs

Here's a skinnied down AFL you can use to export one or many symbols i..e
watchlists etc into a single file ... If you want different symbols in
different files this can be easily changed to accomplish that ... It will
utilize your AA ApplyTo & Range ... Note that it treats the output file as
an add on and does not clean it up prior to being tun ... Modify it to suit
your needs ... It's pretty fast but if you are only wanting for some reason
to clone symbols under a different name in AB then ATC is faster yet ... 

Sorry about the code compression ... Watch out for line wraps 

With thanks and apologies to Bruce Robinson ...

Beg  = LastValue(ValueWhen(Status("FirstBarInRange"), BarIndex())); End  =
LastValue(ValueWhen(Status("LastBarInRange"), BarIndex()));

yyyy = Year();
mm   = Month();
dd   = Day();

fhAdd = fopen("C:\\Program Files\\AmiBroker\\Symbols.CSV", "a");

for ( i = Beg; i <= End; i++ )
{
    Line = "";
    Line = Line + Name() + ",";
    Line = Line + StrFormat("%4.0f", yyyy[i]) + StrFormat("%02.0f", mm
[i]) + StrFormat("%02.0f", dd[i]) + ",";
    Line = Line + StrFormat("%.3f", Open[i]) + ",";
    Line = Line + StrFormat("%.3f", High[i]) + ",";
    Line = Line + StrFormat("%.3f", Low[i]) + ",";
    Line = Line + StrFormat("%.3f", Close[i]) + ",";
    Line = Line + StrFormat("%.0f", Volume[i]) + ",";
    Line = Line + StrFormat("%.0f", OpenInt[i]) + ",";
    Line = Line + "\n";
    fputs(Line, fhAdd);
}

fclose(fhAdd);

Filter = Status("LastBarInRange");
AddColumn(Beg, "Beg", 10.0);
AddColumn(End, "End", 10.0);


--- In amibroker@xxxxxxxxxxxxxxx, "metaboxfan" <uplett@xxx> wrote:
>
> Now I'm curios. I have to do some export / import to another
program via
> text files.  Just the last 10 or 15 days.
> Would be nice if you could tell me some faster ways. 
> Olli
> 
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
On Behalf
> Of Fred
> Sent: Freitag, 17. Februar 2006 21:14
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Automation Object Model export.vbs
> 
> If this is for a one time event you might as well use the js that
already
> exists ... If this is something you are going to do with more
regularity
> there are much faster ways ...
> 







------------------------ Yahoo! Groups Sponsor --------------------~--> Try
Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to SUPPORT {at}
amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links



 





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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