Wiinii
Member
Identifies Isolated Pivot patterns on your chart as described in A Complete Guide to Volume Price Analysis by Anna Coulling.
Shared Link: http://tos.mx/3URlRUV (or use code below). Click here for --> Easiest way to load shared links
Shared Link: http://tos.mx/3URlRUV (or use code below). Click here for --> Easiest way to load shared links
Code:
# Isolated Pivots by Wiinii
# Version 1.0
#https://usethinkscript.com/threads/isolated-pivots-pattern-detector-for-thinkorswim.14447/
#hint: Detects Isolated Pivots and flags them on your chart. \n big_body_size tells how much taller than average the first tall candle has to be. \n little_body_size tells how many x smaller the middle little candle has to be compared to the intitial tall one.
# Isolated Pivots by Wiinii
# Version 1.0
#https://usethinkscript.com/threads/isolated-pivots-pattern-detector-for-thinkorswim.14447/
#hint: Detects Isolated Pivots and flags them on your chart. \n big_body_size tells how much taller than average the first tall candle has to be. \n little_body_size tells how many x smaller the middle little candle has to be compared to the intitial tall one.
input CandleAverage = 10;
input big_body_size = 1.2;
input little_body_size = 3.0;
def IsUp = close > open;
def IsDown = close < open;
def avgRange = 0.05 * Average(high - low, 20);
def AvgCandleBody = Average(BodyHeight(), CandleAverage);
def AvgCandle = SimpleMovingAvg(price = (high[1] - low[1]), length = CandleAverage);
def CurrentCandle = high - low;
def BigUp = IsUp and ((BodyHeight() > (AvgCandleBody * big_body_size)));
def BigDown = IsDown and ((BodyHeight() > (AvgCandleBody * big_body_size)));
def LittleUp = IsUp and BodyHeight() < BodyHeight()[1] * little_body_size;
def LittleDown = IsDown and BodyHeight() < BodyHeight()[1] * little_body_size;
plot IsoPivUp =
BigUp[2] and
(LittleUp[1] or LittleDown[1]) and
BigDown[0] and (BodyHeight() > BodyHeight()[1] * little_body_size) and
open[1] > close[0] and
open[2] < open[1] and
close[2] <= high[1] and
open[2] < low[1] and
low[1] > close[0] and
high[1] >= open[0] and
high[1] is equal to Highest(high[1], 2);
IsoPivUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_WEDGE_UP);
IsoPivUp.SetDefaultColor(GetColor(1));
IsoPivUp.SetLineWeight(5);
plot IsoPivDn =
BigDown[2] and
(LittleUp[1] or LittleDown[1]) and
BigUp[0] and (BodyHeight() > BodyHeight()[1] * little_body_size) and
open[2] > open[1] and
open[2] > high[1] and
low[1] < open[0] and
open[1] < close[0] and
close[2] > low[1] and
high[1] < close[0] and
low[1] is equal to Lowest(low[1], 2);
IsoPivDn.SetPaintingStrategy(PaintingStrategy.BOOLEAN_WEDGE_DOWN);
IsoPivDn.SetDefaultColor(GetColor(1));
IsoPivDn.SetLineWeight(5);
Last edited: