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

Re: Fw: FileAppend Function



PureBytes Links

Trading Reference Links

Yo Pete

Well your code worked for me but try something like this and see what
you get . . .

MP=MarketPosition;
If MP<>MP[1] and MP[1]<>0 then begin
       FileAppend( "d:\values4.txt",
       numtostr(Date[1],0)+","+
       numtostr(EntryDate(1),0)+","+
       getsymbolname +","+newline);
end;
If date=lastcalcdate then begin
FileAppend( "d:\values4.txt",
       numtostr(Date[barssinceexit(1)+1],0)+","+
       numtostr(EntryDate(1),0)+","+
       getsymbolname +","+newline);
end;

Later

Pete

Peter Gibson wrote:
> 
> I posted this is a few days ago and didn't see a response.  Hopefully
> someone has an answer.
> 
> >I am printing data with respect to system trades to a CSV file using the
> >FileAppend command.  The code I am using is:
> >
> >MP=MarketPosition;
> >If MP<>MP[1] and MP[1]<>0 then begin
> >       FileAppend( "d:\data\xtra\values4.txt",
> >       numtostr(Date[1],0)+","+
> >       numtostr(EntryDate(1),0)+","+
> >       getsymbolname +","+newline);
> >end;
> >
> >Works great except that data is not sent to the file for the last trade.
> >The trade is closed out before the last bar.  Is this sort of anomoly in
> the
> >FileAppend function?  If so how do I get around it?
> >
> >