Renko Alerts & Labels For ThinkOrSwim

younglove06

Member
2019 Donor
These codes are good for timed candles also, not just Renkos.

This is my first contribution to this forum, so let me know if there are questions.

Brick change from Up to Down(alert sounds at the open of the first brick).
Code:
# Renko Labels & Alerts  Brick change from Up to Down(alert sounds at the open of the first brick)
# @younglove06

def IsUp = close > open;
def IsDown = close < open;
def IsDoji = IsDoji();
def avgRange = 0.05 * Average(high - low, 20);

plot PatternPlot =   IsUp[1] and  IsDown[0];
PatternPlot.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);
PatternPlot.SetDefaultColor(CreateColor(255, 0, 0));

AddLabel(PatternPlot, "TREND CHANGE", if PatternPlot then Color.RED else color.current);
Alert(PatternPlot, "sell signal", Alert.BAR, Sound.Ring);

Brick change from Up to Down(alert sounds at the close of the first brick)
Code:
# Renko Labels & Alerts  Brick change from Up to Down(alert sounds at the close of the first brick)
# @younglove06

def IsUp = close > open;
def IsDown = close < open;
def IsDoji = IsDoji();
def avgRange = 0.05 * Average(high - low, 20);

plot PatternPlot =  IsUp[1] and IsDown[0];
PatternPlot.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);
PatternPlot.SetDefaultColor(CreateColor(255, 0, 0));

AddLabel(PatternPlot[1], "TREND CHANGE", if PatternPlot[1] then Color.RED else color.current);
Alert(PatternPlot[1], "sell signal", Alert.BAR, Sound.Ring);

Brick change from Down to Up(alert sounds at the open of the first brick)
Code:
# Renko Labels & Alerts  Brick change from Down to Up(alert sounds at the open of the first brick)
# @younglove06
def IsUp = close > open;
def IsDown = close < open;
def IsDoji = IsDoji();
def avgRange = 0.05 * Average(high - low, 20);

plot PatternPlot = IsDown[1] and IsUp[0];
PatternPlot.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);
PatternPlot.SetDefaultColor(CreateColor(0, 255, 0));

AddLabel(PatternPlot, "TREND CHANGE", if PatternPlot then Color.GREEN else color.current);
Alert(PatternPlot, "buy signal", Alert.BAR, Sound.Ring);

Brick change from Down to Up(alert sounds at the close of the first brick)
Code:
# Renko Labels & Alerts  Brick change from Down to Up(alert sounds at the close of the first brick)
# @younglove06

def IsUp = close > open;
def IsDown = close < open;
def IsDoji = IsDoji();
def avgRange = 0.05 * Average(high - low, 20);

plot PatternPlot = IsDown[1] and IsUp[0];
PatternPlot.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);
PatternPlot.SetDefaultColor(CreateColor(0, 255, 0));

AddLabel(PatternPlot[1], "TREND CHANGE", if PatternPlot[1] then Color.GREEN else color.current);
Alert(PatternPlot[1], "buy signal", Alert.BAR, Sound.Ring);

I love Renkos bars. I dont use them as a stand alone, but I definitely use them. :)
 
Last edited by a moderator:

diazlaz

Well-known member
2019 Donor
VIP
These codes are good for timed candles also, not just Renkos.

This is my first contribution to this form, so let me know if there are questions.

Brick change from Up to Down(alert sounds at the open of the first brick).

Code:
def IsUp = close > open;

def IsDown = close < open;

def IsDoji = IsDoji();

def avgRange = 0.05 * Average(high - low, 20);

plot PatternPlot =

    IsUp[1] and

    IsDown[0];



PatternPlot.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);

PatternPlot.SetDefaultColor(CreateColor(255, 0, 0));



AddLabel(PatternPlot, "TREND CHANGE", if PatternPlot then Color.RED else color.current);



Alert(PatternPlot, "sell signal", Alert.BAR, Sound.Ring);

Brick change from Up to Down(alert sounds at the close of the first brick)
Code:
def IsUp = close > open;

def IsDown = close < open;

def IsDoji = IsDoji();

def avgRange = 0.05 * Average(high - low, 20);

plot PatternPlot =

    IsUp[1] and

    IsDown[0];



PatternPlot.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);

PatternPlot.SetDefaultColor(CreateColor(255, 0, 0));



AddLabel(PatternPlot[1], "TREND CHANGE", if PatternPlot[1] then Color.RED else color.current);



Alert(PatternPlot[1], "sell signal", Alert.BAR, Sound.Ring);

Brick change from Down to Up(alert sounds at the open of the first brick)
Code:
def IsUp = close > open;

def IsDown = close < open;

def IsDoji = IsDoji();

def avgRange = 0.05 * Average(high - low, 20);

plot PatternPlot =

    IsDown[1] and

    IsUp[0];



PatternPlot.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);

PatternPlot.SetDefaultColor(CreateColor(0, 255, 0));



AddLabel(PatternPlot, "TREND CHANGE", if PatternPlot then Color.GREEN else color.current);



Alert(PatternPlot, "buy signal", Alert.BAR, Sound.Ring);

Brick change from Down to Up(alert sounds at the close of the first brick)
Code:
def IsUp = close > open;

def IsDown = close < open;

def IsDoji = IsDoji();

def avgRange = 0.05 * Average(high - low, 20);

plot PatternPlot =

    IsDown[1] and

    IsUp[0];



PatternPlot.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);

PatternPlot.SetDefaultColor(CreateColor(0, 255, 0));



AddLabel(PatternPlot[1], "TREND CHANGE", if PatternPlot[1] then Color.GREEN else color.current);



Alert(PatternPlot[1], "buy signal", Alert.BAR, Sound.Ring);

Thanks for this! Nice set.

Do you need to adjust average to tick size for it to work properly?

I have to look at my indicators, might have a few that will compliment these.

Thanks!
 

younglove06

Member
2019 Donor
Thanks for this! Nice set.

Do you need to adjust average to tick size for it to work properly?

I have to look at my indicators, might have a few that will compliment these.

Thanks!

Actually you just add it like any other indicator, so you will have already have set your tick size with the bars. So no matter how many ticks you set it for, whenever a new brick forms, you will get an alert, at the open or the close, depending on which codes you use. Or if you use them both, you will get an alert when a new brick both opens and closes. And YW!
 

camitos

Member
I think that code is great but is there any way it could only alert when 3+ bricks change the same colour as the bricks change colour all the time. 3+ in a row is definitely a better confirmation.

The alert on the close of the third I think would be great, you're awesome!
 
Last edited by a moderator:

younglove06

Member
2019 Donor
Here is the code. I was able to put the buy alert and sell alert within the same code. So after the close of the 3 consecutive color candle, you will hear the alert and see the "buy alert" or "sell alert" label in the top left corner. At the close of any consecutive candle after the 3rd, you will get the alert. So if there are 5 consecutive upward renko blocks, you will get the alert after the 3rd, then the 4th, then the 5th. If there is only 3 consecutive candles, you will only get the alert after the 3rd. Let me know if you have any questions or if there are any issues.


Code:
def IsUp = close > open;
def IsDown = close < open;
def IsDoji = IsDoji();
def avgRange = 0.05 * Average(high - low, 20);
plot PatternPlot =
    IsUp[2] and
    IsUp[1] and
    IsUp[0];

PatternPlot.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);
PatternPlot.SetDefaultColor(CreateColor(0, 255, 0));

#NEXT

def IsUp2 = close > open;
def IsDown2 = close < open;
def IsDoji2 = IsDoji();
def avgRange2 = 0.05 * Average(high - low, 20);
plot PatternPlot2 =
    IsDown[2] and
    IsDown[1] and
    IsDown[0];

PatternPlot2.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);
PatternPlot2.SetDefaultColor(CreateColor(204, 0, 0));


AddLabel(PATTERNPLOT[1] , "BUY ALERT", if PATTERNPLOT[1]  then Color.GREEN else color.current);

AddLabel(PATTERNPLOT2[1] , "SELL ALERT", if PATTERNPLOT2[1] then Color.RED else color.current);

Alert(PATTERNPLOT[1] , "buy signal", Alert.BAR, Sound.DING);
Alert(PATTERNPLOT2[1] , "sell signal", Alert.BAR, Sound.DING);
 

brendana

New member
@younglove06 I appreciate you writing out this code for us. I have set it up on my own thinkorswim account but for some reason the alerts won't send to phone or email even though I have them set up. Do these types of alerts not send texts or emails? thanks
 

MerryDay

Administrative
Staff member
Staff
VIP
Lifetime
Last edited:

MerryDay

Administrative
Staff member
Staff
VIP
Lifetime
Is it possible to set up a scan and or alert using a custom indicator on tos renko charts.
alerts and labels can be found here:
https://usethinkscript.com/threads/renko-alerts-labels-for-thinkorswim.775/
the above scripts can also be used in the scan hacker. For more information of how to set them up in the scan hacker:
https://usethinkscript.com/threads/how-to-use-thinkorswim-stock-hacker-scans.284/

How to search for answers to any additional questions:
https://usethinkscript.com/threads/search-the-forum.12626/
 
Last edited:

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.
Top