liveBook · Manning

Resistance line

As explained in Investing for Programmers

A resistance level is a price level or zone where selling pressure tends to impede further advances.

A resistance line marks a high price or zone that selling pressure makes difficult to break. A breakout occurs when price crosses it, but patterns remain interpretations rather than guarantees. section 10.1.2

Use resistance as a cautious chart-reading aid:

  • Compare a candidate resistance level with support lines and the surrounding trend. section 10.1.2
  • Treat a breakout as a price event, not as proof that the asset will continue upward. section 10.1.2
  • Recognize that investor expectations can reinforce resistance psychologically, especially near conspicuous prices. section 10.1.2

Illustrative levels

A hypothetical $100,000 resistance level represents a price that investors may struggle to push beyond. A separate $72,000 level illustrates support rather than resistance. section 10.1.2

Listing 10.6 Creating an Ichimoku
import yfinance as yf
import matplotlib.pyplot as plt
ticker = "NVDA"
data = yf.Ticker(ticker).history(start="2024-01-10", end="2025-01-15")
df = pd.DataFrame(data).dropna()
df.reset_index(inplace=True)

df["ConversationLine"] = (df["Close"].rolling(
  window=9).max() + df["Close"].rolling(
  window=9).min()) / 2                                   #1
df["BaseLine"] = (df["Close"].rolling(
  window=26).max() + df["Close"].rolling(
  window=26).min()) / 2                               #1  
df["SpanA"] = ((df["ConversationLine"] 
                + df["BaseLine"]) / 2).shift(26)      #1  
df["SpanB"] = ((df["Close"].rolling(
               window=52).max() + df["Close"].rolling(
               window=52).min()) / 2).shift(26)       #1  
df["LaggingSpan"] = df["Close"].shift(-26)            #1  

plt.figure(figsize=(12, 6))
plt.plot(df.index, df["Close"], label="Close Price", color="black")
plt.plot(df.index, df["ConversationLine"], label="ConversationLine", 
color="red")
plt.plot(df.index, df["BaseLine"], label="BaseLine", color="blue")
plt.fill_between(df.index, df["SpanA"], df["SpanB"], 
  where=df["SpanA"] >= df["SpanA"], color="lightgreen", alpha=0.5)
plt.fill_between(df.index, df["SpanA"], df["SpanB"], 
  where=df["SpanA"] < df["SpanB"], color="lightcoral", alpha=0.5)
plt.plot(df.index, df["LaggingSpan"], label="LaggingSpan", color="purple", linestyle="dotted")

plt.title("Ichimoku Cloud")
plt.legend()
plt.show()

An Ichimoku implementation shows how resistance can become dynamic: the cloud acts as resistance during a downtrend and support during an uptrend. section 10.2.3

How Investing for Programmers covers it

How deep it goes
Defines resistance, breakout, and psychological effects, but stops short of a guaranteed predictive or automated method.
Examples
Uses hypothetical $100,000 resistance, $72,000 support, and an Ichimoku cloud acting as dynamic resistance.
What you can do after
Evaluate chart levels and distinguish resistance, support, and breakout events while accounting for uncertainty.
How it connects
Connects resistance lines with support lines, breakouts, chart patterns, trends, and the Ichimoku Cloud.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Investing for Programmers. The section links point to the parts of the book it draws on.