Announcement

Collapse
No announcement yet.

how to get data for a particular hour over the last 20 days.

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

  • how to get data for a particular hour over the last 20 days.

    Can anyone suggest a better way?

    I am working on an efs that:
    1) Runs on the 15 minute chart.
    2) Displays the average range (high-low) for the corresponding hour, over the last 20 days.
    For example, for the candles on 28 May at 09:00, 09:15, 09:30 and 09:45, the efs would go and find the high minus low of 09:00 to 09:59 for each day from 7May though 27May, then average them out, and display them.

    So far, the only way I can see of doing this is to use getValueAbsolute("rawtime") to find the right bar index, specifying the symbol of getSymbol()+",60" to access the hourly data, then use getValueAbsolute("high") and "low" to get the values.
    I'm having trouble syncronising to the right bars and wondered if there might be an easier way to do this.

    Any suggestions gratefully received.
    Thanks.
Working...
X