HAPVIDA ON NM

Eloi suporte - resistência

77
//version=5
indicator("Suporte e Resistência Automático", overlay = true)

// Período de verificação
var int lookback = 20

// Calcula o suporte e resistência
highestHigh = ta.highest(high, lookback)
lowestLow = ta.lowest(low, lookback)

// Desenha linhas horizontais no gráfico
line.new(bar_index[lookback], highestHigh, bar_index, highestHigh, width=2, color=color.red)
line.new(bar_index[lookback], lowestLow, bar_index, lowestLow, width=2, color=color.green)

// Exibe os níveis no gráfico
plot(highestHigh, "Resistência", color=color.red, linewidth=2)
plot(lowestLow, "Suporte", color=color.green, linewidth=2)

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.