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

Problems with Fileappend and Trade Export Code for TS 2000i


  • To: "Omega List" <omega-list@xxxxxxxxxx>
  • Subject: Problems with Fileappend and Trade Export Code for TS 2000i
  • From: "MCMIG" <mcmig@xxxxxxxx>
  • Date: Tue, 8 Jan 2002 23:04:02 -0800

PureBytes Links

Trading Reference Links

Hello members of the Omega List:

I need some help with Easy Language.  I am trying to add the following code
(found below) to some of the systems (signals) that I use in 2000i so that
my closed out trades will be exported into a single file for use in other
applications.  The information I am trying to export is the entry date, the
exit date, long or short position, and the profit or loss of the closed out
trade. This is kind of like the export feature that TS 4.0 used to have, but
that was eliminated in 2000i.  But I seem to be encountering a problem where
some trades do not get exported.  It seems that if one trade in a market
exits and then reenters on the same day, then the first trade does not get
exported.  The system that I use is an end of day system that uses end of
day data.  Does anyone know what the problem may be. Any help would be
greatly appreciated.  Thank you.

RM



var: indate(0);
var: outdate(0);
var: minoutdate(0840101);

if marketposition(1) <> 0 then begin
 if BarsSinceExit(1) = 1 then begin
  indate = entrydate(1);
  outdate = exitdate(1);
  if outdate >= minoutdate then begin
   Fileappend("c:\filename.txt", numtostr(indate,0) + "," +
numtostr(outdate,0) + "," + numtostr(MarketPosition(1),0) + ","+
numtostr(positionprofit(1), 2) + newline);
  end;
 end;
end;