Feature to Return Current Timeframe

Optuma Forums Optuma Feature Requests Feature to Return Current Timeframe

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #60931
    • Topics: 1
    • Replies: 0
    • Posts: 1

    Provide a script function that provides the timeframe of the current chart. This feature will be very helpful and enable certain actions or features be triggered depending on the different timeframes.

    The system currently has Security() that returns the security of the chart. I’m looking for something like Timeframe() that would return the timeframe accordingly.

    As a background, the reason I’m requesting this feature because I’m writing a 3 MAs indicator that dynamically adjusts the periods based on 3 timeframes: current and 2 higher timeframes. It seems impossible to have write this indicator without knowing the current timeframe.

    Thank you.

    • Topics: 40
    • Replies: 1,965
    • Posts: 2,005

    Hi Peter,

    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.

    All the best


Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest