Savage Oscillator for ThinkorSwim

SIPL6jk.png

Custom watchlist added into OP, of course adjust your "Reversal_Warning" and "Sensitivity" settings to your likings.
Displays the Bullish line value for bullish or bearish sentiment, along with displaying if its soon for a reversal
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

It is giving a range on the scale on right side of upto 3000, how to change that so I dont have to zoom on it
 
Fate, nice work on the oscillator studies. I do have a question, let's say that I am using the lower study, and the watch list study on a hourly time frame, shouldn't the bull values be the same?
 
Fate, nice work on the oscillator studies. I do have a question, let's say that I am using the lower study, and the watch list study on a hourly time frame, shouldn't the bull values be the same?
make sure both your timeframe AND your watchlist are on same timeframe, along with extended hours checked on or off on both. should be the same
 
Hi Fate, I love your oscillator.... 😁 On the watchlist, is there any way to color differentiate the "Reversal" between an overbought and oversold? Something like overbought being shaded red and oversold being shaded green?
 
@tomsey as requested I changed it to be green when being oversold and vise versa for overbought, also added in the text color to be orange when the 2 lines are close to crossing or have just crossed. (Not sure why my top 3 stocks say loading, I know TOS has this issue sometimes, let me know if its a constant issue with anyone and ill see if its a problem on my end)

nWHIqGD.png
 
I Made another version of Savage, that more shows when something is trending in a direction, or when its consolidated. I didnt prefer this version as much, but figured I'd throw this on here just incase it could be useful to someone else.
Above or below gray area shows trending, insid ethe gray is consolidated.
The reversal signals werent quite as sharp on this one, So i kept the Blue candle Reversal Signals from the original on this version

Code:
declare lower;
Input Price_Color = yes;
Input Sensitivity = 1;
Input Reversal_Candle = yes;



##Stochastics
Def S1 = Max(-100, Min(100, (StochasticFull(KPeriod = 8, slowing_period = 5, averageType = AverageType.EXPONENTIAL))) - 50) / 50.01;
Def S2 = Max(-100, Min(100, (StochasticFull(KPeriod = 17, slowing_period = 5, averageType = AverageType.EXPONENTIAL))) - 50) / 50.01;
Def S3 = Max(-100, Min(100, reference RSI(2)) - 50) / 50.01;

##Bull/Bear
def Bull =(expAverage((S1 + S2 + S3)/3,Sensitivity))*10;
Def SpdChng = if Bull < 1.5 then ((movingAverage(averageType.Weighted, Bull, 20))-1.5) else ((movingAverage(averageType.Weighted, Bull, 10))-1.5);
def Bear = (SpdChng - Bull);

Plot Zero = 0;
plot line = bull - bear;


#Paint
Zero.setdefaultColor(color.gray);
addLabel(yes, if line > 3.5 then "Bullish" else if line <-3.5 then "Bearish" else "Consolidating", if line > 3.5 then Color.Green else if line < -3.5 then color.red else color.white);
assignpriceColor(if Price_Color and line > 0 then color.green else color.current);
assignpriceColor(if Price_Color and line < 0 then color.red else color.current);
assignpricecolor(if bull > 8.35 and Reversal_Candle or bull < -8 and Reversal_Candle then color.cyan else color.current);
addcloud(11, 13, color.yellow, color.yellow);
addcloud(-11, -13, color.yellow, color.yellow);
addcloud(3.5, -3.5, color.gray, color.gray);

e0ogptP.png
 
@Accelox Here you go the trading view code for SVG. My earlier publish was taken down by trading view moderator so refer code below.

Code:
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// Assembled by [USER=2840]@FateOwnzYou[/USER] on UseThinkScript.com
// Link: https://usethinkscript.com/threads/savage-oscillator-for-thinkorswim.4214/
// Modified for TradingView by Ozia

//@version=4
study(title="Savage Oscillator", shorttitle="SVG", format=format.price, precision=2, resolution="")
//Input Paramater
RSI_length = input(2)
Reversal_Warning_Candle = input(title = "Reversal_Warning Candle", type=input.bool, defval=false)
Reversal_Warning = input(8)
Sensitivity = input(1)
HighVolume = input(title = "HighVolume", type=input.bool, defval=true)
VolumeAveragingLength = input(20)
VolumePercentThreshold = input(60)

//RSI
up = rma(max(change(close), 0), RSI_length)
down = rma(-min(change(close), 0), RSI_length)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))

_High1 = hline(10.0)
_High2 = hline(8.0)
_Low1 = hline(-8)
_Low2 = hline(-10)
zero = hline(0)

//Upper and Lower Zone
fill(_High1, _High2, color=color.yellow)
fill(_Low1, _Low2, color=color.yellow)

//Stochastics
k1 = ema(stoch(close, high, low, 8), 5)
k2 = ema(stoch(close, high, low, 17), 5)
mins1 = (k1 < 100 ? k1 : 100) -50
mins2 = (k2 < 100 ? k2 : 100) -50
mins3 = (rsi < 100 ? rsi : 100) -50
maxs1 = mins1 > -100 ? mins1 : -100
maxs2 = mins2 > -100 ? mins2 : -100
maxs3 = mins3 > -100 ? mins3 : -100

s1 = maxs1 / 50.01
s2 = maxs2 / 50.01
s3 = maxs3 /50.01

bull = (ema((s1 + s2 + s3)/3, Sensitivity)) * 10
wa20 = wma(bull, 20)
wa10 = wma(bull, 10)
SpdChng = bull < 1.5 ? wa20 - 1.5 : wa10 - 1.5
bear = SpdChng - bull
middle = ((bull - bear)/2)+ bear

//High Volume
aVol = rma(volume,VolumeAveragingLength)
pVol = 100 * ((volume - aVol[1])/ aVol[1])
pDot() => pVol >= VolumePercentThreshold

plot(bull, style=plot.style_linebr, linewidth=2, color=color.green)
plot(bear, style=plot.style_linebr, linewidth=2, color=color.red)
plot(middle, style=plot.style_linebr, linewidth=1, color=color.gray)

//Reversals
DReversal_Warning() => bull > Reversal_Warning
UReversal_Warning() => bull < Reversal_Warning * -1
barcolor(Reversal_Warning_Candle and DReversal_Warning() ? color.blue : UReversal_Warning() ? color.orange : na)
barcolor(Reversal_Warning_Candle and UReversal_Warning() ? color.blue : UReversal_Warning() ? color.orange : na)
plotshape(pDot() and HighVolume ? true : na, style=shape.circle, color=color.aqua, location=location.absolute, transp = 0, size = size.tiny)

plotshape(DReversal_Warning(), style=shape.circle, color=color.orange, location=location.top, textcolor=color.black, transp = 0, size = size.tiny)
plotshape(UReversal_Warning() , style=shape.circle, color=color.red, location=location.bottom, textcolor=color.black, transp = 0, size = size.tiny)
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
186 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top