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

Re: print or fileappend help?



PureBytes Links

Trading Reference Links




David,

	This should work fine...

>
>  I created an indicator based on a multidata chart. I would like to write
>a program to have these same values printed to a file, but have not been
>able to get either a print statement or a fileappend statement to work.
>Anyone have any ideas? (My code is below.)
>
>Thanks,
>David Cicia
>
>Vars: Copen(0), Chigh(0), Clow(0), Cclose(0);
>
>Copen = open of data1 - open of data2;
>chigh = high of data1 - low of data2;
>clow = low of data1 - high of data2;
>cclose = close of data1 - close of data2;
>
>Plot1(copen,"");
>Plot2(chigh,"");
>Plot3(clow,"");
>Plot4(cclose,"");
>
>

{ Print Log Window }
Print (Date:6:0, ", ", Time:5:0, ", ",
       COpen, ", ", CHigh, ", ", CLow, ", ", CClose) ;

{ Disk file - transitory }
Print (File ("C:\Temp\MyFile.CSV"),
       Date:6:0, ", ", Time:5:0, ", ",
       COpen, ", ", CHigh, ", ", CLow, ", ", CClose) ;

{ Disk File - persistant }
Vars  : st ("") ;

st = Text (Date:6:0, ", ", Time:5:0, ", ",
           COpen, ", ", CHigh, ", ", CLow, ", ", CClose) ;

FileAppend ("C:\Temp\MyFile.CSV", st) ;


    Samuel K. Tennis      VISTA Research and Trading, Inc.
    8103 Camino Real C-409          voice: 1(305) 273-1321
    S. Miami, FL  33143               fax: 1(305) 273-9164
    skt@xxxxxxxxx                    http://www.vista.com/
           ***** Easy Language Spoken Here *****