Candle retracement indicator

kingkunta

New member
HI all, hope you guys are having a great Friday. does anyone know where I can find an indicator which will highlight a candle/make an arrow if the candle is over certain percent retracement? for instance I want it to highlight the candle if a red candle is 67% bearish. For example
Thanks in advance for any help
 
HI all, hope you guys are having a great Friday. does anyone know where I can find an indicator which will highlight a candle/make an arrow if the candle is over certain percent retracement? for instance I want it to highlight the candle if a red candle is 67% bearish. For example
Thanks in advance for any help

Try this

Capture.jpg
Code:
plot retracement = if close < open and close < high - (.67 * (high - low)) then 1 else 0;
retracement.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

##Testing Code
plot retrace     = if close < open then high - (.67 * (high - low)) else Double.NaN;
retrace.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
retrace.SetDefaultColor(Color.WHITE);
retrace.SetLineWeight(3);
AddChartBubble(1, low, close + "\n" + (high - (.67 * (high - low))), Color.YELLOW, no);
 
This is EXACTLY what I needed. Thank you! is there a way to do it for the bullish side as well? How can I do that

Here is both bull and bear with testing. It should be easy to make any adjustments if it does not do the bull as you expected.

Ruby:
plot retracement_bull = if close > open and
                           close > low + (.67 * (high - low))
                        then 1 else 0;
retracement_bull.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
plot retracement_bear = if close < open and
                           close < high - (.67 * (high - low))
                        then 1 else 0;
retracement_bear.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

##Testing Bull Code
input testing = yes;
plot retrace_bull     = if close > open
                        then low + (.67 * (high - low))
                        else Double.NaN;
retrace_bull.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
retrace_bull.SetDefaultColor(Color.WHITE);
retrace_bull.SetLineWeight(3);
retrace_bull.SetHiding(!testing);

AddChartBubble(testing, high + .10, close + "\n" + (high - (.67 * (high - low))), Color.YELLOW);

##Testing Bear Code
plot retrace_bear     = if close < open
                        then high - (.67 * (high - low))
                        else Double.NaN;
retrace_bear.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
retrace_bear.SetDefaultColor(Color.WHITE);
retrace_bear.SetLineWeight(3);
retrace_bear.SetHiding(!testing);

AddChartBubble(testing, low - .10, close + "\n" + (high - (.67 * (high - low))), Color.YELLOW, no);
;
 
Here is both bull and bear with testing. It should be easy to make any adjustments if it does not do the bull as you expected.

Ruby:
plot retracement_bull = if close > open and
                           close > low + (.67 * (high - low))
                        then 1 else 0;
retracement_bull.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
plot retracement_bear = if close < open and
                           close < high - (.67 * (high - low))
                        then 1 else 0;
retracement_bear.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

##Testing Bull Code
input testing = yes;
plot retrace_bull     = if close > open
                        then low + (.67 * (high - low))
                        else Double.NaN;
retrace_bull.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
retrace_bull.SetDefaultColor(Color.WHITE);
retrace_bull.SetLineWeight(3);
retrace_bull.SetHiding(!testing);

AddChartBubble(testing, high + .10, close + "\n" + (high - (.67 * (high - low))), Color.YELLOW);

##Testing Bear Code
plot retrace_bear     = if close < open
                        then high - (.67 * (high - low))
                        else Double.NaN;
retrace_bear.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
retrace_bear.SetDefaultColor(Color.WHITE);
retrace_bear.SetLineWeight(3);
retrace_bear.SetHiding(!testing);

AddChartBubble(testing, low - .10, close + "\n" + (high - (.67 * (high - low))), Color.YELLOW, no);
;
Thank you so much!
 
Here is both bull and bear with testing. It should be easy to make any adjustments if it does not do the bull as you expected.

Ruby:
plot retracement_bull = if close > open and
                           close > low + (.67 * (high - low))
                        then 1 else 0;
retracement_bull.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
plot retracement_bear = if close < open and
                           close < high - (.67 * (high - low))
                        then 1 else 0;
retracement_bear.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

##Testing Bull Code
input testing = yes;
plot retrace_bull     = if close > open
                        then low + (.67 * (high - low))
                        else Double.NaN;
retrace_bull.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
retrace_bull.SetDefaultColor(Color.WHITE);
retrace_bull.SetLineWeight(3);
retrace_bull.SetHiding(!testing);

AddChartBubble(testing, high + .10, close + "\n" + (high - (.67 * (high - low))), Color.YELLOW);

##Testing Bear Code
plot retrace_bear     = if close < open
                        then high - (.67 * (high - low))
                        else Double.NaN;
retrace_bear.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
retrace_bear.SetDefaultColor(Color.WHITE);
retrace_bear.SetLineWeight(3);
retrace_bear.SetHiding(!testing);

AddChartBubble(testing, low - .10, close + "\n" + (high - (.67 * (high - low))), Color.YELLOW, no);
;
Hey sleepyz is it possible with this code to plot an arrow for reversal candles. So for instance when a bull bar is made its at some point the close becomes less then its open with a significant tail I would like it to plot an arrow if that bear bar closes below its mid point value. Tell me if that makes sense. I like the fact that this code allows me to to choose .50 or .70 in terms of when that arrow plots because it can determine the strength of the bar.
 

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