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)
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
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