OPEN-SOURCE SCRIPT
Vegas & DSL

Vegas & DSL is a trend identification indicator that combines a trend moving average structure with Dynamic State Logic (DSL). Based on the classic Vegas channel, it uses EMA13, EMA21, EMA144, and EMA169 to depict the short-to-medium-term and medium-to-long-term trend framework of the market. It also introduces high and low bands based on HMA (Hull Moving Average) to determine the strength or weakness of prices within a certain period.
The core of the indicator is the DSL state machine system: by detecting when the price continuously stays above the high or low band across several candlesticks, it generates a stable bullish or bearish state. When a bullish state is established, the system marks LP (low point support), representing sustained price strength; when a bearish state is established, it marks HP (high point resistance), reflecting the dominant downward trend. Because the states are "persistent," they do not frequently reverse due to short-term disturbances, making the trend signals smoother and more reliable.
Vegas Structure is responsible for depicting trend channels, while DSL is responsible for trend confirmation. The combination of the two can capture the start of a trend and filter out noise, making it a trend tracking and structure positioning tool suitable for both short-term and long-term trading.
The core of the indicator is the DSL state machine system: by detecting when the price continuously stays above the high or low band across several candlesticks, it generates a stable bullish or bearish state. When a bullish state is established, the system marks LP (low point support), representing sustained price strength; when a bearish state is established, it marks HP (high point resistance), reflecting the dominant downward trend. Because the states are "persistent," they do not frequently reverse due to short-term disturbances, making the trend signals smoother and more reliable.
Vegas Structure is responsible for depicting trend channels, while DSL is responsible for trend confirmation. The combination of the two can capture the start of a trend and filter out noise, making it a trend tracking and structure positioning tool suitable for both short-term and long-term trading.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.