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

RE: [amibroker] Exporting data to ASCII format question



PureBytes Links

Trading Reference Links

I’ve never tried to do it before.  I think you can delete your outside for loop and the first if(Buy[i]) statement.  Pick the formula in Automatic Analysis and select “Apply to: all symbols”. Next press the Scan button.

 

I updated your code and tested it using Scan in AA (below is the updated code).  Seems to work fine.

 

Regards,

 

David

 

 

///////////////////Code/////////////////////////////

fmkdir( "C:\\OHLC" );

Buy = ( (DateNum() >= 1051225) AND (DateNum() <= 1070330) );

fh = fopen( "C:\\OHLC\\OHLC-" + Name() + ".txt", "a");

if( fh )

 {

   y = Year();

   m = Month();

   d = Day();

   r = Hour();

   e = Minute();

  

 for( i = 0; i < BarCount; i++ )

       {

        if( Buy[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,",

                   r[ i ],e[ i ]);

              fputs( ts, fh );

 

              qs = StrFormat("%.2f,%.2f,%.2f,%.2f,%.0f\n",

                   O[ i ],H[ i ],L[ i ],C[ i ],V[ i ] );

              fputs( qs, fh );

              }

       }

       fclose( fh );

}

 

 

 

__._,_.___

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

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

__,_._,___