PureBytes Links
Trading Reference Links
|
Here's a portion of my system code that outputs results to a file called
"D:\ts_symbol.prn" where "symbol" is the stock symbol from using the function
getsymbolname. The first statement prints the column headings (ie if the
variable OPT = 0). THe next statement prints the values stored in array
variables.
Regards,
Bill Vedder
{**************************** Start Output
***************************************}
If D = 981210 and PrintOpt = 1 then begin
If OPT = 0 then begin
FileAppend("D:\TS_"+Symbol+".prn", Symbol + ": No. " + ","
+ "DateIn" + ","
+ "DateOut" + ","
+ "L/S" + ","
+ "TradeLen" + ","
+ "DAY1" + ","
+ "DAY2" + ","
+ "DAY3" + ","
+ "DAY4" + ","
+ "DAY5" + ","
+ "MAE" + ","
+ "MFE" + ","
+ "P/L" +","
+ "EnterP" + ","
+ "ExitP" + ","
+ "Dir3D" + ","
{ + "Dir10D" + "," }
+ "Dir20D" + ","
{ + "Dir50D" + "," }
+ "Dir100D" + newline);
{ + "ADX14" + ","
+ "ADXDir" + newline); }
end;
For ii = 0 to tn-1 begin
FileAppend("D:\TS_"+Symbol+".prn",Symbol+" "+ numtostr(ii+1,0) + ","
+ numtostr(TradeEnDate[ii], 0) + ","
+ numtostr(TradeExDate[ii], 0) + ","
+ numtostr(TradeType[ii], 0) + ","
+ numtostr(TradeLen[ii], 0) + ","
+ numtostr(Day1[ii],2) +","
+ numtostr(Day2[ii],2) + ","
+ numtostr(Day3[ii],2) + ","
+ numtostr(Day4[ii],2) + ","
+ numtostr(Day5[ii],2) + ","
+ numtostr(MAE[ii],2) + ","
+ numtostr(MFE[ii],2) + ","
+ numtostr(TradeProfit[ii],2) + ","
+ numtostr(EnPr[ii],3) + ","
+ numtostr(ExPr[ii],3) + ","
+ numtostr(Dir3DMA[ii],3) + ","
{ + numtostr(Dir10DMA[ii],3) + "," }
+ numtostr(Dir20DMA[ii],3) + ","
{ + numtostr(Dir50DMA[ii],3) + "," }
+ numtostr(Dir100DMA[ii],3) + ","
{ + numtostr(ADXLevel[ii],3) + ","
+ numtostr(ADXDir[ii],3) + "," }
+ newline);
end;
Lincoln Fiske wrote:
> Rather than laboriously hand tallying results, I'm trying to create a
> continuous trade-by-trade report for an intraday S&P system that I'm testing
> over numerous contracts. I understand there's a way to do this using the
> fileappend function in TS 4.0, but I can't figure out the protocol. Could
> someone please help me out on this?
>
> Thanks,
> Lincoln
|