Snake Oscillator 1.1

This Oscillator helps to identify the ending of waves, good to get entries and exits. Now, with a tolerance line.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?
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)




can you please help me understand how to use it ? Especially, what does the colors indicate ?
can you add the feature of histogram in plot background
like it.
Can you explain how it works please ? Thanks !
samuelhei 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.
+3 Reply
sigmadict samuelhei
thank you for taking time to respond !
+3 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)?
+5 Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Private Messages Chat Sign Out