Pine Script is a scientific language based on logic and data that performs magic on TradingView charts. It uses the opening price, high price, low price, closing price, and trading volume of each candlestick to cast its magic. Historical candlesticks are only executed once, on the closing price, while real-time candlesticks are executed every time the data is updated. Built-in variables such as open, high, low, close, and volume are used to predict the future based on past data on historical candlesticks and continuously update on real-time candlesticks. The behavior of strategies and indicators is also different, with strategies being executed only on the closing of real-time candlesticks, while indicators are executed on every update. Understanding the execution mechanism of Pine Script can better utilize this powerful tool for quantitative trading.