0

I am curious if there is a way to specify certain date and time ranges , for example Jan 1, 2023 12:00 - 14:30 , the range would be on the same day and only be within a 30 minute fixed distance.

Looking at docs and examples I am able to specify time, but I need to specify multiple dates and time ranges for backtesting, as well as to hardcode in the future.

Here is how I managed to specify a time range

timezone = input.string("UTC-7", "Timezone")
inSession = not na(time(timeframe.period, "2130-0800", timezone))

This is a current attempt , but did not seem to show any change. Here I chose to create and color columns instead of background.

var int     myDate  = input.time(timestamp("7 June 2023 00:00-08:00"), 'Choose date/time')
var color   myColor = color.new(color.blue,70)

plot(low,"Background Color", myDate == time ? myColor :na,style = plot.style_columns)

0 Answers0