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

Re: [amibroker] question about Exponential moving average in Price chart



PureBytes Links

Trading Reference Links

1) the 'large number' is the number of days since 1/1/1900 or thereabouts.

2) RE changing your date format: see the attached where I have done just
that (with Excel 97, no less!) via Format | Cells | Category: Custom (and
then just put in the Type field: 'm/d/yy', 'y/d/m', or 'd-m-yyyy')

HTH,

-john
PS: I also included the CSV file created from the XLS file, via Save As
----- Original Message ----- 
From: "ronbo" <ronbo@xxxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, March 15, 2004 5:57 PM
Subject: RE: [amibroker] I have a problem with Export .csv and Import Wizard


Thanks Graham.

when i make the Excel column text, it changes it to a large number--like
1/3/2000 is = to 36528.  if i spread the column out, i see no extra
data--just 1/3/2000.  in my version of Excel (Office 2k) i can not change
the format to YMD or YDM.  i think my problem has been Excel---the format as
it appears is 1/3/2000 EVEN though the AB Exported it was 2000-1-3.  IF i
edit it using Notepad, it all works fine.  So, as you suggest, Excel changes
the format, so AB Import does not work correctly.

I'll play with your code and see if i can get it to work. could you please
tell me how to run it???

thanks again,
ron




-----Original Message-----
From: Graham [mailto:gkavanagh@xxxxxxxxxxxxx]
Sent: Monday, March 15, 2004 4:20 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] I have a problem with Export .csv and Import
Wizard


In excel you may need to change the date to become text. There seems
something in the exporting to csv file that creates a datestamp with time as
well as date that cannot be re-imported. At least I found happens.

Maybe try this as your data saver

fh = fopen( "c:\\SaveData\\"+Name()+".txt", "w");
if( fh )
{
   fputs( "Ticker,Date,Time,Open,High,Low,Close,Volume \n", fh );
   y = Year();
   m = Month();
   d = Day();

   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 );

      qs = StrFormat("%.4f,%.4f,%.4f,%.4f,%.0f\n",
                     O[ i ],H[ i ],L[ i ],C[ i ],V[ i ] );
      fputs( qs, fh );
   }

   fclose( fh );
}

Buy = 1;

Cheers,
Graham
http://e-wire.net.au/~eb_kavan/

-----Original Message-----
From: ronbo [mailto:ronbo@xxxxxxxxxxxxxx]
Sent: Tuesday, March 16, 2004 8:03 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] I have a problem with Export .csv and Import Wizard

thanks Graham for the reply,
i know there is a Quote Editor--i mentioned that in my 1st email..  there is
something wrong with my Import, and i would like to get it fixed.

thanks,
ron



-----Original Message-----
From: Graham [mailto:gkavanagh@xxxxxxxxxxxxx]
Sent: Monday, March 15, 2004 2:40 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] I have a problem with Export .csv and Import
Wizard


If you only need to change a few numbers you could do that in quote editor
within AB


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.619 / Virus Database: 398 - Release Date: 3/10/2004



Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links








Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links






---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.619 / Virus Database: 398 - Release Date: 3/10/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.619 / Virus Database: 398 - Release Date: 3/10/2004




Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links






------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/
 

Attachment:
date_format.csv
Description: Binary data
Attachment:

Attachment: Description: "Description: MS-Excel spreadsheet"

Attachment: Description: "date_format.xls"