Announcement

Collapse
No announcement yet.

Help with correct reporting of dates and times of trades

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

  • Help with correct reporting of dates and times of trades

    Hi, I was wondering if anyone knew how to correctly display when my EFS executes a trade, the date that it made it and the time of the day it made the trade. For use with the Formula Output window so I can see where and when my trades executed.

    I currently have the following:
    PHP Code:
    var Today = new Date(); var Today.getHours(); var Today.getMinutes(); var Today.getSeconds(); 
    Then:

    PHP Code:
    debugPrintln("LONG at: " open() + " on " Today " " ":" ":" " "); 
    I know this is only returning the current date and the most recent time for EVERY trade going back. I've looked at rawtime() but don't understand how to use it to get the correct times and dates. Does anyone have this already written and can share it with me, it's very frustrating to see all my trades come back with the same date and time even when they were executed on different days/times. I feel it's something simple I'm just not understanding.

    Help is much appreciated. Thanks, in advance.

  • #2
    Re: Help with correct reporting of dates and times of trades

    DBBLI
    Use the second(), minute(), hour(), day(), month() and year() functions to retrieve those values from a bar.
    For the description, syntax and examples of the use of these functions see the corresponding articles in the EFS KnowledgeBase
    Alex


    Originally posted by DBBLI
    Hi, I was wondering if anyone knew how to correctly display when my EFS executes a trade, the date that it made it and the time of the day it made the trade. For use with the Formula Output window so I can see where and when my trades executed.

    I currently have the following:
    PHP Code:
    var Today = new Date(); var Today.getHours(); var Today.getMinutes(); var Today.getSeconds(); 
    Then:

    PHP Code:
    debugPrintln("LONG at: " open() + " on " Today " " ":" ":" " "); 
    I know this is only returning the current date and the most recent time for EVERY trade going back. I've looked at rawtime() but don't understand how to use it to get the correct times and dates. Does anyone have this already written and can share it with me, it's very frustrating to see all my trades come back with the same date and time even when they were executed on different days/times. I feel it's something simple I'm just not understanding.

    Help is much appreciated. Thanks, in advance.

    Comment

    Working...
    X