samuelhei

Snake Oscillator 1.1

This Oscillator helps to identify the ending of waves, good to get entries and exits. Now, with a tolerance line.
Remove from Favorite Scripts Add to Favorite Scripts
study("Snake Oscillator","SNK_OSC")

len = input(25,"Length")

h = ema(high,len)
l = ema(low,len)


hp = h/h[len]
lp = l/l[len]
 
avg = avg(hp,lp)

havg = ema(highest(avg,len),len)
lavg = ema(lowest(avg,len),len)

avg2 = avg(havg,lavg)

dif = havg - avg2



pa = plot(avg,color=gray)
ph = plot(havg,color=gray)
pl = plot(lavg,color=gray)

plot(havg+dif,color=black)
plot(lavg-dif,color=black)

fill(ph,pa,color=red,transp=60)
fill(pl,pa,color=green,transp=60)
Can you explain how it works please ? Thanks !
Reply
samuelhei PRO sigmadict
hp = h/h // This provides the porcentage of change of ema(high, len) considered len periods back
lp = l/l // same of hp, but with lows

avg = avg(hp,lp) // Average of porcentage of change of low and High

havg = ema(highest(avg,len),len) // Highest avg of change of len periods back amortized by ema
lavg = ema(lowest(avg,len),len) //Lowest avg of change of len periods back amortized by ema

--

Idea is check if the trend is making the same proportion of highs and lows in a trend move.
Reply
sigmadict samuelhei
thank you for taking time to respond !
+1 Reply
Rocketman samuelhei
@samuelhei, Dag, I still don't understand. Is it the same thing as "Snake In Borders" on MT4 (A.k.a snake force)?
Reply
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