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

Re: [amibroker] Re: Ascii Export date range modification



PureBytes Links

Trading Reference Links



That gives me the dates, but how would I get the below loop to skip writing a record if the date was before the specified date range?
 
 
 
 
In a message dated 5/17/2009 9:02:39 P.M. Central Daylight Time, zoopfree@xxxxxxxxxxx writes:
You can use the status function to retrieve current date settings in AA:

rangefrom = Status( "rangefromdate" );
rangeto   = Status( "rangetodate"   );


--- In amibroker@xxxxxxxxxxxxxxx, Kevin243@xxx wrote:
>
> Graham wrote this code a while back......works great...

> what code would I add to have the scan utilize the date range specified in 
> the Analyzer?





> /*
> 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:\\Data\\elwave 9.0\\asci\\"+Name()+".txt", "w");
> if( fh  )
> {
> fputs( "Ticker,Date,Time,Open,High,Low,Close,Volume  \n", fh );
> y = Year();
> m = Month(); 
> d = Day();
> r = Hour();
> e =  Minute();
> n = Second();
>
> for( i  = 0; i < BarCount; i++ )
> { 
> fputs( Name() + "," , fh  );
> 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\n", 
> O[ i ],H[ i ],L[ i ],C[ i ],V[ i ] );
> fputs(  qs, fh );
> }

>    fclose( fh );
> }
> AddColumn(C,"Close", format =  1.2);
> Buy = 0;
> Filter=1;
> **************Recession-proof vacation ideas.  Find free things to do in
> the U.S.
> (http://travel.aol.com/travel-ideas/domestic/national-tourism-week?ncid=emlcntustrav00000002)
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___