Savage Oscillator from FateOwnzYou with Dynamic ATR range

MatthewA

Active member
EDIT 1/11/2021 Corrected accuracy error! Thank You

Hello everyone,

The savage Oscillator @FateOwnzYou uses three Stochastics and the difference in the rate they change to decide if price is UP or DOWN for a time...
I added an ATR filter to remove weak values, seeing weak areas lets you know when Momentum may change direction or will go sideways weakly...

BbmXGWh.jpeg


So I added a dynamic requirement that the Momentum must be outside of in order to be colored. By noting the concentration of coloring you will both save your eyes and get a feel for price action. Do not trade directly from this Use your additional Volume, Volatility, etc. Indicators and something a little slower for confirmation.

Indicator:
Code:
#https://usethinkscript.com/threads/savage-oscillator.4214/
#Assembled by FateOwnzYou on UseThinkscript.com
#####################################
# MOMENTUM - Timing Price Micro +/- #
#####################################
input MomentumSensitivity = 2; # Increase Sensitivity for behaviors similar to traditional RSI Stochastic
#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;
plot Bull =(expAverage((S1 + S2 + S3)/3,MomentumSensitivity))*10; Bull.AssignValueColor(Color.light_green);
Def SpdChng = if Bull < 1.5 then ((movingAverage(averageType.Weighted, Bull, 20))-1.5) else ((movingAverage(averageType.Weighted, Bull, 10))-1.5) ;
plot Bear = (SpdChng - Bull); Bear.AssignValueColor(Color.RED);
plot Middle=(Bull-Bear)/2;
AddLabel(yes, if Bull > Bear then "Bullish" else "Bearish", if Bull > Bear then Color.GREEN else Color.light_RED);
#################################################
#ATR Slope - Average True Range of the Momentum #
#################################################
def MomentumDifference= (((Bull) - (Bear)));
def MOMOatrLength = 20;
def TR1 = Highest(MomentumDifference) - Lowest(MomentumDifference);
def TR2 = AbsValue(Highest(MomentumDifference) - MedianAverage(MomentumDifference));
def TR3 = AbsValue(Lowest(MomentumDifference) - MedianAverage(MomentumDifference));
def TrueRangeofMOMO= if TR1 > TR2 and TR1 > TR3 then TR1 else if TR2 > TR1 and TR2 > TR3 then TR2 else TR3;
def ATRslope = ABSVALUE(MovingAverage(AverageType.WILDERS, TrueRangeofMOMO, MOMOatrLength));
def MedianSlope  = MedianAverage(MomentumDifference, 100);
plot MomoATRHigh = MedianSlope + (ATRslope[1]);MomoATRHigh.assignValueColor(color.Light_Green);
plot MomoATRLow  = MedianSlope - (ATRslope[1]);MomoATRLow.assignValueColor(color.Light_Red);

def MomentumATRcorrection = if MomentumDifference > MedianSlope then Min(MomoATRHigh, ((((MomentumDifference + ((MomentumDifference - MomentumDifference[1])))) - MedianSlope) / (ATRslope[1]))) else Max(MomoATRLow, ((((MomentumDifference + ((MomentumDifference - MomentumDifference[1])))) - MedianSlope) / (ATRslope[1])));

def _High =MedianSlope+ (ATRslope[1]/3);
def Min_High =MedianSlope+ (ATRslope[1]/8);
def _Low = MedianSlope- (ATRslope[1]/3);
def Max_Low = MedianSlope- (ATRslope[1]/8);
AddCloud ( _High, _Low, Color.DARK_GRAY, Color.DARK_GRAY);
plot Zero = 0; Zero.SetDefaultColor(Color.GRAY);

### DO NOT USE MOMENTUM DIFFERENCE IT IS TO UNSTABLE!!! ### #CHANGE BELOW#
def Momentum_Reading = if (MomentumDifference>MomentumDifference[1]>Min_High or MomentumDifference>_High) && MomentumATRcorrection > 0 && MomentumDifference>0 then +10 else if (MomentumDifference<MomentumDifference[1]<Max_Low or MomentumDifference<_Low) && MomentumATRcorrection < 0 && MomentumDifference<0 then -10 else 0;

assignPriceColor(if(MomentumDifference>MomentumDifference[1]>Min_High or MomentumDifference>_High) && MomentumATRcorrection > 0 && MomentumDifference>0 then color.green else if (MomentumDifference<MomentumDifference[1]<Max_Low or MomentumDifference<_Low) && MomentumATRcorrection < 0 && MomentumDifference<0 then color.red else color.gray);


AddLabel(1, "Momentum", if IsNaN(Momentum_Reading) then Color.DARK_GRAY else if Momentum_Reading > 0 then Color.GREEN else if Momentum_Reading < 0 then Color.RED else Color.GRAY);
#Paint
middle.AssignValueColor(if Momentum_Reading > 0 then Color.GREEN else if Momentum_Reading < 0 then Color.RED else Color.light_GRAY);

Chart setup: http://tos.mx/zzzGUC9
STUDY: http://tos.mx/ANP0L3v
Merry Christmas UseThinkscript.com 🎄
 
Last edited:

Iconoclastic

New member
VIP
Here is a new updated version... It may take some extra chart space to calibrate. Have you tried setting for a few extra days then you want to read?
I think that the first version you released on Christmas Day was pretty amazing. The advice / warning you gave about using another indicator to confirm signals was pretty sound.

I use the 5/3/2Full Stochastics to look for an oversold level as a possible entry signal. Waiting for %K to cross above %D and ALSO leave the OverSold region is pretty reliable, BUT adding the Savage Osc is something that I'm going to try this week in my trading. The reversal/ warning candle is really nice to have. I also varied the settings in the code and used 14/5/3FullStochs, as well as, the 21/4/10FullStochs and the Oscillator performs beautfully.

I saw elsewhere that you're working on a pure MoMo script. Ever thought of using the 5/3/2 & 21/4/10 settings on the Full Stochastics as the comparative indicators?
 

Similar threads

Top