DeMark Relative Retracement Levels Indicator for ThinkorSwim

BenTen

BenTen

Administrative
Staff
VIP
Warehouse
A member of ours just converted the DeMark Relative Retracement Levels indicator from TradingView to ThinkorSwim. Sharing it here with everyone else.

This indicator finds the previous days high, and low and today's open using daily timeframe and then applies the Fibonacci .382* and *.618 to them. Four different retracement levels will be added to your chart. You can anticipate reversals or breaks at these levels.

Here is the $SBUX 5min chart. See how well the candles respect those support and resistance lines?



thinkScript Code

Rich (BB code):
#
# WalkingBallista
#
input aggregationPeriod = AggregationPeriod.DAY;

def PH = high(period = aggregationPeriod)[1];
def PL = low(period = aggregationPeriod)[1];
def PO = open(period = aggregationPeriod);

def range = PH - PL;
def a = range * 0.382;
def b = range * 0.618;

plot h = PO + a;
plot h1 = PO + b;
plot l = PO - a;
plot l1 = PO - b;

h.DefineColor("Color", Color.DARK_RED);
h.AssignValueColor(h.color("Color"));
h.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

h1.DefineColor("Color", Color.RED);
h1.AssignValueColor(h1.color("Color"));
h1.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

l.DefineColor("Color", Color.Dark_Green);
l.AssignValueColor(l.color("Color"));
l.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

l1.DefineColor("Color", Color.Green);
l1.AssignValueColor(l1.color("Color"));
l1.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

Shreable Link

http://tos.mx/e9Qoy8

Credits
  • TradingView version
  • Special shoutout to one of our Discord members, WalkingBallista, for converting the script to ThinkorSwim.
 
Last edited:

Top