An alert will be triggered only when price breaks and closes beyond the specified prices. You will get an alert on the first candle that closes beyond the levels you set.
FREE YouTube Lessons: http://rebrand.ly/zyt
FREE Pine Script Basics Course: http://rebrand.ly/zpsbc
Pine Script MASTERY Course: http://rebrand.ly/zpsmc
My Indicators & Strategies: http://rebrand.ly/zmisc
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.