Hi
I'm looking for a script that will plot vertical lines at 5 spesific times (e.g 9AM 10AM 11AM 12AM 15PM within the day)
each with its own color
each with its own lable
that would appear daily and also backwards (on previous days when teh timefrae allows it.
any asistance would be appreciated
TIA
Here's one, it has a few more time slots but you can modify/delete to your liking.
# Declare lower;
input showlabels = yes;
# AddLabel(showlabels and SecondsFromTime(1000) >= 0 and SecondsTillTime(1005) > 0, "10", Color.orange);
# AddLabel(showlabels and SecondsFromTime(1030) >= 0 and SecondsTillTime(1035) > 0, "1030", Color.light_GRAY);
# AddLabel(showlabels and SecondsFromTime(1100) >= 0 and SecondsTillTime(1101) > 0, "11", Color.light_GRAY);
# AddLabel(showlabels and SecondsFromTime(1200) >= 0 and SecondsTillTime(1201) > 0, "1200", Color.red);
# AddLabel(showlabels and SecondsFromTime(1300) >= 0 and SecondsTillTime(1301) > 0, "1300", Color.green);
# AddLabel(showlabels and SecondsFromTime(1330) >= 0 and SecondsTillTime(1401) > 0, "1330", Color.light_GRAY);
# AddLabel(showlabels and SecondsFromTime(1400) >= 0 and SecondsTillTime(1431) > 0, "1400", Color.orange);
# AddLabel(showlabels and SecondsFromTime(1430) >= 0 and SecondsTillTime(1501) > 0, "1430", Color.orange);
# AddLabel(showlabels and SecondsFromTime(1500) >= 0 and SecondsTillTime(0831) > 0, "1500", Color.light_GRAY);
# AddLabel(showlabels and SecondsFromTime(1530) >= 0 and SecondsTillTime(1501) > 0, "1530", Color.light_GRAY);
# AddLabel(showlabels and SecondsFromTime(1548) >= 0 and SecondsTillTime(1501) > 0, "1548", Color.light_GRAY);
input showverticals = yes;
AddVerticalLine(showverticals and SecondsFromTime(1000) == 0, "10", Color.orange);
AddVerticalLine(showverticals and SecondsFromTime(1030) == 0, "1030", Color.LIGHT_GRAY);
AddVerticalLine(showverticals and SecondsFromTime(1100) == 0, "11", Color.LIGHT_GRAY);
AddVerticalLine(showverticals and SecondsFromTime(1200) == 0, "12", Color.red);
AddVerticalLine(showverticals and SecondsFromTime(1230) == 0, "1230", Color.LIGHT_GRAY);
AddVerticalLine(showverticals and SecondsFromTime(1300) == 0, "1300", Color.green);
AddVerticalLine(showverticals and SecondsFromTime(1330) == 0, "1330", Color.LIGHT_GRAY);
AddVerticalLine(showverticals and SecondsFromTime(1400) == 0, "1400", Color.orange);
AddVerticalLine(showverticals and SecondsFromTime(1430) == 0, "1430", Color.orange);
AddVerticalLine(showverticals and SecondsFromTime(1500) == 0, "1500", Color.LIGHT_GRAY);
AddVerticalLine(showverticals and SecondsFromTime(1530) == 0, "1530", Color.LIGHT_GRAY);
AddVerticalLine(showverticals and SecondsFromTime(1548) == 0, "1548", Color.LIGHT_GRAY);