Announcement

Collapse
No announcement yet.

Ticker time and back testing

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

  • Ticker time and back testing

    Hello,

    I am trying to create a study that uses a timer, which I have done in real time and it works great using JavaScripts date math off of Date().getTime(), but this does not allow me to back test as I need my times for the timer to relate to the time data of the charts.

    I found something called rawtime() which is based on the current price bar. I am trying to use this but am getting some odd results.

    Does anybody know of a good timer to use in efs that will work on the timeline of the chart and therefore work in back testing?

    Thanks

  • #2
    bobio
    Unless I misunderstood what you are trying to do you could use bar time in back testing ie getHour(), getMinute(), etc. You can find more information on these functions in the EFS KnowledgeBase under EFS2 Function Reference -> Series Functions
    Alex

    Comment


    • #3
      timer

      Hi I tried rawtime() because I am trying to detect a time interval in x seconds. My example is that once the MACD signal crosses the MACD it will wait x number of seconds before trying to execute a long or short. For some strange reason it works in real time, but not in back testing?

      Comment


      • #4
        bobio
        In back testing an efs executes only once per bar so when a signal is triggered there is no way to measure the time elapsed within a bar.
        Alex

        Comment

        Working...
        X