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

Re: FileAppend Issue



PureBytes Links

Trading Reference Links

On Wed, 31 Jul 2002, DarrenJM@xxxxxxx wrote:

> I am having TS6 append data to a file using the fileappend feature and that of a numtostr. The problem is that I don't want it to append for every value thats true on my condition everytime, but just the most recent occurence. Can I do this through my append feature or do I need to alter the function within it to only compute the most recent figure. 
> 
> here is an example of what I currently have:
> if MyFunction>=-99999 then
> FileAppend("c:\mydata.txt", "my is= " + NumToStr(myfunction, 2) + 
> NewLine);
> 
> I always want myfunction to append to a file so that is why I am using that extreme low value but where do I need to change it to only append the most current data (i.e.: todays close).
> 
> If I have to take the to route of changing the original function ("myfunction") where would I tell it to only calculate todays value (the function is a combination of different mathematical functions using past data). using myfunction(close,0) does not work for me because it was not created using any inputs.
> 

Would it work for you to do:

if LastBarOnChart and MyFunction >= LowValue then ....

Mike