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

Re: [amibroker] Re: Helper duudes: Whadya say let's work up a to do list for...



PureBytes Links

Trading Reference Links









<span lang=EN-AU
>Use the \n as you do in the plot titles, here is an
example from my data export formula

<font size=2 color=black
face="Courier New">fh = <span
lang=EN-AU >fopen<font size=2 color=black
face="Courier New">( <span
lang=EN-AU >"c:\\SaveData\\"<font size=2
color=black face="Courier New">+<font size=2
color=blue face="Courier New">Name<font
size=2 color=black face="Courier New">()+<font size=2
color=darkred face="Courier New">".txt"<font
size=2 color=black face="Courier New">, <font size=2
color=darkred face="Courier New">"w"<font
size=2 color=black face="Courier New">); 

<font size=2 color="#7b7bc0"
face="Courier New">if<font size=2 color=black
face="Courier New">( fh ) 

<font size=2 color=black
face="Courier New">{ 

<font size=2 color=black
face="Courier New">   <span
lang=EN-AU >fputs<font size=2 color=black
face="Courier New">( <span
lang=EN-AU >"Ticker,Date,Time,Open,High,Low,Close,Volume \n"<font
size=2 color=black face="Courier New">, fh ); 

<font size=2 color=black
face="Courier New">   y = <span
lang=EN-AU >Year<font size=2 color=black
face="Courier New">(); 

<font size=2 color=black
face="Courier New">   m = <span
lang=EN-AU >Month<font size=2 color=black
face="Courier New">(); 

<font size=2 color=black
face="Courier New">   d = <span
lang=EN-AU >Day<font size=2 color=black
face="Courier New">(); 

<font size=2 color=black
face="Courier New">   r = <span
lang=EN-AU >Hour<font size=2 color=black
face="Courier New">();

<font size=2 color=black
face="Courier New">   e = <span
lang=EN-AU >Minute<font size=2 color=black
face="Courier New">();

<font size=2 color=black
face="Courier New">   n = <span
lang=EN-AU >Second<font size=2 color=black
face="Courier New">();

<font size=2 color=black
face="Courier New">   

<font size=2 color=black
face="Courier New">   <span
lang=EN-AU >for<font size=2 color=black
face="Courier New">( i = <font size=2 color=fuchsia
face="Courier New">0<font size=2 color=black
face="Courier New">; i < <span
lang=EN-AU >BarCount<font size=2 color=black
face="Courier New">; i++ ) 

<font size=2 color=black
face="Courier New">   { 

<font size=2 color=black
face="Courier New">      <span
lang=EN-AU >fputs<font size=2 color=black
face="Courier New">( <span
lang=EN-AU >Name<font size=2 color=black
face="Courier New">() + <span
lang=EN-AU >","<font size=2 color=black
face="Courier New"> , fh );

<font size=2 color=black
face="Courier New">      ds = <font size=2 color=blue
face="Courier New">StrFormat<font size=2
color=black face="Courier New">(<font size=2
color=darkred face="Courier New">"%02.0f-%02.0f-%02.0f,"<font
size=2 color=black face="Courier New">, 

<font size=2 color=black
face="Courier New">                     y[ i ], m[ i ], d[ i ] ); 

<font size=2 color=black
face="Courier New">      <span
lang=EN-AU >fputs<font size=2 color=black
face="Courier New">( ds, fh ); 

<font size=2 color=black
face="Courier New">     

<font size=2 color=black
face="Courier New">      ts = <font size=2 color=blue
face="Courier New">StrFormat<font size=2
color=black face="Courier New">(<font size=2
color=darkred face="Courier New">"%02.0f:%02.0f:%02.0f,"<font
size=2 color=black face="Courier New">, 

<font size=2 color=black
face="Courier New">                     r[ i ],e[ i ],n[ i ] ); 

<font size=2 color=black
face="Courier New">      <span
lang=EN-AU >fputs<font size=2 color=black
face="Courier New">( ts, fh ); 

<font size=2 color=black
face="Courier New"> 

<font size=2 color=black
face="Courier New">      qs = <font size=2 color=blue
face="Courier New">StrFormat<font size=2
color=black face="Courier New">(<font size=2
color=darkred face="Courier New">"%.4f,%.4f,%.4f,%.4f,%.0f\n"<font
size=2 color=black face="Courier New">, 

<font size=2 color=black
face="Courier New">                     <font size=2 color=red
face="Courier New">O<font size=2 color=black
face="Courier New">[ i ],<span
lang=EN-AU >H<span
lang=EN-AU >[ i
],<span lang=EN-AU
>L<font
size=2 color=black face="Courier New">[ i ],<font size=2
color=red face="Courier New">C<font
size=2 color=black face="Courier New">[ i ],<font size=2
color=red face="Courier New">V<font
size=2 color=black face="Courier New">[ i ] ); 

<font size=2 color=black
face="Courier New">      <span
lang=EN-AU >fputs<font size=2 color=black
face="Courier New">( qs, fh ); 

<font size=2 color=black
face="Courier New">   } 

<font size=2 color=black
face="Courier New"> 

<font size=2 color=black
face="Courier New">   <span
lang=EN-AU >fclose<font size=2 color=black
face="Courier New">( fh ); 

<font size=2 color=black
face="Courier New">} 

<font size=2 color=black
face="Courier New"> 

<font size=2 color=red
face="Courier New">Buy<font size=2 color=black
face="Courier New"> = <span
lang=EN-AU >V<span
lang=EN-AU >><font
size=2 color=fuchsia face="Courier New">0<font
size=2 color=black face="Courier New">;

<span lang=EN-AU
> 

<span lang=EN-AU
>Cheers,

<span lang=EN-AU
>Graham

<span lang=EN-AU
>http://e-wire.net.au/~eb_kavan/

<span lang=EN-AU
> 

-----Original
Message-----
From: ceesvh [mailto:cees-vanhall@xxxxxxxxxxx] 
Sent: Monday, April 05, 2004 8:01 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] separate lines using fputs

<span lang=EN-AU
> 

<span lang=EN-AU
>Hello,

<span lang=EN-AU
> 

<span lang=EN-AU
>While using AB realtime I want to write the values of
certain 

<span lang=EN-AU
>variables to a file.  the afl code is the following:

<span lang=EN-AU
> 

<span lang=EN-AU
>FilePath="Logfile.txt";

<span lang=EN-AU
>FileHandle=fopen(FilePath,"a");

<span lang=EN-AU
>fputs(Text,FileHandle);

<span lang=EN-AU
>fclose(FileHandle);

<span lang=EN-AU
> 

<span lang=EN-AU
>Each time a new tickprice is received the text is
written to the 

<span lang=EN-AU
>logfile but is concatenated into one string. The text
is about 20 

<span lang=EN-AU
>characters. I would like to add a carriage return
linefeed so each 

<span lang=EN-AU
>text appears on a separate line, making it possible to
import the 

<span lang=EN-AU
>file in excel. I have tried to include the ascii
values of CR and 

<span lang=EN-AU
>LF  adding "^M^J" at the end of the text,
but these 

<span lang=EN-AU
>controlcharacters are treated as normal text.

<span lang=EN-AU
> 

<span lang=EN-AU
>Can anyone help me to solve this problem.    

<span lang=EN-AU
> 

<span lang=EN-AU
>thanks

<span lang=EN-AU
> 

<span lang=EN-AU
>cees

<span lang=EN-AU
> 

<span lang=EN-AU
> 

<span lang=EN-AU
> 

<span lang=EN-AU
>Send BUG REPORTS to bugs@xxxxxxxxxxxxx

<span lang=EN-AU
>Send SUGGESTIONS to suggest@xxxxxxxxxxxxx

<span lang=EN-AU
>-----------------------------------------

<span lang=EN-AU
>Post AmiQuote-related messages ONLY to:
amiquote@xxxxxxxxxxxxxxx 

<span lang=EN-AU
>(Web page:
http://groups.yahoo.com/group/amiquote/messages/)

<span lang=EN-AU
>--------------------------------------------

<span lang=EN-AU
>Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

<span lang=EN-AU
>Yahoo! Groups Links

<span lang=EN-AU
> 

<span lang=EN-AU
><*> To visit your group on the web, go to:

<span lang=EN-AU
>     http://groups.yahoo.com/group/amibroker/

<span lang=EN-AU
> 

<span lang=EN-AU
><*> To unsubscribe from this group, send an
email to:

<span lang=EN-AU
>     amibroker-unsubscribe@xxxxxxxxxxxxxxx

<span lang=EN-AU
> 

<span lang=EN-AU
><*> Your use of Yahoo! Groups is subject to:

<span lang=EN-AU
>     http://docs.yahoo.com/info/terms/

<span lang=EN-AU
> 






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 the Yahoo! Terms of Service.