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

[amibroker] Re: ANy help on this code made by Graham



PureBytes Links

Trading Reference Links

Hello Graham,

Thanks for the code

Reagrds
hetu


--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxx> wrote:
>
> The decimal values are restricted with the %f
> remove these lines
> Volume=(V)/1000 ;
> OpenInterest=(OI)/1000;
> 
> and try this replacement for these lines
> 
>      qs = StrFormat("%.4f,%.4f,%.4f,%.4f,%.4f,%.4f\n",
>                     O[ i ],H[ i ],L[ i ],C[ i ],V[ i ]/1000,OI
[i]/1000 );
> 
> -- 
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm
> 
> 
> On 07/07/06, Hetal <hetal_mba@xxx> wrote:
> > Hello  Friends,
> > Happen to come across an afl from Mr Graham.
> > tweaked it to make it compatibale for my work
> > but something is still not working any help would be highly
> > appreciated
> > i use to bulk export full quotes file of scrips in any watchlist
> > what i want was symbol name as filename.txt which i got that and
> > date,o,h,l,c,vol,oi in csv/txt file which also i got it but the
> > volumes i want was to be divided by 1000 which also i got it but 
the
> > openint which i want to be divided by 1000 but it returns full 
amount
> > the vol/1000 and oi/1000 i want it in decimals so 9835532 vol 
should
> > be like 98355.532 same with oi .
> > Any help from anyone would be highly appreciated.
> > I use it to export some data from ab for further analysis outside 
ab
> > the afl is given below.
> > But it is modified & tweaked for my purpose. which please note
> > Thanks to Graham he made my life easier because i can now bulk 
export
> > which earlier i use to take each scrip and aa it and then export 
Good
> > automation and faster too. Thanks once again to Graham.
> > ====================================================
> > /*
> > Export intraday and EOD data to TXT files
> > One file for each stock
> > In the first line insert the directory you want to save them to, 
make
> > sure the directory exists
> > Select your charts to export with the "Apply to" filter in AA 
window
> > Select the timeframe period you want to save as using the
> > AA "Settings"
> > Press Scan button
> > by Graham Kavanagh 05 Feb 2004
> > */
> >
> > fh = fopen( "c:\\AB2ms\\EOD\\"+Name()+".txt", "w");
> > if( fh )
> > {
> >    //fputs( "Ticker,Date,Time,Open,High,Low,Close,Volume \n", 
fh );
> >    fputs( "Date,Open,High,Low,Close,Volume,OpenInt \n", fh );
> >
> >    y = Year();
> >    m = Month();
> >    d = Day();
> > //   r = Hour();
> > //   e = Minute();
> > //   n = Second();
> >                 Volume=(V)/1000 ;
> >                 OpenInterest=(OI)/1000;
> >
> >    for( i = 0; i < BarCount; i++ )
> >    {
> >       ds = StrFormat("%02.0f-%02.0f-%02.0f,",
> >                      y[ i ], m[ i ], d[ i ] );
> >       fputs( ds, fh );
> >
> >       //ts = StrFormat("%02.0f:%02.0f:%02.0f,",
> >                 //                     r[ i ],e[ i ],n[ i ] );
> >                 //      fputs( ts, fh );
> >
> >       qs = StrFormat("%.4f,%.4f,%.4f,%.4f,%.0f,%.4f\n",
> >                      O[ i ],H[ i ],L[ i ],C[ i ],V[ i ],OI[i] );
> >
> >       fputs( qs, fh );
> >    }
> >
> >    fclose( fh );
> > }
> >
> > Buy = 0;
> >
> > Thanks & Regards
> > hetu
> >
> >
> >
> >
> >
> >
> >
> > 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
> >
> >
> >
> >
> >
> >
> >
> >
>