I decided to make this flexible by including only a signal label and user inputs for the start and end time as well as the label text. This permits you to add this to the chart as many times as you like. Each one will create a label and you can customize each one to display the specified time span and label description.
input startTime = 900;
input endTime = 1129;
input labelText = "NYMEX Pivot: ";
def targetPeriod = SecondsFromTime(startTime) >= 0 and SecondsTillTime(endTime) >= 0;
rec trackTargetHigh = if targetPeriod and !targetPeriod[1] then high else if targetPeriod and high > trackTargetHigh[1] then high else trackTargetHigh[1];
rec trackTargetLow = if targetPeriod and !targetPeriod[1] then low else if targetPeriod and low > 0 and low < trackTargetLow[1] then low else trackTargetLow[1];
rec trackTargetClose = if !targetPeriod and targetPeriod[1] then close[1] else trackTargetClose[1];
def pivot = Round((trackTargetLow + trackTargetHigh + trackTargetClose) / 3, 2);
AddLabel(yes, Concat(labelText, pivot), Color.WHITE);
I did not include the ability to display the pivot value from the previous day.