If you follow volume profile or TPO or the combo of the two MonkeyBars on thinkorswim, you probably notice thinkorswim does not show the time periods with alpha characters.
This study shows time periods A through M as pictured below.
Link to Flex Grid with the study (you get source code with that too)
https://tos.mx/Iq1q2RX
Source
This study shows time periods A through M as pictured below.
Link to Flex Grid with the study (you get source code with that too)
https://tos.mx/Iq1q2RX
Source
Code:
#
#AlphaTimePeriods
#
# Author: Kory Gill, @korygill
#
#
declare upper;
declare hide_on_daily;
declare once_per_bar;
#
# You can turn off everything if you want or when you're done using it.
#
input showAlphaTimePeriods = yes; #hint showAlphaTimePeriods: if no, hides the AlphaTimePeriods study
input showTodayOnly = yes;
input timeOffsetFromEST = -300; #hint timeOffsetFromEST: 24-hour time offset from EST (-300 for PST)
DefineGlobalColor("A", CreateColor(255, 255, 0));
DefineGlobalColor("BtoEOD", CreateColor(128, 128, 0));
def aggPeriod = GetAggregationPeriod();
def isToday = GetDay() == GetLastDay();
def showPlot = if (aggPeriod <= AggregationPeriod.THIRTY_MIN) and
(showTodayOnly == no or isToday)
then 1
else 0;
def startTime = 0630 - timeOffsetFromEST;;
AddVerticalLine(
showPlot and SecondsFromTime(startTime) == 60 * 0,
"A",
GlobalColor("A"));
AddVerticalLine(
showPlot and SecondsFromTime(startTime) == 60 * 30,
"B",
GlobalColor("BtoEOD"));
AddVerticalLine(
showPlot and SecondsFromTime(startTime) == 60 * 60,
"C",
GlobalColor("BtoEOD"));
AddVerticalLine(
showPlot and SecondsFromTime(startTime) == 60 * 90,
"D",
GlobalColor("BtoEOD"));
AddVerticalLine(
showPlot and SecondsFromTime(startTime) == 60 * 120,
"E",
GlobalColor("BtoEOD"));
AddVerticalLine(
showPlot and SecondsFromTime(startTime) == 60 * 150,
"F",
GlobalColor("BtoEOD"));
AddVerticalLine(
showPlot and SecondsFromTime(startTime) == 60 * 180,
"G",
GlobalColor("BtoEOD"));
AddVerticalLine(
showPlot and SecondsFromTime(startTime) == 60 * 210,
"H",
GlobalColor("BtoEOD"));
AddVerticalLine(
showPlot and SecondsFromTime(startTime) == 60 * 240,
"I",
GlobalColor("BtoEOD"));
AddVerticalLine(
showPlot and SecondsFromTime(startTime) == 60 * 270,
"J",
GlobalColor("BtoEOD"));
AddVerticalLine(
showPlot and SecondsFromTime(startTime) == 60 * 300,
"K",
GlobalColor("BtoEOD"));
AddVerticalLine(
showPlot and SecondsFromTime(startTime) == 60 * 330,
"L",
GlobalColor("BtoEOD"));
AddVerticalLine(
showPlot and SecondsFromTime(startTime) == 60 * 360,
"M",
GlobalColor("BtoEOD"));
AddVerticalLine(
showPlot and SecondsFromTime(startTime) == 60 * 390,
"EOD",
GlobalColor("BtoEOD"));
#
# End of script
#