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

[amibroker] export data into ascii file



PureBytes Links

Trading Reference Links

hi, i found and modified the following formula, but when i try to
export some row has different value of open, high, low, close. Someone
can help me in fix it?
thank you

fh = fopen( "D:\\Amibroker\\TXT\\"+Name()+".csv", "w" );
if( fh )
{
  fputs("Symbol,Date,Time,Open,High,Low,Close,Volume\n", fh );
  dn = DateNum();
  tn = TimeNum();
 
  for( i = 0; i < BarCount; i++ )
  {
   Line = Name() +
   StrFormat(",%06.0f,%06.0f,%g,%g,%g,%g,%g\n",
   dn[ i ] % 1000000,
   tn[ i ],
   Open[ i ],
   High[ i ],
   Low[ i ],
   Close[ i ],
   Volume[ i ] );  
   fputs( Line, fh );
  }
   fclose( fh );
}

Buy=Sell=Short=Cover=0; // for scan
Filter = Status("lastbarinrange");
AddTextColumn("Export done", "Status");



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