augustoximenes

HiLo Activator

109 0 6
Remove from Favorite Scripts Add to Favorite Scripts
study(title="HiLo Activator", overlay=true)
//Entradas
periodo = input(4, minval=1)
deslocamento = input(0, minval=0)
//Médias móveis das séries
smaAltas = sma(high, periodo)
smaBaixas = sma(low, periodo)
//Maior/menor valor das séries
maiorAlta = highest(high, periodo)
menorBaixa = lowest(low, periodo)
//Houve inversão? (1 = baixa; -1 = alta; 0 = não houve inversão)
inversao = iff(close > smaAltas[deslocamento], 1, iff(close < smaBaixas[deslocamento], -1, 0))
//Traçar os pontos no gráfico
ponto = iff(inversao == 1, menorBaixa, iff(inversao == -1, maiorAlta, ponto[1]))
pontoCor = iff(ponto < low, green, red)
plotshape(ponto, style=shape.cross, location=location.absolute, color=pontoCor)
United States
United Kingdom
India
Deutschland
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
Malaysia
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing Priority Support Ideas Published Followers Following Private Messages Chat Sign Out