Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Mark a candle which is above 30% of the average length
Hi
Could anyone help me with a thinkorswim script that marks a candle with a number that shows its candle size (high to low) if its above 30% of the average candle size length of the time frame I'm in? So if I'm in a 1min 3 days, its shows marks only the candles with length of the ones that are 30% longer (high to low) than the average length, if I chance it to 10 days, 5min, same thing.
I want a yellow box with the candle length like its in this thread (this tread shows the price, I want the length of the candle)
See the post in this forum called: Candlestick Size Indicator Improved
Also if its possible to have a text box and the bottom showing what the average candle length is, that would be great!
Can you help answer these questions from other members on NexusFi?
Candle size is range. Average candle size is the average range of a specific number of prior candles. How many candles do use in the average you are requesting (14, 20, 50, etc.)?
Is it possible to chose that is use the current timeframe that I use the chart? Like it takes the range for 10 days if Im on a 10 days timerframe and then 3 days range if I use a 3 days time frame? If not, then 60 candles would ne nice since I use 1min
Hello, enjoy the scripts. I have created an upper and lower study for you to use. Your criteria is listed by default and must use a defined average length and percent, but has inputs for you to modify them. There is a way to make them plot using all the bars on the chart but that requires more time than I have.
This study will mark the candles whose range expands > 30% of the N value average range. This examines average range (high - low), not ATR, and excludes the current candle to ensure the average range is anchored. The current bar is not included with the average range so that the average range does not change while the current bar is forming its range.
By default the upper study shows the labels with expansion %, average range, and current bar range, and the dots above the bars that are outside the range %. Both can be turned off to avoid hiding candles. I created a lower study to keep your price chart clean and help you visualize the range compared to the average range. Certain elements can be turned off on it as well. Copy and paste the following scripts into your platform. I have attached an image to show how these look as of the time I post them.
UPPER STUDY
# Begin script
#VanDriver @ Futures.io on Sept 22, 2020.
# Request: mark candle range whose range expands > 30% of the N value average range. This examines average range, not ATR, and excludes the current candle to ensure the average range is anchored. This is the upper study that goes with the lower.
Plot Dot = if dots and rangeX then high else na;
dot.setdefaultColor(color.yellow);
dot.setpaintingStrategy(PaintingStrategy.TRIANGLES);
dot.HideBubble();
dot.hideTitle();
dot.setLineWeight(3);
AddChartBubble(bubbles and rangeX, high, text = "Stretch " + AsPercent(avgrp) + "\n AvgRange " + Round((avgrange), 2) + "\n Range Size " + Round((range), 2), Color.light_gray);
# end script
---
LOWER STUDY
# Begin script
#VanDriver @ Futures.io on Sept 22, 2020.
# Request: mark candle range whose range expands > 30% of the N value average range. This examines average range, not ATR, and excludes the current candle to ensure the average range is anchored. This is the lower study and requires the upper to see plots on the candles.