This indicator shows how far a selected call or put strike is from the stock’s current price compared with the move the options market is expecting.
Think of the implied move as the market’s estimated travel range for the stock. It is not a guarantee that price will remain inside that range. It is simply an estimate based on the stock’s implied volatility and the number of days remaining. You need to input the strike price and the number of days to expiration.
Think of the implied move as the market’s estimated travel range for the stock. It is not a guarantee that price will remain inside that range. It is simply an estimate based on the stock’s implied volatility and the number of days remaining. You need to input the strike price and the number of days to expiration.
Code:
# antwerks ============================================================
# CALL / PUT IMPLIED-MOVE DISTANCE
# Measures selected strike from current or latest completed close
# ============================================================
declare upper;
input optionType = {default PUT, CALL};
input referenceStrike = 24.50;
input daysRemaining = 1;
input useCompletedBar = no;
input showStrikeLine = yes;
input showLabels = yes;
def referencePrice =
if useCompletedBar
then close[1]
else close;
def IV =
imp_volatility(period = AggregationPeriod.DAY);
def impliedMove =
referencePrice *
IV *
Sqrt(daysRemaining / 365);
def impliedHigh = referencePrice + impliedMove;
def impliedLow = referencePrice - impliedMove;
# PUT: distance below current price
# CALL: distance above current price
def strikeDistance =
if optionType == optionType.PUT
then referencePrice - referenceStrike
else referenceStrike - referencePrice;
def strikeDistanceIM =
if impliedMove > 0
then strikeDistance / impliedMove
else Double.NaN;
def strikeOutsideRange =
if optionType == optionType.PUT
then referenceStrike < impliedLow
else referenceStrike > impliedHigh;
def distanceOutsideRange =
if optionType == optionType.PUT
then impliedLow - referenceStrike
else referenceStrike - impliedHigh;
plot UpperBoundary = impliedHigh;
UpperBoundary.SetDefaultColor(Color.MAGENTA);
UpperBoundary.SetStyle(Curve.LONG_DASH);
UpperBoundary.SetLineWeight(2);
plot LowerBoundary = impliedLow;
LowerBoundary.SetDefaultColor(Color.CYAN);
LowerBoundary.SetStyle(Curve.LONG_DASH);
LowerBoundary.SetLineWeight(2);
plot StrikeLine =
if showStrikeLine
then referenceStrike
else Double.NaN;
StrikeLine.SetDefaultColor(Color.YELLOW);
StrikeLine.SetStyle(Curve.SHORT_DASH);
StrikeLine.SetLineWeight(2);
AddLabel(
showLabels,
"CURRENT: $" + Round(referencePrice, 2) +
" | " + daysRemaining + "D MOVE: $" +
Round(impliedMove, 2),
Color.PINK
);
AddLabel(
showLabels,
"CURRENT RANGE: $" +
Round(impliedLow, 2) +
" TO $" +
Round(impliedHigh, 2),
Color.CYAN
);
AddLabel(
showLabels,
(if optionType == optionType.PUT then "PUT $" else "CALL $") +
referenceStrike +
": $" + Round(strikeDistance, 2) +
(if optionType == optionType.PUT then " LOWER | " else " HIGHER | ") +
Round(strikeDistanceIM, 2) + " IM",
if strikeDistanceIM >= 2 then Color.GREEN
else if strikeDistanceIM >= 1.5 then Color.LIGHT_GREEN
else if strikeDistanceIM >= 1 then Color.YELLOW
else Color.RED
);
AddLabel(
showLabels,
if strikeOutsideRange then
(if optionType == optionType.PUT then
"PUT STRIKE: $" + Round(distanceOutsideRange, 2) +
" BELOW IMPLIED LOW"
else
"CALL STRIKE: $" + Round(distanceOutsideRange, 2) +
" ABOVE IMPLIED HIGH")
else
(if optionType == optionType.PUT then
"PUT STRIKE IS INSIDE IMPLIED RANGE"
else
"CALL STRIKE IS INSIDE IMPLIED RANGE"),
if strikeOutsideRange then Color.GREEN else Color.RED
);
Last edited by a moderator: