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
    Posts
  • #60931
    AvatarPeter
    • 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.

    • This topic was modified 3 weeks, 3 days ago by AvatarPeter Nguyen.
    #60953
    MathewMathew
    • Topics: 32
    • Replies: 1,600
    • Posts: 1,632

    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

    Mathew

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

Pin It on Pinterest

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close