augustoximenes

HiLo Activator

423 1 27
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
Deutschland
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
Malaysia
日本
한국
中国
Home Stock Screener Forex 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