So I tried to use what I could from that script. I was able to get the Highest High and Lowest Low from 6-8pm, but I can't figure out how to plot it so the line is from 6pm to 1am.
This is what I did with the code so far and added my own desired output.
def SetOneStart = 1800;
def SetOneEnd = 2000;
def na = Double.NaN;
def SetOnehi = high;
def SetOnelo = low;
def bn = BarNumber();
def SetOnelastbar = !isnan(close[0]) and isnan(close[-1]);
def SetOnestart1hr = Floor(SetOneStart / 100);
def SetOnestart1min = SetOneStart - (SetOnestart1hr * 100);
def SetOnestart1minttl = (SetOnestart1hr * 60) + SetOnestart1min;
def SetOneEnd1hr = Floor(SetOneEnd / 100);
def SetOneEnd1min = SetOneEnd - (SetOneend1hr * 100);
def SetOneEnd1minttl = (SetOneEnd1hr * 60) + SetOneEnd1min;
def SetOnestmin2 = SecondsFromTime(SetOneStart);
def SetOnestmin = SetOnestmin2 / (60);
def daymin = 1440;
def endz = 2359;
def startz = 0000;
def SetOnefirst1 = if SecondsTillTime(SetOneStart) == 0 then 1 else 0;
def SetOnelast1 = if SecondsFromTime(SetOneEnd) == 0 then 1 else 0;
def SetOneperiod1min;
def SetOneperiod1;
if SetOnestart1minttl >SetOneend1minttl
then {
SetOneperiod1min = (daymin - SetOnestart1minttl) + SetOneend1minttl;
SetOneperiod1 = if ((SecondsFromTime(SetOneStart) >= 0 and SecondsTillTime(endz) > 0) or ( SecondsFromTime(startz) >= 0 and SecondsTillTime(SetOneEnd) > 0)) then 1 else 0;
} else {
SetOneperiod1min = (SetOneend1minttl - SetOnestart1minttl);
SetOneperiod1 = if SecondsFromTime(SetOneStart) >= 0 and SecondsTillTime(SetOneEnd) > 0 then 1 else 0;
}
def SetOnechagg = GetAggregationPeriod();
def SetOneaggmin = SetOnechagg / (1000 * 60);
def SetOneperiod1bars = SetOneperiod1min / SetOneaggmin;
def SetOnecurrentperiodbars = if (SetOneperiod1 and SetOnelastbar) then (SetOnestmin / SetOneaggmin) else 0;
def SetOnelen = SetOneperiod1bars - 1;
def SetOneHigh = if SetOneFirst1 then Highest(SetOnehi[-SetOnelen], SetOnelen + 1)
else if SetOneLast1 then na
else if SetOneperiod1 then SetOneHigh[1]
else na;
def SetOneLow = if SetOnefirst1 then Lowest(SetOnelo[-SetOnelen], SetOnelen + 1)
else if SetOnelast1 then na
else if SetOneperiod1 then SetOneLow[1]
else na;
def range = SetOneHigh - SetOneLow;
def mid = range / 2;
def Ext1 = range * 1.13;
def Ext2 = range * 1.272;
def Ext3 = range * 1.414;
def Ext4 = range * 1.50;
def Ext5 = range * 1.618;
def Ext6 = range * 2.00;
def Ext7 = range * 2.13;
def Ext8 = range * 2.618;
plot SetOneFib0 = SetOneLow;
SetOneFib0.SetDefaultColor(Color.YELLOW);
SetOneFib0.SetLineWeight(2);
SetOneFib0.HideBubble();
plot SetOneFib50 = RoundDown(SetOneLow + mid, 0) - ((Round(((RoundDown(SetOneLow + mid, 0) - SetOneLow - mid) / 0.25), 0)) * 0.25);
SetOneFib50.SetDefaultColor(Color.YELLOW);
SetOneFib50.SetLineWeight(3);
SetOneFib50.HideBubble();
plot SetOneFib100 = SetOneHigh;
SetOneFib100.SetDefaultColor(Color.Yellow);
#hiline.SetStyle(Curve.MEDIUM_DASH);
SetOneFib100.SetLineWeight(2);
SetOneFib100.HideBubble();
plot SetOneUpExt113 = RoundDown(SetOneLow + Ext1, 0) - ((Round(((RoundDown(SetOneLow + Ext1, 0) - SetOneLow - Ext1) / 0.25), 0)) * 0.25);
SetOneUpExt113.SetDefaultColor(Color.YELLOW);
SetOneUpExt113.SetLineWeight(2);
SetOneUpExt113.HideBubble();
plot SetOneUpExt127 = RoundDown(SetOneLow + Ext2, 0) - ((Round(((RoundDown(SetOneLow+ Ext2, 0) - SetOneLow - Ext2) / 0.25), 0)) * 0.25);
SetOneUpExt127.SetDefaultColor(Color.YELLOW);
SetOneUpExt127.SetLineWeight(2);
SetOneUpExt127.HideBubble();
plot SetOneUpExt141 = RoundDown(SetOneLow+ Ext3, 0) - ((Round(((RoundDown(SetOneLow + Ext3, 0) - SetOneLow - Ext3) / 0.25), 0)) * 0.25);
SetOneUpExt141.SetDefaultColor(Color.YELLOW);
SetOneUpExt141.SetLineWeight(2);
SetOneUpExt141.HideBubble();
plot SetOneUpExt150 = RoundDown(SetOneLow + Ext4, 0) - ((Round(((RoundDown(SetOneLow+ Ext4, 0) - SetOneLow- Ext4) / 0.25), 0)) * 0.25);
SetOneUpExt150.SetDefaultColor(Color.YELLOW);
SetOneUpExt150.SetLineWeight(2);
SetOneUpExt150.HideBubble();
plot SetOneUpExt161 = RoundDown(SetOneLow+ Ext5, 0) - ((Round(((RoundDown(SetOneLow+ Ext5, 0) - SetOneLow - Ext5) / 0.25), 0)) * 0.25);
SetOneUpExt161.SetDefaultColor(Color.YELLOW);
SetOneUpExt161.SetLineWeight(2);
SetOneUpExt161.HideBubble();
plot SetOneUpExt200 = RoundDown(SetOneLow + Ext6, 0) - ((Round(((RoundDown(SetOneLow + Ext6, 0) - SetOneLow - Ext6) / 0.25), 0)) * 0.25);
SetOneUpExt200.SetDefaultColor(Color.YELLOW);
SetOneUpExt200.SetLineWeight(2);
SetOneUpExt200.HideBubble();
plot SetOneUpExt213 = RoundDown(SetOneLow + Ext7, 0) - ((Round(((RoundDown(SetOneLow + Ext7, 0) - SetOneLow - Ext7) / 0.25), 0)) * 0.25);
SetOneUpExt213.SetDefaultColor(Color.YELLOW);
SetOneUpExt213.SetLineWeight(2);
SetOneUpExt213.HideBubble();
plot SetOneUpExt261 = RoundDown(SetOneLow + Ext8, 0) - ((Round(((RoundDown(SetOneLow+ Ext8, 0) - SetOneLow- Ext8) / 0.25), 0)) * 0.25);
SetOneUpExt261.SetDefaultColor(Color.YELLOW);
SetOneUpExt261.SetLineWeight(2);
SetOneUpExt261.HideBubble();
plot SetOneDownExt113 = RoundDown(SetOneHigh - Ext1, 0) - ((Round(((RoundDown(SetOneHigh - Ext1, 0) - SetOneHigh + Ext1) / 0.25), 0)) * 0.25);
SetOneDownExt113.SetDefaultColor(Color.YELLOW);
SetOneDownExt113.SetLineWeight(2);
SetOneDownExt113.HideBubble();
plot SetOneDownExt127 = RoundDown(SetOneHigh - Ext2, 0) - ((Round(((RoundDown(SetOneHigh - Ext2, 0) - SetOneHigh + Ext2) / 0.25), 0)) * 0.25);
SetOneDownExt127.SetDefaultColor(Color.YELLOW);
SetOneDownExt127.SetLineWeight(2);
SetOneDownExt127.HideBubble();
plot SetOneDownExt141 = RoundDown(SetOneHigh - Ext3, 0) - ((Round(((RoundDown(SetOneHigh- Ext3, 0) - SetOneHigh + Ext3) / 0.25), 0)) * 0.25);
SetOneDownExt141.SetDefaultColor(Color.YELLOW);
SetOneDownExt141.SetLineWeight(2);
SetOneDownExt141.HideBubble();
plot SetOneDownExt150 = RoundDown(SetOneHigh - Ext4, 0) - ((Round(((RoundDown(SetOneHigh - Ext4, 0) - SetOneHigh + Ext4) / 0.25), 0)) * 0.25);
SetOneDownExt150.SetDefaultColor(Color.YELLOW);
SetOneDownExt150.SetLineWeight(2);
SetOneDownExt150.HideBubble();
plot SetOneDownExt161 = RoundDown(SetOneHigh - Ext5, 0) - ((Round(((RoundDown(SetOneHigh - Ext5, 0) - SetOneHigh + Ext5) / 0.25), 0)) * 0.25);
SetOneDownExt161.SetDefaultColor(Color.YELLOW);
SetOneDownExt161.SetLineWeight(2);
SetOneDownExt161.HideBubble();
plot SetOneDownExt200 = RoundDown(SetOneHigh - Ext6, 0) - ((Round(((RoundDown(SetOneHigh - Ext6, 0) - SetOneHigh + Ext6) / 0.25), 0)) * 0.25);
SetOneDownExt200.SetDefaultColor(Color.YELLOW);
SetOneDownExt200.SetLineWeight(2);
SetOneDownExt200.HideBubble();
plot SetOneDownExt213 = RoundDown(SetOneHigh - Ext7, 0) - ((Round(((RoundDown(SetOneHigh - Ext7, 0) - SetOneHigh + Ext7) / 0.25), 0)) * 0.25);
SetOneDownExt213.SetDefaultColor(Color.YELLOW);
SetOneDownExt213.SetLineWeight(2);
SetOneDownExt213.HideBubble();
plot SetOneDownExt261 = RoundDown(SetOneHigh - Ext8, 0) - ((Round(((RoundDown(SetOneHigh- Ext8, 0) - SetOneHigh + Ext8) / 0.25), 0)) * 0.25);
SetOneDownExt261.SetDefaultColor(Color.YELLOW);
SetOneDownExt261.SetLineWeight(2);
SetOneDownExt261.HideBubble();
What it looks like at the moment
What I want it to look like