PureBytes Links
Trading Reference Links
|
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?
>>
>>
>
>
>
|