augustoximenes

HiLo Activator

120 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)
English
English (UK)
English (IN)
Deutsch
Français
Español
Italiano
Polski
Türkçe
Русский
Português
Bahasa Indonesia
Bahasa Melayu
ภาษาไทย
Tiếng Việt
日本語
한국어
简体中文
繁體中文
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 Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out