I’m currently working on creating a pattern scan that will detect a 3 bar play pattern specifically
The pattern is described as an unusually long candle body, followed by one or two resting candle bodies
I was formulating based in catching the long igniting bar and the resting bar/bars in between BEFORE the breakout
(Breakout should be followed by a third/fourth long body)
Some of what I’ve worked on so far in pattern thinkscript editor
Sorry I don’t have my laptop with me but
1st bar: up bar - I need to detect the 3x or more volume on this bar only *
2nd bar : multiple bar - where I set parameters
(Low of #1 < open #2)
(Low of #1 < close #2)
(High of #1 greater or equal high #2)
(Open #1 < low #2)
(Low of #1 < low #2)
(Close of #1 greater or equal close #2)
(Open of #1 < open #2)
(Close of #1 greater than or equal high #2)
So I think all I need is the volume identified in the first bar of the pattern as +3x and a possible alert when the last bar breaks the previous high right?
here is the scan so far...
Code:
def IsUp = close > open;
def IsDown = close < open;
def IsDoji = IsDoji();
def avgRange = 0.05 * Average(high - low, 20);
plot PatternPlot =
IsUp[2] and
((Sum(IsUp, 2)[0] >= 0)) and
high[2] >= Highest(high[0], 2) and
open[2] < open[1] and
close[2] >= close[0] and
close[2] >= Highest(high[0], 2) and
low[2] < Lowest(low[0], 2) and
low[2] < close[0] and
low[2] < open[1] and
open[2] < Lowest(low[0], 2);
1. i need to get the volume of the bar that STARTS this pattern to be specified as 200-300% volume compared to the previous 20-50-100 bars/ticks
( i would like to be able to change the volume increase percentage and ammt of time its looking back)
2. i would like to make sure the candles that come AFTER the high volume bar do not retrace more than 65% of that first high volume bar if possible
(i would like to be able to adjust retracement %)
and that should prob do it
been trying to get like you
@BenTen
here is the pattern scan so far... sorry for spamming im new to this channel
Code:
def IsUp = close > open;
def IsDown = close < open;
def IsDoji = IsDoji();
def avgRange = 0.05 * Average(high - low, 20);
plot PatternPlot =
IsUp[2] and
((Sum(IsUp, 2)[0] >= 0)) and
high[2] >= Highest(high[0], 2) and
open[2] < open[1] and
close[2] >= close[0] and
close[2] >= Highest(high[0], 2) and
low[2] < Lowest(low[0], 2) and
low[2] < close[0] and
low[2] < open[1] and
open[2] < Lowest(low[0], 2);
- i need to get the volume of the bar that STARTS this pattern to be specified as 200-300% volume compared to the previous 20-50-100 bars/ticks
( i would like to be able to change the volume increase percentage and ammt of time its looking back)
- i would like to make sure the candles that come AFTER the high volume bar do not retrace more than 65% of that beginning bar if possible, that would filter out alot of the false positives
(i would like to be able to adjust retracement % if possible)
- seems to be only bringing up patterns that have 2 resting bars, i haven't seen any patterns that have only 1 resting bar i would like it to make sure BOTH 1 and 2 resting bar patterns show in the scan
I have paired that with the increased volume scan to attempt to get the result I'm looking for..
but i would prefer something that can track the candle that starts the pattern above only
Here is that code, i just tweaked to make sure only bullish signals but i like how i can interchange percent and length. how do i get that on the beginning candle of the pattern above????
Code:
# UNUSUALVOLUME
# DREWGRIFFITH15 (C) 2014
input price = volume;
input choice = {default increased, decreased};
input percent = 300;
input length = 200;
def avg = average(price, length)[1];
def chg = 100 * (price/avg -1);
plot scan;
switch (choice) {
case increased:
scan = chg >= percent;
}