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

RE: Problems with Fileappend and Trade Export Code for TS 2000i


  • To: "Dmitri Tolstonogov" <omega-list@xxxxxxxxxx>
  • Subject: RE: Problems with Fileappend and Trade Export Code for TS 2000i
  • From: "MCMIG" <mcmig@xxxxxxxx>
  • Date: Wed, 9 Jan 2002 00:43:17 -0800
  • In-reply-to: <AHEKJDIMCMLKDMLPKPHCMEMACEAA.dt@xxxxxxxxxxxxxx>

PureBytes Links

Trading Reference Links

Thank you for your reply Dmitri, but unfortunately that did not work.  I
still get the same trades exported.  Any other ideas.

RVM

-----Original Message-----
From: Dmitri Tolstonogov [mailto:dt@xxxxxxxxxxxxxx]
Sent: Wednesday, January 09, 2002 2:49 AM
To: MCMIG
Subject: RE: Problems with Fileappend and Trade Export Code for TS 2000i




-----Original Message-----
From: MCMIG [mailto:mcmig@xxxxxxxx]
Sent: Wednesday, January 09, 2002 9:55 AM
To: Omega List
Subject: Problems with Fileappend and Trade Export Code for TS 2000i


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 problem is BarsSinceExit(1) = 1 condition
Replace both export conditions the following:

Var: TotTr(0);
TotTr = TotalTrades;
If TotTr > totTr[1] then
   Fileappend(...


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;