0

Is there a way to make 4 hour (240 minutes) display the monthly level? I have 15 minutes displaying Daily level and every other minutes displaying weekly level, but I want 240minutes or above to be displaying monthly level if possible. My code is below that I am using

get_pivot_resolution() =>
    resolution = "M"
    if pivot_time_frame == AUTO
        if timeframe.isintraday
            resolution := timeframe.multiplier <= 15 ? "D" : "W"
        else if timeframe.isweekly or timeframe.ismonthly
            resolution := "12M"
Philo
  • 5
  • 2

1 Answers1

0
get_pivot_resolution() =>
    resolution = "M"
    if pivot_time_frame == AUTO
        if timeframe.isintraday and timeframe.multiplier <= 15
            resolution := "D"
        else if timeframe.isintraday and timeframe.multiplier >= 15 and timeframe.multiplier < 240
            resolution := "W"
        else if (timeframe.isintraday and timeframe.multiplier >= 240) or timeframe.isdaily
            resolution := "M"
        else if timeframe.isweekly or timeframe.ismonthly
            resolution := "12M"
rumpypumpydumpy
  • 3,435
  • 2
  • 5
  • 10