Super_OB_OS Indicator for ThinkorSwim

Oh, I did, and found it... it's a long story... THANKS! I'm very new to this so thank you for your patience. I am still trying to figure out the differences between the colors... I'm color blind... Red is obviously down, I figure the hollow candles are the "green", but I don't understand what looks like the off-white filled ones indicate.
 

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

Oh, I did, and found it... it's a long story... THANKS! I'm very new to this so thank you for your patience. I am still trying to figure out the differences between the colors... I'm color blind... Red is obviously down, I figure the hollow candles are the "green", but I don't understand what looks like the off-white filled ones indicate.
On candle setting make up hollow and filled for down so you don't have to worry about color . You can change color or candles anything you want . Most of us are new here and to trading , you will learn alot thru this site. Best of luck
 
This looks great! Where can I find the "confirmation" lower-level study?
Glad you like it! Here's the lower study. Let me know what you think after you get to put it to use.
Code:
#Confirmation Candles Lower V.3
#Created 04/15/2021 by Christopher84
#Select the level of agreement among the 14 indicators included.
#Last changed 04/20/2021 to V.3 - Removed ChaikinOsc and replaced with STARCBands. Adjusted levels to match upper study. Added OB/OS levels.

#Keltner Channel
declare lower;
def displace = 0;
input factorK = 2.0;
input lengthK = 20;
input price = close;
input averageType = AverageType.SIMPLE;
input trueRangeAverageType = AverageType.SIMPLE;

def shift = factorK * MovingAverage(trueRangeAverageType, TrueRange(high, close, low), lengthK);
def averageK = MovingAverage(averageType, price, lengthK);
def AvgK = averageK[-displace];
def Upper_BandK = averageK[-displace] + shift[-displace];
def Lower_BandK = averageK[-displace] - shift[-displace];

def conditionKup = price >= Upper_BandK;
def conditionKdown = price <= Lower_BandK;

#MACD with Price
def fastLength = 12;
def slowLength = 26;
def MACDLength = 9;
input MACD_AverageType = {SMA, default EMA};
def MACDLevel = 0.0;

def fastEMA = ExpAverage(price, fastLength);
def slowEMA = ExpAverage(price, slowLength);
def Value;
def Avg;
switch (MACD_AverageType) {
case SMA:
Value = Average(price, fastLength) - Average(price, slowLength);
Avg = Average(Value, MACDLength);
case EMA:
Value = fastEMA - slowEMA;
Avg = ExpAverage(Value, MACDLength);}
def Diff = Value - Avg;
def Level = MACDLevel;

def condition1 = Value[1] <= Value;

#RSI
def RSI_length = 14;
def RSI_AverageType = AverageType.WILDERS;
def RSI_OB = 70;
def RSI_OS = 30;

def NetChgAvg = MovingAverage(RSI_AverageType, price - price[1], RSI_length);
def TotChgAvg = MovingAverage(RSI_AverageType, AbsValue(price - price[1]), RSI_length);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;
def RSI = 50 * (ChgRatio + 1);

def condition2 = (RSI[3] < RSI) is true or (RSI >= 80) is true;
def conditionRSI_OB = RSI > RSI_OB;
def conditionRSI_OS = RSI < RSI_OS;

#MFI
def MFI_Length = 14;
def MFIover_Sold = 20;
def MFIover_Bought = 80;
def movingAvgLength = 1;
def MoneyFlowIndex = Average(moneyflow(high, close, low, volume, MFI_Length), movingAvgLength);
def MFIOverBought = MFIover_Bought;
def MFIOverSold = MFIover_Sold;

def condition3 = (MoneyFlowIndex[2] < MoneyFlowIndex) is true or (MoneyFlowIndex > 85) is true;
def conditionMFI_OB = MoneyFlowIndex > MFIover_Bought;
def conditionMFI_OS = MoneyFlowIndex < MFIover_Sold;

#Forecast
def na = Double.NaN;
def MidLine = 50;
def Momentum = MarketForecast().Momentum;
def NearT = MarketForecast().NearTerm;
def Intermed = MarketForecast().Intermediate;
def FOB = 80;
def FOS = 20;
def upperLine = 110;

def condition4 = (Intermed[1] <= Intermed) and (NearT >= MidLine);
def conditionFOB = Intermed > FOB;
def conditionFOS = Intermed < FOS;

#Pivot Signals
def n = 20;
def ticks = 2.0;
def bnOK = barNumber() > n;
def isHigher = fold i = 1 to n + 1 with p = 1 while p do high > GetValue(high, -i);
def HH = if bnOK and isHigher and high == Highest(high, n)then high else Double.NaN;
def isLower = fold j = 1 to n + 1 with q = 1 while q do low < GetValue(low, -j);
def LL = if bnOK and isLower and low == Lowest(low, n) then low else Double.NaN;
def PivH = if HH > 0 then HH else Double.NaN;
def PivL = if LL > 0 then LL else Double.NaN;

def UpPivotLow = !isNaN(PivL);
#UpPivotLow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
#UpPivotLow.SetLineWeight(4);
#UpPivotLow.SetDefaultColor(Color.GREEN);

def DownPivotHigh = !isNaN(PivH);
#DownPivotHigh.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
#DownPivotHigh.SetLineWeight(4);
#DownPivotHigh.SetDefaultColor(Color.RED);

def condition5 = !isNaN(PivL);

#EMA_1
def EMA_length = 12;
def AvgExp = ExpAverage(price[-displace], EMA_length);

def condition6 = (price >= AvgExp) and (AvgExp[2] <= AvgExp);

#EMA_2
def EMA_2length = 20;
def displace2 = 0;
def AvgExp2 = ExpAverage(price[-displace2], EMA_2length);

def condition7 = (price >= AvgExp2) and (AvgExp[2] <= AvgExp);

#DMI Oscillator
def DMI_length = 5;#Typically set to 10
input DMI_averageType = AverageType.WILDERS;
def diPlus = DMI(DMI_length, DMI_averageType)."DI+";
def diMinus = DMI(DMI_length, DMI_averageType)."DI-";
def Osc = diPlus - diMinus;
def Hist = Osc;
def ZeroLine = 0;

def condition8 = Osc >= zeroline;

#Trend_Periods
def TP_fastLength = 3;#Typically 7
def TP_slowLength = 4;#Typically 15
def Periods = sign(ExpAverage(close, TP_fastLength) - ExpAverage(close, TP_slowLength));

def condition9 = Periods > 0;

#Polarized Fractal Efficiency
def PFE_length = 5;#Typically 10
def smoothingLength = 2.5;#Typically 5
def PFE_diff = close - close[PFE_length - 1];
def val = 100 * Sqrt(Sqr(PFE_diff) + Sqr(PFE_length)) / sum(Sqrt(1 + Sqr(close - close[1])), PFE_length - 1);
def PFE = ExpAverage(if PFE_diff > 0 then val else -val, smoothingLength);
def UpperLevel = 50;
def LowerLevel = -50;

def condition10 = PFE > 0;
def conditionPFE_OB = PFE > UpperLevel;
def conditionPFE_OS = PFE < LowerLevel;

#Bollinger Bands PercentB
input BBPB_averageType = AverageType.Simple;
def BBPB_length = 5;#Typically 20
def Num_Dev_Dn = -2.0;
def Num_Dev_up = 2.0;
def BBPB_OB = 100;
def BBPB_OS = 0;
def upperBand = BollingerBands(price, displace, BBPB_length, Num_Dev_Dn, Num_Dev_up, BBPB_averageType).UpperBand;
def lowerBand = BollingerBands(price, displace, BBPB_length, Num_Dev_Dn, Num_Dev_up, BBPB_averageType).LowerBand;
def PercentB = (price - lowerBand) / (upperBand - lowerBand) * 100;
def HalfLine = 50;
def UnitLine = 100;

def condition11 = PercentB > HalfLine;
def conditionBBPB_OB = PercentB > BBPB_OB;
def conditionBBPB_OS = PercentB < BBPB_OS;

#STARC Bands
def ATR_length = 15;
def SMA_lengthS = 6;
def multiplier_factor = 1.5;
def valS = Average(price, SMA_lengthS);
def average_true_range = Average(TrueRange(high, close, low), length = ATR_length);
def Upper_BandS = valS[-displace] + multiplier_factor * average_true_range[-displace];
def Middle_BandS = valS[-displace];
def Lower_BandS = valS[-displace] - multiplier_factor * average_true_range[-displace];

def condition12 = (Upper_BandS[1] <= Upper_BandS) and (Lower_BandS[1] <= Lower_BandS);

#Klinger Histogram
def Klinger_Length = 8;
def KVOsc = KlingerOscillator(Klinger_Length).KVOsc;
def KVOH = KVOsc - Average(KVOsc, Klinger_Length);
def condition13 = (KVOH > 0) and (KVOsc[1] <= KVOsc);

#Projection Oscillator
def ProjectionOsc_length = 9;#Typically 10
def MaxBound = HighestWeighted(high, ProjectionOsc_length, LinearRegressionSlope(price=high, length=ProjectionOsc_length));
def MinBound = LowestWeighted(low, ProjectionOsc_length, LinearRegressionSlope(price=low, length=ProjectionOsc_length));
def ProjectionOsc_diff = MaxBound - MinBound;
def PROSC = if ProjectionOsc_diff != 0 then 100 * (close - MinBound) / ProjectionOsc_diff else 0;
def PROSC_OB = 80;
def PROSC_OS = 20;

def condition14 = PROSC > 50;
def conditionPROSC_OB = PROSC > PROSC_OB;
def conditionPROSC_OS = PROSC < PROSC_OS;

#Trend Confirmation Calculator
#Confirmation_Factor range 1-15.
input Confirmation_Factor = 7;
#Use for testing conditions individually. Remove # from line below and change Confirmation_Factor to 1.
#def Agreement_Level = condition1;
plot Agreement_Level = condition1 + condition2 + condition3 + condition4 + condition5 + condition6 + condition7 + condition8 + condition9 + condition10 + condition11 + condition12 + condition13 + condition14 + conditionKup;

def conditionChannel1 = Upper_BandK > price;
def conditionChannel2 = Lower_BandK < price;

Agreement_Level.AssignValueColor(
if Agreement_Level > Agreement_Level[1] and Agreement_Level >= Confirmation_Factor then Color.RED
else if Agreement_Level < Agreement_Level[1] and Agreement_Level >= Confirmation_Factor then Color.DARK_RED
else if Agreement_Level < Agreement_Level[1] and Agreement_Level < Confirmation_Factor then Color.GREEN else
if Agreement_Level > Agreement_Level[1] and Agreement_Level < Confirmation_Factor then Color.DARK_GREEN
else Color.GRAY);

plot Factor_Line = Confirmation_Factor;
Factor_Line.SetStyle(Curve.SHORT_DASH);
Factor_Line.SetLineWeight(1);
Factor_Line.SetDefaultColor(Color.Gray);

plot OB_Level = 12;
OB_Level.SetPaintingStrategy(PaintingStrategy.LINE);
OB_Level.SetLineWeight(1);
OB_Level.SetDefaultColor(Color.RED);

plot OS_Level = 3;
OS_Level.SetPaintingStrategy(PaintingStrategy.LINE);
OS_Level.SetLineWeight(1);
OS_Level.SetDefaultColor(Color.LIGHT_GREEN);


AddCloud(Agreement_Level, OB_Level, Color.RED, Color.CURRENT);
AddCloud(Agreement_Level, OS_Level, Color.CURRENT, Color.LIGHT_GREEN);
 
On candle setting make up hollow and filled for down so you don't have to worry about color . You can change color or candles anything you want . Most of us are new here and to trading , you will learn alot thru this site. Best of luck
Yes, I know the red is down, hollow is up... but the white "filled" candles that are down candles are not red, but white.. I want to know the MEANING of the color change... i.e. change of momentum, sell indicator? Also I see red and white "dots" on top of the some of the candles...
 
Yes, I know the red is down, hollow is up... but the white "filled" candles that are down candles are not red, but white.. I want to know the MEANING of the color change... i.e. change of momentum, sell indicator? Also I see red and white "dots" on top of the some of the candles...
When a price is dropping and the candle is still light green (I think that's the white you are referring to?) it means that the confirmation level is still showing a heightened potential for upward price movement. Conversely, when the candles are red and moving up, the confirmation level is indicating a heightened potential for downward movement in price. As for the "dots", they are meant to give an idea of when the trader should look to buy or look to sell prior to the actual trend change. As with most reversal signals, they are not perfect. I am currently working on rewriting that portion. I hope this helps.
 
Hi Everyone!
Just posted the newest version of Super OB/OS indicator on page one of this thread. The new adjustments give some nice signals! Let me know what you all think.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
501 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