Retrieve values for “currently viewed timeframe” and base indicator of values

Forums ProRealTime English forum ProBuilder support Retrieve values for “currently viewed timeframe” and base indicator of values

Currently, there are 0 users and 1 guest visiting this topic.
View all attachments
Viewing 4 posts - 1 through 4 (of 4 total)
  • #168728 Report

    Hey!

     

    As the title goes, i want to retrieve the timeframe i am currently viewing to impact the calculation of an indicator, so its input values changes depending on wether im looking at a weekly,daily,1h or other timeframe chart. TradingView has this feature whereas you enter for example “timeframe.isdaily” and then IF the current chart is on a daily timeframe, the values followed are returned true.

     

    I have been looking at PRTs “TIMEFRAME” but that seems to be the other way around.

    I want to complete the following more or less:

    X=value i want changed depending on currently VIEWED timeframe in PRT.

    If dailytimeframe then X=20

    if weeklytimeframe then X=52

    if H1 timeframe then x=120

    else

    x=240

    …for starters.

     

    anyone has a smart code/idea that isnt to cpu-consuming that retrieves the currently viewed timeframe?

     

    Thanks!

    Viktor

    #168740 Report
    #168748 Report

    thx for suggestion!

    however 150-200+ lines for this is a no go…

    #168750 Report

    250 lines?! I can’t understand where that number comes from!

    Nicolas’code is 12 lines (without comments) and Vonasi’s code is 91 lines!

Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login