Single-Candle Reversal & Confirmation Pattern

mohitdas

New member
VIP
A Single Reversal Candle is a Bullish Pin Bar whereby the Body of the candle is ABOVE EMA(50, 100 or 200) support and the shadow of the candle extends below EMA (50, 100 or 200)support.

The Reversal Candle is followed by a confirmation candle. The confirmation candle( bullish) must make a HIGHER LOW than the low of the reversal candle and CLOSE HIGHER than the high of reversal candle.

gBoTf07.jpg
[/URL]

Conditions i am looking for
1) The body of the Bullish Pin( Reversal Candle) bar must be above the EMA
2) The Lower Shadow of that Reversal Candle( Wick) must cut below the EMA
3) Reversal Candle must be follow by a Bullish Candle
4) Confirmation Candle must make Higher Low then the low of the reversal candle and close higher than the high of the Candle.

Would it be possible to put an alert Green Arrow(Buy) on the Confirmation Candle and Red Arrow( Sell) when its time to exit.
 
Last edited:

mashume

Well-known member
VIP
Lifetime
I actually just coded up something similar for bounces off the VWAP.

Here's something for you...

Code:
# Single-Candle Reversal & Confirmation Pattern
#
# Mashume @ usethinkscript.com
#
# 2020-05-20
# https://usethinkscript.com/threads/single-candle-reversal-confirmation-pattern.2563/
#
# Per request and details by mohitdas
#


declare upper;

input EMA_Length = 50;
input pin_factor = 2;

def EMA = MovAvgExponential(length = EMA_Length);
def body_height = max(open, close) - min(open, close);


def reversal_candle = if low < EMA and min(open, close) > EMA
    and low < (min(open, close) - body_height * pin_factor)
    and high == max(open, close)
    then 1 else double.nan;

def confirmation_candle = if low > low[1]
    and CLOSE > high[1]
    then 1 else double.nan;

plot SCRCP = if confirmation_candle and reversal_candle[1] then EMA else double.nan;
    SCRCP.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
    SCRCP.SetDefaultColor(COLOR.GREEN);
    SCRCP.SetLineWeight(2);

Happy Trading,
Mashume
 

mohitdas

New member
VIP
@mashume Thank You for coding this, i have tested it and it doesnt seem to work. Things i have done. Added a new Study and copied your code and tried it on different timeframes like 1Y:1D 1D:1min. Am i doing something wrong
 

asragov

Member
2019 Donor
VIP
@mashume Thank You for coding this, i have tested it and it doesnt seem to work. Things i have done. Added a new Study and copied your code and tried it on different timeframes like 1Y:1D 1D:1min. Am i doing something wrong

Try it in a scan ("is true")- it is not that common of an occurence, but it will return some results (e.g. in the last 30 days, there are about 50 instances on daily charts) - it will not apply for most symbols in most timeframes
 

lukeskywalker

New member
"Revers" Candlestick Pattern Indicator
The indicator shows signals with arrows in the chart when such a candlestick pattern appears. The arrows are adjustable.
________
Code:
#thinkscript indicator: Revers.
#Shows the pattern of "reverse reversal"
#by thetrader.top
def bSignalUp = high[1]>high[2] and close[1]>high[2] and open>high[1] and close<close[1];
def bSignalDown = high[1]<high[2] and close[1]<low[2] and open<low[1] and close>close[1];
plot up = if bSignalUp  then high else double.NaN;
plot down = if bSignalDown then high else double.NaN;
up.SetPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_down);
down.SetPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_up);
up.setDefaultColor(color.LIGHT_red);
down.setDefaultColor(color.LIGHT_green);
 

mohitdas

New member
VIP
@lukeskywalker Thank You for coding this, is it not very common for these indicators to appear because all the condition don't meet all the time?

I am basically trying to build a scan (Sample Attached) and the scan will give me potential stocks and i will use below conditions within an indicator so i can decide on the Entry/Exit, Stop Loss and Target Price.

Below are the condition i consider before entering a trade, if S&P 500 >20EMA i look for Long Trades and if its less i look for Short Trade and along with that below conditions for Entry/Exit

rqnkgCp.png

NEOksPd.png
 
Last edited:
T

Thomas

Guest
@lukeskywalker Thank You for coding this, is it not very common for these indicators to appear because all the condition don't meet all the time?

I am basically trying to build a scan (Sample Attached) and the scan will give me potential stocks and i will use below conditions within an indicator so i can decide on the Entry/Exit, Stop Loss and Target Price.

Below are the condition i consider before entering a trade, if S&P 500 >20EMA i look for Long Trades and if its less i look for Short Trade and along with that below conditions for Entry/Exit

rqnkgCp.png

NEOksPd.png
There are several ways of marking out your targets, whether visual, or an indicator. Also, importance is reading price,....nothing else, the candles form your example. Your MA's are your uptrend...no time to add examples, but the photos are easy to see on a chart with trendlines.
 
Last edited by a moderator:

Intrinsic Knowledge

New member
VIP
I actually just coded up something similar for bounces off the VWAP.

Here's something for you...

Code:
# Single-Candle Reversal & Confirmation Pattern
#
# Mashume @ usethinkscript.com
#
# 2020-05-20
# https://usethinkscript.com/threads/single-candle-reversal-confirmation-pattern.2563/
#
# Per request and details by mohitdas
#


declare upper;

input EMA_Length = 50;
input pin_factor = 2;

def EMA = MovAvgExponential(length = EMA_Length);
def body_height = max(open, close) - min(open, close);


def reversal_candle = if low < EMA and min(open, close) > EMA
    and low < (min(open, close) - body_height * pin_factor)
    and high == max(open, close)
    then 1 else double.nan;

def confirmation_candle = if low > low[1]
    and CLOSE > high[1]
    then 1 else double.nan;

plot SCRCP = if confirmation_candle and reversal_candle[1] then EMA else double.nan;
    SCRCP.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
    SCRCP.SetDefaultColor(COLOR.GREEN);
    SCRCP.SetLineWeight(2);

Happy Trading,
Mashume
@mashume , bro, may I check with you why the input pin_factor is "2"??
 

Manny_305

New member
A Single Reversal Candle is a Bullish Pin Bar whereby the Body of the candle is ABOVE EMA(50, 100 or 200) support and the shadow of the candle extends below EMA (50, 100 or 200)support.

The Reversal Candle is followed by a confirmation candle. The confirmation candle( bullish) must make a HIGHER LOW than the low of the reversal candle and CLOSE HIGHER than the high of reversal candle.

gBoTf07.jpg
[/URL]

Conditions i am looking for
1) The body of the Bullish Pin( Reversal Candle) bar must be above the EMA
2) The Lower Shadow of that Reversal Candle( Wick) must cut below the EMA
3) Reversal Candle must be follow by a Bullish Candle
4) Confirmation Candle must make Higher Low then the low of the reversal candle and close higher than the high of the Candle.

Would it be possible to put an alert Green Arrow(Buy) on the Confirmation Candle and Red Arrow( Sell) when its time to exit.
Greetings All,

Hope all is well. I was wondering if there is way to script this has the pinbar is froming as opposed to after the close? Please advise. Thanks!
 

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