//version=6 indicator("13 EMA Cross - Next Day High/Low", overlay=true)
// Inputs for EMAs length1 = input.int(13, title="Short EMA (13 EMA)") length2 = input.int(34, title="Long EMA (34 EMA)")
// Input for support line properties supportColor = input.color(#A52A2A, title="Support Line Color") // Brown color lineWidth = input.int(2, title="Line Width")
// Track when a crossover happens var float nextDayHigh = na var float nextDayLow = na var int crossoverBarIndex = na
if crossAbove or crossBelow crossoverBarIndex := bar_index nextDayHigh := na nextDayLow := na
// Capture next day candle's high and low after crossover if bar_index == crossoverBarIndex + 1 nextDayHigh := high nextDayLow := low
// Draw horizontal lines at the next day's high and low if not na(nextDayHigh) and not na(nextDayLow) line.new(x1=crossoverBarIndex + 1, y1=nextDayHigh, x2=bar_index, y2=nextDayHigh, color=supportColor, width=lineWidth) line.new(x1=crossoverBarIndex + 1, y1=nextDayLow, x2=bar_index, y2=nextDayLow, color=supportColor, width=lineWidth)