Renko Wave Volume

Arete-Invictus

New member
I'm looking to see if anyone can help me with building an indicator. I'm interested in trading forex and am currently using renko charts in conjunction with time based candles. I'm wondering if it would be possible to build an indicator that can add up the tick count (tick count shown in lower part of screenshot as a histogram) of all of the bricks within each up and down wave as well as the time of duration for each wave and have these numbers painted on the chart. I've attached a screenshot of the renko chart I'm using. Any help is greatly appreciated!



qs8NrtK.jpg
 
Solution
Something like this perhaps... no editor open right now but this should be close. The idea of trend change is to see if last bar and this bar have changed direction and then use that to either reset the trend tick_count or add to it.

maybe it won't do anything. :)

Code:
def trend_change = if (open[1] < close[1] and open > close) or (open[1] > close[1] and open < close) then 1 else 0;
def cumulative_trend_tick_count = if trend_change == 1 then tick_count() else cumulative_trend_tick_count[1] + tick_count();
plot CTTC = cumulative_trend_tick_count;

-mashume
Something like this perhaps... no editor open right now but this should be close. The idea of trend change is to see if last bar and this bar have changed direction and then use that to either reset the trend tick_count or add to it.

maybe it won't do anything. :)

Code:
def trend_change = if (open[1] < close[1] and open > close) or (open[1] > close[1] and open < close) then 1 else 0;
def cumulative_trend_tick_count = if trend_change == 1 then tick_count() else cumulative_trend_tick_count[1] + tick_count();
plot CTTC = cumulative_trend_tick_count;

-mashume
 
Solution

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

Something like this perhaps... no editor open right now but this should be close. The idea of trend change is to see if last bar and this bar have changed direction and then use that to either reset the trend tick_count or add to it.

maybe it won't do anything. :)

Code:
def trend_change = if (open[1] < close[1] and open > close) or (open[1] > close[1] and open < close) then 1 else 0;
def cumulative_trend_tick_count = if trend_change == 1 then tick_count() else cumulative_trend_tick_count[1] + tick_count();
plot CTTC = cumulative_trend_tick_count;

-mashume
Thanks so much! This is very helpful! I've posted a screenshot of the tick counter below which is showing as a line study in the lower box. When I tried to put in on the price chart the boxes disappeared and only the line was showing.

When I put my cursor on the last brick of a wave (as shown in the screenshot) the counter gives me the cumulative tick number for that wave, which is exactly what I wanted. I wonder, is there a way to put that number on the price chart itself right above an up wave and below a down wave? My coding skills are not very good and I appreciate all of your help. If not, it's no trouble at all, you have been very helpful. Thank you again!



TeIzezY.png
 
make yourself another study:

Code:
declare upper;
def trend_change = if (open[1] < close[1] and open > close) or (open[1] > close[1] and open < close) then 1 else 0;
def cumulative_trend_tick_count = if trend_change == 1 then tick_count() else cumulative_trend_tick_count[1] + tick_count();
addChartBubble(open[1] < close[1] and open > close, high, "CTTC: " + cumulative_trend_tick_count[1], color.light_red, down);
addChartBubble(open[1] > close[1] and open < close, high, "CTTC: " + cumulative_trend_tick_count[1], color.light_green, up);

I think. Perhaps. On a good day.

-mashume
 
Last edited:
make yourself another study:

Code:
declare upper;
def trend_change = if (open[1] < close[1] and open > close) or (open[1] > close[1] and open < close) then 1 else 0;
def cumulative_trend_tick_count = if trend_change == 1 then tick_count() else cumulative_trend_tick_count[1] + tick_count();
addChartBubble(open[1] < close[1] and open > close, high, "CTTC: " + cumulative_trend_tick_count[1], color.light_red, down);
addChartBubble(open[1] > close[1] and open < close, high, "CTTC: " + cumulative_trend_tick_count[1], color.light_green, up);

I think. Perhaps. On a good day.

-mashume

Exactly what I was looking for. Thank you very much!

5Onop8R.png
 
Edited the code a bit to make it cleaner... hope it provides the same information.
I changed the position of the bubbles, and fixed the code. Also rearranged the colours so red is down and green is up. And I think the tick count is correct now (was missing the last bar of the trend previously)
Code:
declare upper;
def trend_change = if (open[1] < close[1] and open > close) or (open[1] > close[1] and open < close) then 1 else 0;

def cumulative_trend_tick_count = if trend_change == 1 then tick_count() else cumulative_trend_tick_count[1] + tick_count();

AddChartBubble("time condition" = open[0] < close[0] and open[-1] > close[-1], "price location" = high, text = "CTTC: " + cumulative_trend_tick_count[0], color = Color.LIGHT_green, Yes);

addChartBubble(open[0] > close[0] and open[-1] < close[-1], low, "CTTC: " + cumulative_trend_tick_count[0], color.light_red, No);

mashume
 
While we're on this thread, here's an interesting visualization of a lower:
Code:
declare lower;
input length = 15;
def trend_change = if (open[1] < close[1] and open > close) or (open[1] > close[1] and open < close) then 1 else 0;

def direction = if (open[1] < close[1] and open > close) then -1 else if (open[1] > close[1] and open < close) then 1 else direction[1];

def cumulative_trend_tick_count = if trend_change == 1 then direction * tick_count() else cumulative_trend_tick_count[1] + (direction * tick_count());
plot CTTC = cumulative_trend_tick_count;

CTTC.AssignValueColor(if CTTC <= 0 then color.dark_red else color.dark_green);
CTTC.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);

plot sumsum = sum(CTTC, length) / length;
sumsum.SetDefaultColor(color.black);
sumSum.AssignValueColor(if sumsum <= 0 then color.light_red else color.light_green);
SumSum.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);

tcXDpIF.png
 
While we're on this thread, here's an interesting visualization of a lower:
Code:
declare lower;
input length = 15;
def trend_change = if (open[1] < close[1] and open > close) or (open[1] > close[1] and open < close) then 1 else 0;

def direction = if (open[1] < close[1] and open > close) then -1 else if (open[1] > close[1] and open < close) then 1 else direction[1];

def cumulative_trend_tick_count = if trend_change == 1 then direction * tick_count() else cumulative_trend_tick_count[1] + (direction * tick_count());
plot CTTC = cumulative_trend_tick_count;

CTTC.AssignValueColor(if CTTC <= 0 then color.dark_red else color.dark_green);
CTTC.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);

plot sumsum = sum(CTTC, length) / length;
sumsum.SetDefaultColor(color.black);
sumSum.AssignValueColor(if sumsum <= 0 then color.light_red else color.light_green);
SumSum.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);

tcXDpIF.png

Awesome! You have been extremely helpful and I cannot thank you enough!!
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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