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

Re: Fw: FileAppend Function



PureBytes Links

Trading Reference Links

Last trade means the last trade in a series.  I want my FileAppend to work
on the bar after the system goes long to short, long to flat, short to long
or short to flat.  Last bar just refers to last bar of the price series.  In
the case of this particular system the last trade is closed before the last
bar because I have have inserted code to close out the last trade based on a
date condition.

Note that If MP[1] <> 0 and MP = 0 does not work in the case where the
system goes directly from being long to short or vice versa.



-----Original Message-----
From: Ron Augustine <RonAug@xxxxxxxx>
To: Peter Gibson <Peter_Gibson@xxxxxxxxxxxxxx>; omega-list@xxxxxxxxxx
<omega-list@xxxxxxxxxx>
Date: May 25, 1998 11:30 AM
Subject: Re: Fw: FileAppend Function


>
>Your references to "last trade" and "last bar" are ambiguous -- do you mean
>"last" to indicate the previous trade, or the "final" trade in a series? -
>or something else?
>
>If you would specify exactly what event you wish to trigger the FileAppend,
>it would be easier to figure out what you're trying to do and what action
>needs to be taken.
>
>If you're trying to send the data to the file when the trade is closed out,
>you could use:
>
>If MP[1] <> 0 and MP = 0 then...
>
>If, however, the trade is closed out on the final bar of the chart, the
data
>would not be sent to the file because MP would not be zero until the next
>bar following the bar where the trade was closed.
>
>------------------------------------
>At 10:59 AM 5/25/98 -0700, you 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?
>>>
>>>
>>
>>
>>
>
>
>
>
>