Hello - Does anyone know if it's possible to convert or add onto this code so that when the monthly high or low is broken ONLY on the day of... it is shown on that day? Currently it will show the breakout (above high or low at all times cause it is the month) but it would be better if it only indicated on the actual day of breakout imo. If anyone knows how to do this that would be helpful and appreciated. I added the code below and a pic of the code in TOS.
________________________________________________________________
#This custom column plots the high or low break compared to the previous day's. Green is a high break. Red is a low break. Pink is a hi and low break with the hi break amt shown.
#Title = Broke, Revision 9/25/13
#Revised: 12:03 PM 9/25/2013
def HiBroke = If (close > high[1] ,1,0);
def LoBroke = If (close < low[1] ,1,0);
def BothBroke = If (HiBroke && LoBroke, 1,0);
def HiBrokeAmt = If HiBroke then (close - high[1] ) else double.nan;
def LoBrokeAmt = If LoBroke then (low[1] - close) else double.nan;
Addlabel(1, if HiBroke && !LoBroke then round(HiBrokeAmt,2)
else if !HiBroke && LoBroke then round(LoBrokeAmt,2)
else if HiBroke && LoBroke then round(HiBrokeAmt,2)
else 0, color.yellow);
AssignBackgroundColor(if HiBroke then color.Dark_green
else if LoBroke then color.Light_red
else if HiBroke && LoBroke then color.pink else color.current);