High Alert
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © abhiiiish27
//@version=5
indicator("High Alert", overlay=true)

// Get the opening price of the current day
currentDayOpen = request.security(syminfo.tickerid, "D", open)

// Get the high price of the previous day
previousDayHigh = request.security(syminfo.tickerid, "D", high[1])

// Condition for generating an alert
condition = currentDayOpen > previousDayHigh

// Trigger alert
alertcondition(condition, title="Open above Previous Day High", message="Today's open is above previous day's high!")
