OPEN-SOURCE SCRIPT

Time of Day Levels

78
This is an indicator to plot a level that corresponds to a particular time of day (hour and minute) and draw that level as a horizontal line, with text tag, as far through the rest of the day as desired. It is common to plot midnight open and cash market open as levels, but this will give you the ability to plot for other times as well, useful for some trading strategies.

The historically difficult thing to do has been plotting for times that fall in the middle of a time bar, like if you wanted to plot the level for 9:53 on a 5 minute chart. When the level does not correspond to beginning or end of a chart's bar, the code will look back up to 15 minutes into the middle of the bar to find the level. So, it will work will for time bars up to 15 minutes, but may not show the level for larger time bars.

Note: This has not been tested for charts that don't use fixed time bars

For up to 10 time levels, you can specify the following:
  • Hour: An integer specifying the desired hour in 24 hour format
  • Minute: An integer specifying the desired minute in that hour
  • Use Close: If checked will spot the closing value of the specified 1 minute time, otherwise will show the opening value
  • Tag Text: Text to show to the right of the horizontal line plots for the time level
  • Extend Minutes: How long, in minutes, to extend the line from the specified time. If set to 0 or 1440, the line will just always be updated to the current day
  • Color - Style - Width: Specifies the style for the plotted horizontal line

For the text tags, you can specify the following:
  • Color: The color for all text tags, unless choosing to use the individual line colors
  • Size: Size of text tags
  • Offset: The number of bars to the right of the plotted horizontal line before showing the text tag. A value of 0 will place it right next to the horizontal line
  • Use Line Color: Instead of using the Text Tag Color, text tags will be drawn in the same color as the horizontal line
  • Show Level: When checked, the price level will be printed to the right of the text tag in parentheses

In Other Settings, you can also force the times to be interpreted as Eastern Standard Time, accounting for daylight savings. Otherwise, local chart time will be used

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.