Announcement

Collapse
No announcement yet.

Checking EFS output

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Checking EFS output

    I would like to be able to see what my efs is outputting to the broker api on an ongoing basis similar to an audit trail.

    Is there a function I could use or could someone please point me in the corrrect direction if this is possible?

    Thanks in anticipation

  • #2
    I use an audit trail file to track certain actions of all my systems.

    For example, when I fire and order, I can use...

    fWriteAuditTrail("vOrderNumber+","+vOrderAmount+", "+vTriggerType);

    This will result in a CSV/TEXT file that can be loaded into Excel if needed.

    With my code, you'll have to define a variable for the "AuditTrailFile" and handle the "vtDate" variable as you need.

    PHP Code:

    function fWriteAuditTrail(vText) {
    //  debugPrintln("[CT "+Current_Control+" "+getSymbol()+"-"+nRTTimeMin+"]  * Audit Trail * ");
      
    var = new File(AuditTrailFile);
         
    f.open("at");
            
    f.write(vtDate+" "+vText+"\n");
            
         
    f.close();


    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Thanks Brad, this looks like exactly what I am after.

      Presumably you left off this text?

      Code:
      function fWriteCSVFile(vText, Amount) {
      
      var f = new File(CSVFile);
      f.open("at");
      if ((Amount == 0) && (vText[0] == "R")) {
      f.write(vtDate+","+nRTTimeMin+","+getSymbol()+",0,"+Amount+","+vText
      +" \n");
      } else if (Amount >= 0) {
      f.write(vtDate+","+nRTTimeMin+","+getSymbol()+",0,"+Amount+","+vText
      +" \n");
      } else {
      f.write(vtDate+","+nRTTimeMin+","+getSymbol()+","+Amount+",0,"+vText
      +" \n");
      }
      f.close();
      
      }

      Comment


      • #4
        that example you posted is from code I use to track the "breadcrumbs" of a trading system. It includes "if" statements to parse the text that is generated from my trading system template (automated trading template).

        If you want to use it you can, but you need to restructure the function to handle whatever you are trying to write out to the file.

        Also, creating a CSV or TEXT file is up to you.

        B
        Brad Matheny
        eSignal Solution Provider since 2000

        Comment

        Working...
        X