augustoximenes

HiLo Activator

364 1 23
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)
Hit rate?
+1 Reply
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
日本
한국
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out