Modified Mobius Super Smooth Stochastic

MrPoopzALot

New member
Platform
  1. Thinkorswim
Hello Traders, Here I found this great code for a Super Smooth Stochastic. I would like to plot the 21 period exponential average of the K line, but I do not know how to do it. I'm sure its a simple thing to do. Could anyone here help me solve this riddle. Much blessings would come your way. Thank you

qlyTsEm.png


This is the original code with original notes.

Ruby:
#Here's a Super Smooth Stochastic written for a trading room. As Volatility increases and so does intraday range oscillators will become useful signals again.
#Mobius: The above code is particularly good at short aggs like 2min with futures using good Risk management - Risk Off trades
# Super Smooth Stochastic
# Mobius
# V01.02.2018
#Hint: Suggest 13 and above for Daily and 8 or less for Intraday

input length = 8; #hint length: Good starting points 13 Daily, 8 Intraday
input Arrows = no;

declare lower;

script g {
input data = close;
def w = (2 * Double.Pi / 20);
def beta = (1 - Cos(w)) / (Power(1.414, 2.0 / 10) - 1 );
def alpha = (-beta + Sqrt(beta * beta + 2 * beta));
def G = Power(alpha, 4) * data +
4 * (1 – alpha) * G[1] – 6 * Power( 1 - alpha, 2 ) * G[2] +
4 * Power( 1 - alpha, 3 ) * G[3] - Power( 1 - alpha, 4 ) * G[4];
plot Line = G;
}

def o = g(data = open);
def h = g(data = high);
def l = g(data = low);
def c = g(data = close);
def RSV = ((c - Lowest(l, length)) / (Highest(h, length) - Lowest(l, length))) * 100;
plot K = g(data = RSV);
K.SetDefaultColor(color.green);
plot D = g(data = K);
D.SetDefaultColor(color.red);
plot OB = if isNaN(c) then double.nan else 80;
OB.SetDefaultColor(Color.Gray);
OB.HideBubble();
OB.HideTitle();
plot OS = if isNaN(c) then double.nan else 20;
OS.SetDefaultColor(Color.Gray);
OS.HideBubble();
OS.HideTitle();

AddCloud(K, D, color.green, color.red);

plot upArrow = if Arrows and K < OS and K crosses above D
then K
else double.nan;
upArrow.SetPaintingStrategy(PaintingStrategy.Arrow_UP);
upArrow.SetDefaultColor(Color.Green);
upArrow.HideBubble();
upArrow.HideTitle();
plot dnArrow = if Arrows and K > OB and K crosses below D
then K
else double.nan;
dnArrow.SetPaintingStrategy(PaintingStrategy.Arrow_DOWN);
dnArrow.SetDefaultColor(Color.Red);
dnArrow.HideBubble();
dnArrow.HideTitle();

# End Code Stochastic Super Smooth
 
Last edited:

barbaros

Administrator
Staff member
Is this what you are looking for?

NXkmd6H.png


Code:
#Here's a Super Smooth Stochastic written for a trading room. As Volatility increases and so does intraday range oscillators will become useful signals again.
#Mobius: The above code is particularly good at short aggs like 2min with futures using good Risk management - Risk Off trades
# Super Smooth Stochastic
# Mobius
# V01.02.2018
#Hint: Suggest 13 and above for Daily and 8 or less for Intraday

# barbaros: added K ema smoothing by request at https://b4indicators.com/threads/modified-mobius-super-smooth-stochastic.124/

input length = 8; #hint length: Good starting points 13 Daily, 8 Intraday
input KSmoothLength = 21;
input Arrows = no;

declare lower;

script g {
input data = close;
def w = (2 * Double.Pi / 20);
def beta = (1 - Cos(w)) / (Power(1.414, 2.0 / 10) - 1 );
def alpha = (-beta + Sqrt(beta * beta + 2 * beta));
def G = Power(alpha, 4) * data +
4 * (1 – alpha) * G[1] – 6 * Power( 1 - alpha, 2 ) * G[2] +
4 * Power( 1 - alpha, 3 ) * G[3] - Power( 1 - alpha, 4 ) * G[4];
plot Line = G;
}

def o = g(data = open);
def h = g(data = high);
def l = g(data = low);
def c = g(data = close);
def RSV = ((c - Lowest(l, length)) / (Highest(h, length) - Lowest(l, length))) * 100;
plot K = g(data = RSV);
K.SetDefaultColor(color.green);
plot KSmooth = MovAvgExponential(K, KSmoothLength);
KSmooth.SetDefaultColor(color.white);
plot D = g(data = K);
D.SetDefaultColor(color.red);
plot OB = if isNaN(c) then double.nan else 80;
OB.SetDefaultColor(Color.Gray);
OB.HideBubble();
OB.HideTitle();
plot OS = if isNaN(c) then double.nan else 20;
OS.SetDefaultColor(Color.Gray);
OS.HideBubble();
OS.HideTitle();

AddCloud(K, D, color.green, color.red);

plot upArrow = if Arrows and K < OS and K crosses above D
then K
else double.nan;
upArrow.SetPaintingStrategy(PaintingStrategy.Arrow_UP);
upArrow.SetDefaultColor(Color.Green);
upArrow.HideBubble();
upArrow.HideTitle();
plot dnArrow = if Arrows and K > OB and K crosses below D
then K
else double.nan;
dnArrow.SetPaintingStrategy(PaintingStrategy.Arrow_DOWN);
dnArrow.SetDefaultColor(Color.Red);
dnArrow.HideBubble();
dnArrow.HideTitle();

# End Code Stochastic Super Smooth
 

MrPoopzALot

New member
Is this what you are looking for?

NXkmd6H.png


Code:
#Here's a Super Smooth Stochastic written for a trading room. As Volatility increases and so does intraday range oscillators will become useful signals again.
#Mobius: The above code is particularly good at short aggs like 2min with futures using good Risk management - Risk Off trades
# Super Smooth Stochastic
# Mobius
# V01.02.2018
#Hint: Suggest 13 and above for Daily and 8 or less for Intraday

# barbaros: added K ema smoothing by request at https://b4indicators.com/threads/modified-mobius-super-smooth-stochastic.124/

input length = 8; #hint length: Good starting points 13 Daily, 8 Intraday
input KSmoothLength = 21;
input Arrows = no;

declare lower;

script g {
input data = close;
def w = (2 * Double.Pi / 20);
def beta = (1 - Cos(w)) / (Power(1.414, 2.0 / 10) - 1 );
def alpha = (-beta + Sqrt(beta * beta + 2 * beta));
def G = Power(alpha, 4) * data +
4 * (1 – alpha) * G[1] – 6 * Power( 1 - alpha, 2 ) * G[2] +
4 * Power( 1 - alpha, 3 ) * G[3] - Power( 1 - alpha, 4 ) * G[4];
plot Line = G;
}

def o = g(data = open);
def h = g(data = high);
def l = g(data = low);
def c = g(data = close);
def RSV = ((c - Lowest(l, length)) / (Highest(h, length) - Lowest(l, length))) * 100;
plot K = g(data = RSV);
K.SetDefaultColor(color.green);
plot KSmooth = MovAvgExponential(K, KSmoothLength);
KSmooth.SetDefaultColor(color.white);
plot D = g(data = K);
D.SetDefaultColor(color.red);
plot OB = if isNaN(c) then double.nan else 80;
OB.SetDefaultColor(Color.Gray);
OB.HideBubble();
OB.HideTitle();
plot OS = if isNaN(c) then double.nan else 20;
OS.SetDefaultColor(Color.Gray);
OS.HideBubble();
OS.HideTitle();

AddCloud(K, D, color.green, color.red);

plot upArrow = if Arrows and K < OS and K crosses above D
then K
else double.nan;
upArrow.SetPaintingStrategy(PaintingStrategy.Arrow_UP);
upArrow.SetDefaultColor(Color.Green);
upArrow.HideBubble();
upArrow.HideTitle();
plot dnArrow = if Arrows and K > OB and K crosses below D
then K
else double.nan;
dnArrow.SetPaintingStrategy(PaintingStrategy.Arrow_DOWN);
dnArrow.SetDefaultColor(Color.Red);
dnArrow.HideBubble();
dnArrow.HideTitle();

# End Code Stochastic Super Smooth
Yes, that is it. Thank you.
 

MrPoopzALot

New member
Sure thing. I like to call my method the Autistic Trading System. Before I continue, I need to clarify that this method will NOT work if you are a degenerate chad investor. If you want to be a real millionaire, you are better off selling out of the money call options expiring in one day. If you wanna ball like Bill from Archegos you must procure 36 oz of yolo juice, leverage 20x to the tits, and blast off. As I was saying, this system WILL work if you are a virgin investor (like me). I began trading on Robinhood, but I moved to TOS to start losing money professionally. I know losing money is fun. For example, losing $500 in less than 5 mins is phoking hilarious. But, the fun of it starts to wear thin when rent is due, and there is nothing but pop tarts and half a can of tuna in the fridge.

Enough of that. Momentum indicators are based on price, and renko charts are purely based on price. Nice! The stochastic is all about momentum. Nice! Check out what happens when you use a length of 30, 40, 50 or if you are superstitious 34, 55 fibs etc. Oh lordy! lordy!

Question: Will this work for stonks? Probably, but I do not know because I do not care. I trade /es /nq /ym futures exclusively. The e minis follow the same price action. For the Austistic Trading System, you want that sweet face ripping volatility with a short spread. Yah, you will say... but zero commissions! yah, my hairy ass. Look at the spread. Active trader can’t keep up with the wild price swings you see on TSLA or whatever unless you zoom the fak out. And for what? $20 or $50 bucks? One /es renko block bags me $62.50 - $75. But, I do not buy and hold. I’m like my dick, I like doing the old in n’ out, and I do not wait for the market to put me on all fours.

Patience is a virtue that I learned after donating thousands of dollars to some wall street jerkoff. But, if you are a chad investor forget all of this crap. Instead, grab some of that cranking adderall (available at any college campus near you), wild turkey and moon it! If you are a virgin investor and want to bag 2, 3 or 4 bricks per trade…. The bitches in bikinis will come in due time. God knows, I’m still waiting for mine.

Do you money?

KRose Modified OBV

Ruby:
#Follow @KRose_TDA on twitter for updates to this and other scripts
#this script provides 2 moving averages of the study chosen
#default study in OnBalanceVolume Volume
declare lower;
#place the study desired after reference in the line below you must include the brackets "()"
#Initial study is OnBalanceVolume
plot MyStudy = reference OnBalanceVolume();
MyStudy.SetDefaultColor(GetColor(4));

input Moving_Averge_One_Length = 20;
input Moving_Averge_Two_Length = 50;
Input Line_Weight_MyStudy = 4;
Input Line_Weight_Moving_Average_One = 3;
Input Line_Weight_Moving_Average_Two = 3;
MyStudy.setlineWeight(Line_Weight_MyStudy);
plot MaOne = Average(mystudy, Moving_Averge_One_Length);
MaOne.SetDefaultColor(GetColor(6));
MaOne.setlineWeight(Line_Weight_Moving_Average_One);
Plot MaTwo = Average(mystudy, Moving_Averge_Two_Length);
MaTwo.SetDefaultColor(GetColor(8));
MaTwo.setlineWeight(Line_Weight_Moving_Average_Two);
 
Last edited:
Top