SLIM Ribbon Indicator for ThinkorSwim

im comparing this to the Mobius SuperTrend for example, and the signals are coming a few bars after. In the case of a short, I see myself losing money using this vs. the SuperTrend. What am I missing?
 
Last edited:
Mr. Slim Miller was one of the original OEX pit traders at the CBOE. His website is askSLIM dot com.

This indicator is very customizable. Alerts are built in, you can use regular candles if you wish, you can turn all of the EMA's off and the color of the ribbon will still be there.

If you cannot find what you are looking for when you click the cog, open the code itself and take a look at what is there. This indicator also overrides the color of your volume bars. Lastly, this indicator is good for any timeframe without adjusting the EMA's.
Try it with a TMO or the RSI Laguerre on the bottom. Good trading, Markos.



vcD0LTm.png


thinkScript Code

Rich (BB code):
#Mr Slim Miller at askSLIM dot com
#SlimRibbonCustom_markos9-7-18
input price = close;

input superfast_length = 8;

input fast_length = 13;

input slow_length = 21;

input displace = 0;

def mov_avg8 = ExpAverage(price[-displace], superfast_length);

def mov_avg13 = ExpAverage(price[-displace], fast_length);

def mov_avg21 = ExpAverage(price[-displace], slow_length);

#moving averages

Plot Superfast = mov_avg8;

plot Fast = mov_avg13;

plot Slow = mov_avg21;

def buy = mov_avg8 > mov_avg13 and mov_avg13 > mov_avg21 and low > mov_avg8;

def stopbuy = mov_avg8 <= mov_avg13;

def buynow = !buy[1] and buy;

def buysignal = CompoundValue(1, if buynow and !stopbuy then 1 else if buysignal[1]==1 and stopbuy then 0 else buysignal[1], 0);

plot Buy_Signal = buysignal[1] == 0 and buysignal==1;

Buy_signal.setpaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Buy_signal.setdefaultColor(color.dark_GREEN);

Buy_signal.hidetitle();

Alert(condition = buysignal[1] == 0 and buysignal == 1, text = "Buy Signal", sound = Sound.Bell, "alert type" = Alert.BAR);

plot Momentum_Down = buysignal[1] ==1 and buysignal==0;

Momentum_down.setpaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Momentum_Down.setdefaultColor(color.yellow);

Momentum_down.hidetitle();

Alert(condition = buysignal[1] == 1 and buysignal == 0, text = "Momentum_Down", sound = Sound.Bell, "alert type" = Alert.BAR);

def sell = mov_avg8 < mov_avg13 and mov_avg13 < mov_avg21 and high < mov_avg8;

def stopsell = mov_avg8 >= mov_avg13;

def sellnow = !sell[1] and sell;

def sellsignal = CompoundValue(1, if sellnow and !stopsell then 1 else if sellsignal[1]==1 and stopsell then 0 else sellsignal[1], 0);

Plot Sell_Signal = sellsignal[1] ==0 and sellsignal;

Sell_signal.setpaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_down);

sell_signal.setDefaultColor(color.red);

Sell_signal.hidetitle();

Alert(condition = sellsignal[1] == 0 and sellsignal == 1, text = "Sell Signal", sound = Sound.Bell, "alert type" = Alert.BAR);

Plot Momentum_Up = sellsignal[1]==1 and sellSignal==0;

Momentum_up.setpaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_up);

Momentum_up.setDefaultColor(color.yellow);

Momentum_up.hidetitle();

Alert(condition = sellsignal[1] == 1 and sellSignal == 0, text = "Momentum_Up", sound = Sound.Bell, "alert type" = Alert.BAR);

plot Colorbars = if buysignal ==1 then 1 else if sellsignal ==1 then 2 else if buysignal ==0 or sellsignal==0 then 3 else 0;

colorbars.hide();

Colorbars.definecolor("Buy_Signal_Bars", color.dark_green);

Colorbars.definecolor("Sell_Signal_Bars", color.red);

Colorbars.definecolor("Neutral", color.yellow);

AssignPriceColor(if Colorbars ==1 then colorbars.color("buy_signal_bars") else if colorbars ==2 then colorbars.color("Sell_Signal_bars") else  colorbars.color("neutral"));

#end

Shareable Link

https://tos.mx/zbybTc
Can I turn off painted colors on candle sticks?
 
Can I turn off painted colors on candle sticks?
Delete this last line in the code "AssignPriceColor(if Colorbars ==1 then colorbars.color("buy_signal_bars") else if colorbars ==2 then colorbars.color("Sell_Signal_bars") else colorbars.color("neutral"));"

Add these two lines
Input Candlestick_Color = no;
Assignpricecolor(if Candlestick_Color and Colorbars == 1 then Colorbars.Color("buy_signal_bars") else if Candlestick_Color and Colorbars == 2 then Colorbars.Color("Sell_Signal_bars") else if Candlestick_Color then Colorbars.Color("neutral")else color.current);
 
Input Candlestick_Color = no;
Assignpricecolor(if Candlestick_Color and Colorbars == 1 then Colorbars.Color("buy_signal_bars") else if Candlestick_Color and Colorbars == 2 then Colorbars.Color("Sell_Signal_bars") else if Candlestick_Color then Colorbars.Color("neutral")else color.current);
Thank you very much for your help. It does turn off painted colors on candle sticks, but it also turns off painted volume. Is it possible to turn off painted colors and keep tainted volume?
 
Last edited:
Thank you very much for your help. It does turn off painted colors on candle sticks, but it also turns off painted volume. Is it possible to turn off painted colors and keep tainted volume?
No, ToS does not allow us to modify the properties of the Assignpricecolor function
Theoretically, you could write a dedicated Volume POC study and setdefaultcolor defined by Slim Ribbon
Here are examples of how to create a colored volume study:
https://usethinkscript.com/threads/volume-profile-indicator-pocs-for-thinkorswim.8153/
 
Last edited:
@markos Sure. Here's the watchlist column. For the scan I just use the study and direct the scan to the Slim Beta study and then adjust settings to what I'm interested in. But the column script should also work for the scan.

Code:
###############SLIM Column by easycators.com ####################
#Slims Trend and Momo

input price = close;

input superfast_length = 8;

input fast_length = 13;

input slow_length = 21;

input displace = 0;


def mov_avg8 = ExpAverage(price[-displace], superfast_length);

def mov_avg13 = ExpAverage(price[-displace], fast_length);

def mov_avg21 = ExpAverage(price[-displace], slow_length);


#moving averages

def Superfast = mov_avg8;

def Fast = mov_avg13;

def Slow = mov_avg21;


def buy = mov_avg8 > mov_avg13 and mov_avg13 > mov_avg21 and low > mov_avg8;

def stopbuy = mov_avg8 <= mov_avg13;

def buynow = !buy[1] and buy;

def buysignal = CompoundValue(1, if buynow and !stopbuy then 1 else if buysignal[1]==1 and stopbuy then 0 else buysignal[1], 0);


def Buy_Signal = buysignal[1] == 0 and buysignal==1;

def Momentum_Down = buysignal[1] ==1 and buysignal==0;


def sell = mov_avg8 < mov_avg13 and mov_avg13 < mov_avg21 and high < mov_avg8;

def stopsell = mov_avg8 >= mov_avg13;

def sellnow = !sell[1] and sell;

def sellsignal = CompoundValue(1, if sellnow and !stopsell then 1 else if sellsignal[1]==1 and stopsell then 0 else sellsignal[1], 0);


def Sell_Signal = sellsignal[1] ==0 and sellsignal;

def Momentum_Up = sellsignal[1]==1 and sellSignal==0;

# when using this as a custom scan, change the word plot to def
# then remove the '#' from in front of one of the "plot Scan" statements below
def Colorbars = if buysignal ==1 then 1 else if sellsignal ==1 then -1 else if buysignal ==0 or sellsignal==0 then 0 else 0;

# use this first Scan plot for SLM Ribbon Momentum UP
#plot Scan = if Colorbars == 1 then yes else no;

# use this second Scan plot for SLM Ribbon Momentum DOWN
#plot Scan = if Colorbars == -1 then yes else no;

# use this third Scan plot for SLM Ribbon Momentum FLAT
#plot Scan = if Colorbars == 0 then yes else no;

plot signal =
         if buy_signal then 4
    #else if momentum_up then 3
    #else if momentum_down then 2
    else if sell_signal then 1
    else 0;

signal.assignValueColor(
         if buy_signal then color.light_green
    else if sell_signal then color.light_red
    else if momentum_Up then color.dark_green
    else if momentum_Down then color.dark_red
    else color.black
);

assignBackgroundColor(
         if buy_signal then color.light_green
    else if sell_signal then color.light_red
    else if momentum_Up then color.DARK_GREEN
    else if momentum_Down then color.dark_red
    else color.black
);

P.S. Alot of problems now with "loading' that I didn't have before last week. This and other WL of my custom stuff has been effected. They tell me it may be due to some "adjustments" made in preparation for this weekends update.

This is another version of the SLIM watchlist column that indicates the current status of the indicator. Useful in different ways but what I have found is placing 2 or 3 columns together of different time frames its easy to spot what you might be looking for such as stocks in your watchlist that are in a long term uptrend but have paused shorter term.

Code:
#### SLIM Current Status ####
input price = close;

input superfast_length = 8;

input fast_length = 13;

input slow_length = 21;

input displace = 0;


def mov_avg8 = ExpAverage(price[-displace], superfast_length);

def mov_avg13 = ExpAverage(price[-displace], fast_length);

def mov_avg21 = ExpAverage(price[-displace], slow_length);


#moving averages

def Superfast = mov_avg8;

def Fast = mov_avg13;

def Slow = mov_avg21;


def buy = mov_avg8 > mov_avg13 and mov_avg13 > mov_avg21 and low > mov_avg8;

def stopbuy = mov_avg8 <= mov_avg13;

def buynow = !buy[1] and buy;

def buysignal = CompoundValue(1, if buynow and !stopbuy then 1 else if buysignal[1]==1 and stopbuy then 0 else buysignal[1], 0);


def Buy_Signal = buysignal[1] == 0 and buysignal==1;

def Momentum_Down = buysignal[1] ==1 and buysignal==0;


def sell = mov_avg8 < mov_avg13 and mov_avg13 < mov_avg21 and high < mov_avg8;

def stopsell = mov_avg8 >= mov_avg13;

def sellnow = !sell[1] and sell;

def sellsignal = CompoundValue(1, if sellnow and !stopsell then 1 else if sellsignal[1]==1 and stopsell then 0 else sellsignal[1], 0);


def Sell_Signal = sellsignal[1] ==0 and sellsignal;

def Momentum_Up = sellsignal[1]==1 and sellSignal==0;

# when using this as a custom scan, change the word plot to def
# then remove the '#' from in front of one of the "plot Scan" statements below
def Colorbars = if buysignal ==1 then 1 else if sellsignal ==1 then -1 else if buysignal ==0 or sellsignal==0 then 0 else 0;

# use this first Scan plot for SLM Ribbon Momentum UP
#plot Scan = if Colorbars == 1 then yes else no;

# use this second Scan plot for SLM Ribbon Momentum DOWN
#plot Scan = if Colorbars == -1 then yes else no;

# use this third Scan plot for SLM Ribbon Momentum FLAT
plot Scan = if Colorbars == 0 then yes else no;

assignBackgroundColor(if Colorbars == 1 then color.GREEN else if Colorbars == -1 then color.RED else color.YELLOW);
scan.setDefaultColor(color.black);

@dougn @BenTen @MerryDay @diazlaz
Is it possible to add detail to watchlist something similar to below. Thank you for your help.

ConditionLabelColor
Momentum Arrow UpUpYellow Background
Momentum UpLong UpBlack Background - Yellow Characters
Buy ArrowBuyGreen Background
Buy Arrrow ContinueLong BuyBlack Background - Green Characters
Momentum Arrow DownDownOrange Background
Momentum DownShort DownBlack Background - Orange Characters
Sell ArrowSellRed Background
Sell ContinueShort SellBlack Background - Red Characters
 
Last edited:

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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