AverageCandleValue

mashume

Expert
VIP
Lifetime
For anyone out there who wants another way to look at volatility, here's a little something I was curious about and so coded up. Offered here with minimal explanation:

Average Candle Value
Using tickValue() and tickSize() functions:
Code:
declare lower;

def ts = TickSize();
def tv = TickValue();

def r = average(data = HIGH - LOW, length = 20);

plot AverageCandleValue = tv * (r / ts);

addlabel(yes, "tick size = " + ts);
addLabel(yes, "tick value = " + tv);

plots a simple line representing the value of a candle for whatever future contract you happen to be trading.

OelVHqR.png


Happy Trading,
mashume


Edit:
Here's another interesting twist: Run two lines, one with the full range (high - low) and another with the absolute value of the close - open. Compare the two lines and see how sometimes a lot of volatility goes into movement and other times it doesn't.


6adZud3.png

Code:
declare lower;

def ts = TickSize();
def tv = TickValue();

def r = average(data = HIGH - LOW, length = 20);
def er = average(data = AbsValue(CLOSE - OPEN), length = 20);

plot AverageCandleTotalValue = tv * (r / ts);
plot AverageCandleValue = tv * (er / ts);

addlabel(yes, "tick size = " + ts);
addLabel(yes, "tick value = " + tv);

I post most of this stuff because I find it interesting, whether or not you find it interesting or useful is up to you.
mashume
 
Last edited:
I don't have much experience in the futures section but will this indicator work on normal stocks?
Yes, it will work. The biggest difference is that in stocks (as far as I know and not counting otc issues where movements might be 0.001) the minimum movement is 0.01 and the value of that movement is $0.01 -- at least movement and price are in a 1:1 relationship, regardless the minimum increment size. This is different from futures, where, for /ES, the tick (minimum movement) is 0.25 and the value of that move is $12.50. For other futures contracts, the tick and value are different -- thus this indicator. But yes, it will run on stocks.
 
Yes, it will work. The biggest difference is that in stocks (as far as I know and not counting otc issues where movements might be 0.001) the minimum movement is 0.01 and the value of that movement is $0.01 -- at least movement and price are in a 1:1 relationship, regardless the minimum increment size. This is different from futures, where, for /ES, the tick (minimum movement) is 0.25 and the value of that move is $12.50. For other futures contracts, the tick and value are different -- thus this indicator. But yes, it will run on stocks.
Hi Mashume,
which cloud study in upper chart?
 
For anyone out there who wants another way to look at volatility, here's a little something I was curious about and so coded up. Offered here with minimal explanation:

Average Candle Value
Using tickValue() and tickSize() functions:
Code:
declare lower;

def ts = TickSize();
def tv = TickValue();

def r = average(data = HIGH - LOW, length = 20);

plot AverageCandleValue = tv * (r / ts);

addlabel(yes, "tick size = " + ts);
addLabel(yes, "tick value = " + tv);

plots a simple line representing the value of a candle for whatever future contract you happen to be trading.

OelVHqR.png


Happy Trading,
mashume


Edit:
Here's another interesting twist: Run two lines, one with the full range (high - low) and another with the absolute value of the close - open. Compare the two lines and see how sometimes a lot of volatility goes into movement and other times it doesn't.


6adZud3.png

Code:
declare lower;

def ts = TickSize();
def tv = TickValue();

def r = average(data = HIGH - LOW, length = 20);
def er = average(data = AbsValue(CLOSE - OPEN), length = 20);

plot AverageCandleTotalValue = tv * (r / ts);
plot AverageCandleValue = tv * (er / ts);

addlabel(yes, "tick size = " + ts);
addLabel(yes, "tick value = " + tv);

I post most of this stuff because I find it interesting, whether or not you find it interesting or useful is up to you.
mashume
hi @mashume very nice job, question do you mine share your charts with me, it is look pretty nice setup. thank you in advance
 
hi @mashume very nice job, question do you mine share your charts with me, it is look pretty nice setup. thank you in advance
I can't share the chart, as the BTD indicator is a premium indicator from this site and I am not licensed to redistribute it. Thanks for your understanding.
-mashume
 
Maybe this is a dumb question but does this only work on tick charts or do the tick size and tick value functions work on candle charts? I trade using candle charts and I imagine one use of this indicator could be for helping to determine how much to adjust the width of stops as well as quick scalp targets, if attempting to scalp intra-candle volatility or heavy chop.
 
If you guys like this idea as a way of measuring volatility, you should read some of Tom Bulkowski's material on the NR7 pattern. Tom has written several books, and uses the NR7 pattern as part of his CPI (chart pattern indicator) process. Really neat stuff. It's basically saying "where are we consolidating, and how will we likely breakout?" It's similar to how I trade, though I don't use the NR7 or CPI - but they're similar concepts.

Here's his website.
https://thepatternsite.com/CPIUpdate.html
 
Maybe this is a dumb question but does this only work on tick charts or do the tick size and tick value functions work on candle charts? I trade using candle charts and I imagine one use of this indicator could be for helping to determine how much to adjust the width of stops as well as quick scalp targets, if attempting to scalp intra-candle volatility or heavy chop.
TickSize() will return $0.01 for stocks (where the minimum price change is 1 cent -- anyone else remember ticks of 1/8). TickValue() will also return $0.01 for stocks, assuming that a change of 1 cent in the price is valued at 1 cent (which I can't think of a time it isn't for stocks).

-mashume
 
TickSize() will return $0.01 for stocks (where the minimum price change is 1 cent -- anyone else remember ticks of 1/8). TickValue() will also return $0.01 for stocks, assuming that a change of 1 cent in the price is valued at 1 cent (which I can't think of a time it isn't for stocks).

-mashume

I wasn’t very clear, sorry: I meant to ask if the indicator can be used in time-based candle charts such with as 1min candles, 5min candles, etc. instead of using it with a tick chart.
 
I wasn’t very clear, sorry: I meant to ask if the indicator can be used in time-based candle charts such with as 1min candles, 5min candles, etc. instead of using it with a tick chart.
I can't see why it wouldn't

-mashume
 

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

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
301 Online
Create Post

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