Print File Function

Discussion in 'Strategy Development' started by benysl, Jun 8, 2006.

  1. benysl



    does anybody know if I can do this with the print file function

    print(file("c:\test.txt"),"testing 123");

    do something

    print(file("c:\test.txt"),"testing 456");

    do something

    print(file("c:\test.txt"),"testing 789");

    Basically this will out a test.txt. I do not want the line to be appended.

    what I want is basically 1 line for each function that it have perform without appending the file.

    I try to use a filedelete function but it doesnt work as the file is being open so it cannot be deleted.

    Any advise is much appreciated.

    Thank you
  2. Why not hard code a different file name for each line ?
  3. benysl


    oh I should have mention this. I am using Bracket-Trader Automating Trading System

    it basically understand only 1 line or the first line of text and 1 filename also.

    So if the file get appended the 2nd order cannot be send.

    What I want to do is this

    if condition is met

    create the file ... ... (bracket trader will issue the signal as long as this file is created)

    delete file or content of the file

    create the file again same filename (bracket trader will issue next signal)

    ... ...

    any advice
  4. Are you using tradestation to generate the file ?
  5. benysl


    I am using Multicharts to be exact. Multicharts coding and tradestation is the same coding so it will work tradestation support what I want.