Single-Candle Reversal & Confirmation Pattern

M

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.

[/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:
M

mashume

Active 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
 
M

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
 
A

asragov

New 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

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);
 
M

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


 
Last edited:
T

Thomas

Active member
@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


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:
L

londonfeb26

New member
Hi Mohitdas,

Were you able to get this thing coded ? I am also interested to know how this can be coded and put to use. Thank you.
 

Similar threads

Top