How to Use a Custom Variable for TIMEFRAME in ProRealTime?

Forums ProRealTime English forum ProBuilder support How to Use a Custom Variable for TIMEFRAME in ProRealTime?

Viewing 1 post (of 1 total)
  • #244935

    I’m trying to set a custom tick timeframe dynamically in ProRealTime using the TIMEFRAME() function. However, I found that TIMEFRAME((timeFrame) tick, UPDATEONCLOSE) does not work when timeFrame is a variable.

    I also tried using conditional statements like:

    IF timeFrame = 100 THEN

    TIMEFRAME(100 tick, UPDATEONCLOSE)

    ENDIF
    IF timeFrame = 300 THEN

    TIMEFRAME(300 tick, UPDATEONCLOSE)

    ENDIF

    But that didn’t work either.

    Is there any way to pass a variable to TIMEFRAME() or dynamically change the timeframe without manually editing the script? If not, what’s the best workaround?

    Thanks in advance for any help! 🚀

Viewing 1 post (of 1 total)

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