- Topics: 32
- Replies: 1,600
- Posts: 1,632
We can add the TimeFrame on the chart using a Chart Element tool but I can see no way to access that in the DataField() function. It looks like we are filtering that out in the scripting. We’ll have a look at that as it should not be a hard thing to remove that filter.
It will be part of the next major update early next year.
One thing you can do is look at the difference between the BarDates on the chart.
b1 = BARDATE();
diff = b1 - b1;
IsWeekly = if(diff > 5, True, False);
// Use 5 so that Easter with Good Friday and Easter Monday holidays (ok that is only in Australia) does not change it to weekly.
All the best