LBR Indicator Label, Watchlist, Scan For ThinkOrSwim

@tomsk Thank you! I will use this tonight on demand. Had a great day today. Im suspect everyone did.
 
This is very useful! Is it possible to move the arrows to give a little space between the high or low of the price bar?
 
This is very useful! Is it possible to move the arrows to give a little space between the high or low of the price bar?

@Sully Absolutely, here is version 1.1 of the code with the adjusted arrows as requested

Code:
# LBR Three Ten Signal Arrows
# tomsk
# 12.14.2019

# V1.0 - 12.11.2019 - tomsk - Initial release of LBR Three Ten Signal Arrows
# V1.1 - 12.14.2019 - tomsk - Adjusted buy/sell arrows to display outside daily range

# Displays signals when the FastLine crosses the SlowLine.
# Configure your preferences to display CrossUp/CrossDn signals

input showCrossUp = yes;
input showCrossDn = no;
input price = close;
input calculationMode = {default Normal, Alternate};

def FastLine;
switch (calculationMode) {
case Normal:
    FastLine = Average(price, 3) - Average(price, 10);
case Alternate:
    FastLine = Average(price - Average(price[3], 3), 2);
}
def SlowLine = Average(FastLine, 16);

plot crossUp = if showCrossUp and FastLine crosses above SlowLine then 0.998 * low else Double.NaN;
crossUp.SetpaintingStrategy(PaintingStrategy.ARROW_UP);
crossUp.SetDefaultColor(Color.YELLOW);
crossUp.SetLineWeight(4);

plot crossDn = if showCrossDn and FastLine crosses below SlowLine then 1.002 * high else Double.NaN;
crossDn.SetpaintingStrategy(PaintingStrategy.ARROW_DOWN);
crossDn.SetDefaultColor(Color.CYAN);
crossDn.SetLineWeight(4);
# End LBR Three Ten Signal Arrows
 
Last edited:
@MBF Here is a Watchlist Column for you to load & try out. I think it looks good. Many thanks to our friend, Paris!
You can put the "LBR Three Ten Signal Arrows" study on an upper that @tomsk created.

Code:
# LBR Three Ten Watchlist Xup-Xdn
# Paris
# 12.19.2019
# Based on initial work by tomsk/markos, December 2019
# Watchlist column to display crossUp/Dn signals of FastLine over or under SlowLine
#
# Ordinarily I like one single marketwatch column to display a single condition
# Suggest that you implement the crossUp/Dn via a single column instead of two
# You can achieve this via different colors.


input price = close;
input calculationMode = {default Normal, Alternate};

def FastLine;
switch (calculationMode) {
case Normal:
    FastLine = Average(price, 3) - Average(price, 10);
case Alternate:
    FastLine = Average(price - Average(price[3], 3), 2);
}

def SlowLine = Average(FastLine, 16);
def crossUp = CompoundValue(1, FastLine crosses above SlowLine, 0);
def crossDn = CompoundValue(1, FastLine crosses below SlowLine, 0);

AddLabel(1, if crossUp then "XUP" else if crossDn then "XDN" else "", Color.BLACK);
AssignBackgroundColor(if crossUp then Color.CYAN
                      else if crossDn then Color.YELLOW
                      else Color.BLACK);
# End Code
 
@markos THAT is remarkable! Thank you SOOOO much Markos! I know you've been working hard on this and I can't tell you how much I appreciate this. I really love this indicator and its great for day trading and scalping along with Lag/TMO and @tomsk 's Indi. Oh and I love Paris! 🥰 🙌
 
@Sully Absolutely, here is version 1.1 of the code with the adjusted arrows as requested

Code:
# LBR Three Ten Signal Arrows
# tomsk
# 12.14.2019

# V1.0 - 12.11.2019 - tomsk - Initial release of LBR Three Ten Signal Arrows
# V1.1 - 12.14.2019 - tomsk - Adjusted buy/sell arrows to display outside daily range

# Displays signals when the FastLine crosses the SlowLine.
# Configure your preferences to display CrossUp/CrossDn signals

input showCrossUp = yes;
input showCrossDn = no;
input price = close;
input calculationMode = {default Normal, Alternate};

def FastLine;
switch (calculationMode) {
case Normal:
    FastLine = Average(price, 3) - Average(price, 10);
case Alternate:
    FastLine = Average(price - Average(price[3], 3), 2);
}
def SlowLine = Average(FastLine, 16);

plot crossUp = if showCrossUp and FastLine crosses above SlowLine then 0.998 * low else Double.NaN;
crossUp.SetpaintingStrategy(PaintingStrategy.ARROW_UP);
crossUp.SetDefaultColor(Color.YELLOW);
crossUp.SetLineWeight(4);

plot crossDn = if showCrossDn and FastLine crosses below SlowLine then 1.002 * high else Double.NaN;
crossDn.SetpaintingStrategy(PaintingStrategy.ARROW_DOWN);
crossDn.SetDefaultColor(Color.CYAN);
crossDn.SetLineWeight(4);
# End LBR Three Ten Signal Arrows

FANTASTIC thank you
 
@MBF Here is a Watchlist Column for you to load & try out. I think it looks good. Many thanks to our friend, Paris!
You can put the "LBR Three Ten Signal Arrows" study on an upper that @tomsk created.

Code:
# LBR Three Ten Watchlist Xup-Xdn
# Paris
# 12.19.2019
# Based on initial work by tomsk/markos, December 2019
# Watchlist column to display crossUp/Dn signals of FastLine over or under SlowLine
#
# Ordinarily I like one single marketwatch column to display a single condition
# Suggest that you implement the crossUp/Dn via a single column instead of two
# You can achieve this via different colors.


input price = close;
input calculationMode = {default Normal, Alternate};

def FastLine;
switch (calculationMode) {
case Normal:
    FastLine = Average(price, 3) - Average(price, 10);
case Alternate:
    FastLine = Average(price - Average(price[3], 3), 2);
}

def SlowLine = Average(FastLine, 16);
def crossUp = CompoundValue(1, FastLine crosses above SlowLine, 0);
def crossDn = CompoundValue(1, FastLine crosses below SlowLine, 0);

AddLabel(1, if crossUp then "XUP" else if crossDn then "XDN" else "", Color.BLACK);
AssignBackgroundColor(if crossUp then Color.CYAN
                      else if crossDn then Color.YELLOW
                      else Color.BLACK);
# End Code

FANTASTIC thank you
 
Hi everyone,
I have been working on this for a while. Ive managed to get the color columns but I can't figure out the crossings since I believe both the 3, 10 are the same. I think. Anyway this is as far as I got. I want the 3/10 crossing above the slow 16. HELP! Driving me bonkers.
Here is the script for the indicator: and below that is what Ive made so far. I dont know how to script but I managed a few things.

Code:
# TD Ameritrade IP Company, Inc. (c) 2011-2019

declare lower;

input price = close;
input calculationMode = {default Normal, Alternate};

plot FastLine;
switch (calculationMode) {
case Normal:
    FastLine = Average(price, 3) - Average(price, 10);
case Alternate:
    FastLine = Average(price - Average(price[3], 3), 2);
}
plot SlowLine = Average(FastLine, 16);
plot Hist = FastLine;
plot ZeroLine = 0;

FastLine.SetDefaultColor(GetColor(1));
SlowLine.SetDefaultColor(GetColor(8));
Hist.DefineColor("Positive", Color.UPTICK);
Hist.DefineColor("Negative", Color.DOWNTICK);
Hist.AssignValueColor(if Hist >= 0 then Hist.color("Positive") else Hist.color("Negative"));
Hist.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Hist.HideTitle();
ZeroLine.SetDefaultColor(GetColor(7));

So far:

Code:
INPUT ma1 = 3;

INPUT ma2 = 16;

DEF ALERT =SimpleMovingAvg("length" = ma1)."SMA" crosses SimpleMovingAvg("length" = ma2)."SMA";
Alert(ALERT, "MA CROSSES MA2", Alert.BAR, Sound.Ring);
# WILL CHANGE THE COLOR OF THE TEXT INSIDE THE COLUMN BOX
AddLabel(yes, IF
SimpleMovingAvg("length" = ma1)."SMA" >
SimpleMovingAvg("length" = ma2)."SMA" THEN
ma1 ELSE ma2 ,IF
SimpleMovingAvg("length" = ma1)."SMA" <
SimpleMovingAvg("length" = ma2)."SMA" then
color.RED else color.GREEN);

#WILL CHANGE THE COLOR OF THE COLUMN BOX
AssignBackgroundColor (IF
SimpleMovingAvg("length" = ma1)."SMA" <
SimpleMovingAvg("length" = ma2)."SMA" then
color.RED else color.Light_GREEN);


#ALERT.AssignValueColor(if CLOSE  > ma1 then Color.DARK_GREEN else Color.Orange);
@MBF save what you have here. It is a good start for a crossover alert.
 
@tomsk You know those people who's brain works at sonic speeds, has 350 things swirling around in it like a fish tank at Seaworld? That's me. If I am studying charts all day and can't figure something out right then and there, then this has become my favorite stomping grounds for answers. Instead of slowing my roll, taking a deep breath and going through each individual thing that could be the problem, ... I receive from the Gods, frustration. They weren't kidding when they said trading will get you to know yourself. With that said, I figured it out on my own after stepping away, which has become extremely hard for me to accomplish lately.

1~ I had the extended hours checked in the scan with after-hours off on charts.
2~ I also just realized yesterday that every time I scan I have not always been resetting the scanner so all my scans are a mess now.

I understand this post may make you question my questions but, I am doing the best I can at that moment and I do get overwhelmed sometimes. Due to that, I might be coming in here to get answers and a break from thinking. I know its an inconvenience to your time and I sincerely apologize and truly appreciate that you always try to come to my rescue.

@MBF I've got a couple of comments. Firstly this might not be the most appropriate thread to ask about follow up questions on the LBR. Suggest that you repost your query under the LBR thread to enable ease of searches. Otherwise @BenTen would be kept busy by moving posts around to more appropriate threads to facilitate easier searches by folks interested in that topic

Secondly your query is unclear, so when you do repost to the LBR thread, post the actual study/scan you are using and state explicitly what you're looking for, aggregation periods, etc so that readers can get up to speed rather than have to second guess or make assumptions about the request. A golden rule I keep is when in doubt OVER communicate rather than under communicate
 
@tomsk I understand this post may make you question my questions but, I am doing the best I can at that moment and I do get overwhelmed sometimes. Due to that, I might be coming in here to get answers and a break from thinking. I know its an inconvenience to your time and I sincerely apologize and truly appreciate that you always try to come to my rescue.


@MBF Absolutely no inconvenience, when you have a question, all you really need is to articulate your question clearly without making any assumptions about the reader's prior understanding of the subject matter. That is always the best way to approach it. That way everybody can learn from that experience - yes, even those with absolutely no understanding of the subject matter. On top of that, it helps speed up the problem resolution
 
Last edited:
Hullo there, been a while.
I am trying to mash up two indicators into one. Then LBR and ROC, what have I done wrong? Help please?
Code:
#
# TD Ameritrade IP Company, Inc. (c) 2011-2019
#
#LBR
declare lower;

def price = close;
def calculationMode = {default Normal, Alternate};

    FastLine = Average(price, 3) - Average(price, 10);
case Alternate:
    FastLine = Average(price - Average(price[3], 3), 2);
}
plot SlowLine = Average(FastLine, 16);
plot Hist = FastLine;
plot ZeroLine = 0;

FastLine.SetDefaultColor(GetColor(1));
SlowLine.SetDefaultColor(GetColor(8));
Hist.DefineColor("Positive", Color.UPTICK);
Hist.DefineColor("Negative", Color.DOWNTICK);
Hist.AssignValueColor(if Hist >= 0 then Hist.Color("Positive") else Hist.Color("Negative"));
Hist.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Hist.HideTitle();
ZeroLine.SetDefaultColor(GetColor(7));

#end LBR


#ROC
declare lower;

def length = 14;
def colorNormLength = 14;
def price = close;

Assert(length > 0, "'length' must be positive: " + length);

plot ROC = if price[length] != 0 then (price / price[length] - 1) * 100 else 0;
plot ZeroLine = 0;

ROC.DefineColor("Highest", Color.YELLOW);
ROC.DefineColor("Lowest", Color.LIGHT_RED);
ROC.AssignNormGradientColor(colorNormLength, ROC.Color("Lowest"), ROC.Color("Highest"));
ZeroLine.SetDefaultColor(GetColor(5));
#End ROC
 
Also, I was trying to do another indicator but I have absolutely no idea what they're talking about. This indicator takes a 3 period SRI of a 1 period ROC and has a two line 20/20 bracket (like oversold overbought but both at 20. No idea. Does anyone know what they are trying to say here?
 
@MBF Interesting. Will take a look. Did you see the ROC RSI that I posted in the Warehouse? Is it the same as the one you're looking for?
 
@MBF The ROC/RSI I shared in the Warehouse uses the default settings from both original indicators. You would have to change the length according to your liking.
 
@MBF The ROC/RSI I shared in the Warehouse uses the default settings from both original indicators. You would have to change the length according to your liking.
I have the RSI on 3 OB/OS 70/30 and the ROC on Simple HL/2, I cant change ROC to 1
 

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
515 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