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

Re: FileAppend - generates many duplicate entries -???



PureBytes Links

Trading Reference Links

Try clearing the debug window first:

         If barnumber = 1 then cleardebug;


At 12:01 PM 7/29/02 -0500, you wrote:
>On Mon, 29 Jul 2002, Ian MacAuslan wrote:
>
> > I've written a simple piece of code to just copy out to a disk file the
> > P&L of a trade whenever a trade is closed out.  It appears there is a
> > bug somewhere--or perhaps I'm not doing something quite right.  Executed
> > on the bar immediately following a position being closed out, It should
> > write out simply the symbolname and the P&L of that last
> > trade...Instead, I get many duplicate lines, though not apparently any
> > particular number of duplicates.
> >
> > Here is the code, which I paste into the bottom my strategy--any
> > strategy, take one of the canned ones from TradeStation:
> > =====
> > vars: MP(0), plstring("");
> >
> > MP = MarketPosition;
> >
> > if MP = 0 and MP[1] <> 0 then begin
> >    plstring = GetSymbolName + ", " + PositonProfit(1) + NewLine;
> >    FileAppend("c:\mytrades.txt", plstring);
> > end;
> > =====
>
>take off the 'update on every tick' property

Bill Brower
Email: 1000mileman@xxxxxxxxxxxxxx
Web Site: http://www.insideedge.net
Web Site: http://www.portfolioriskanalysis.com