SiamCafe.net Blog
Technology

inverse head and shoulders

inverse head and shoulders | SiamCafe Blog
2026-04-23· อ. บอม — SiamCafe.net· 8,293 คำ

Inverse Head and Shoulders

Inverse Head and Shoulders Chart Pattern Reversal Downtrend Uptrend Neckline Breakout Volume Left Shoulder Head Right Shoulder Target Price Technical Analysis

Patternเกิดหลังสัญญาณความน่าเชื่อถือ
Inverse H&SDowntrendซื้อ (Bullish)สูงมาก
H&S (ปกติ)Uptrendขาย (Bearish)สูงมาก
Double BottomDowntrendซื้อสูง
Triple BottomDowntrendซื้อสูงมาก
Bullish EngulfingDowntrendซื้อปานกลาง-สูง

Pattern Detection

# ihs_detector.py — Inverse Head & Shoulders Detection
from dataclasses import dataclass
from typing import List, Optional, Tuple

@dataclass
class PricePoint:
    date: str
    price: float
    volume: int

@dataclass
class IHSPattern:
    left_shoulder: PricePoint
    head: PricePoint
    right_shoulder: PricePoint
    neckline: float
    target_price: float
    pattern_height: float
    confirmed: bool

def find_ihs(lows: List[PricePoint], highs: List[PricePoint]) -> Optional[IHSPattern]:
    """ค้นหา Inverse Head and Shoulders Pattern"""
    if len(lows) < 3 or len(highs) < 2:
        return None

    left_shoulder = lows[0]
    head = lows[1]
    right_shoulder = lows[2]

    # Head ต้องต่ำกว่า Shoulders
    if head.price >= left_shoulder.price or head.price >= right_shoulder.price:
        return None

    # Shoulders ควรอยู่ระดับใกล้เคียงกัน (±5%)
    shoulder_diff = abs(left_shoulder.price - right_shoulder.price)
    avg_shoulder = (left_shoulder.price + right_shoulder.price) / 2
    if shoulder_diff / avg_shoulder > 0.05:
        return None

    # Neckline = เฉลี่ยจุดสูงระหว่าง Shoulders
    neckline = (highs[0].price + highs[1].price) / 2

    # Target
    pattern_height = neckline - head.price
    target = neckline + pattern_height

    # Volume confirmation
    confirmed = right_shoulder.volume > left_shoulder.volume

    return IHSPattern(
        left_shoulder, head, right_shoulder,
        neckline, target, pattern_height, confirmed
    )

# Example
lows = [
    PricePoint("2024-01-15", 85, 500000),
    PricePoint("2024-02-10", 75, 600000),
    PricePoint("2024-03-05", 83, 700000),
]
highs = [
    PricePoint("2024-01-28", 95, 400000),
    PricePoint("2024-02-25", 93, 450000),
]

pattern = find_ihs(lows, highs)
if pattern:
    print("=== Inverse Head & Shoulders Detected ===")
    print(f"  Left Shoulder: {pattern.left_shoulder.price} ({pattern.left_shoulder.date})")
    print(f"  Head: {pattern.head.price} ({pattern.head.date})")
    print(f"  Right Shoulder: {pattern.right_shoulder.price} ({pattern.right_shoulder.date})")
    print(f"  Neckline: {pattern.neckline}")
    print(f"  Pattern Height: {pattern.pattern_height}")
    print(f"  Target Price: {pattern.target_price}")
    print(f"  Confirmed: {pattern.confirmed}")

Trading Strategy

# ihs_strategy.py — Trading Strategy with IHS
from dataclasses import dataclass
from typing import List

@dataclass
class TradeSetup:
    entry: float
    stop_loss: float
    target_1: float
    target_2: float
    risk_reward: float
    position_size: int

def calculate_trade(neckline: float, head: float, right_shoulder: float,
                    account: float, risk_pct: float) -> TradeSetup:
    entry = neckline * 1.005  # Entry เหนือ Neckline 0.5%
    stop_loss = right_shoulder * 0.99  # SL ใต้ Right Shoulder 1%
    pattern_height = neckline - head
    target_1 = neckline + pattern_height  # 1x Height
    target_2 = neckline + pattern_height * 1.5  # 1.5x Height

    risk_per_share = entry - stop_loss
    risk_amount = account * (risk_pct / 100)
    position_size = int(risk_amount / risk_per_share)
    reward = target_1 - entry
    rr = reward / risk_per_share if risk_per_share > 0 else 0

    return TradeSetup(entry, stop_loss, target_1, target_2, rr, position_size)

trade = calculate_trade(
    neckline=94, head=75, right_shoulder=83,
    account=1000000, risk_pct=2
)

print("\n=== Trade Setup ===")
print(f"  Entry: {trade.entry}")
print(f"  Stop Loss: {trade.stop_loss}")
print(f"  Target 1: {trade.target_1} (1x)")
print(f"  Target 2: {trade.target_2} (1.5x)")
print(f"  Risk:Reward: 1:{trade.risk_reward:.1f}")
print(f"  Position Size: {trade.position_size} shares")

# Backtest Results
results = [
    {"pattern": "IHS #1", "entry": 95, "target": 113, "result": "+18.9%", "win": True},
    {"pattern": "IHS #2", "entry": 52, "target": 64, "result": "+23.1%", "win": True},
    {"pattern": "IHS #3", "entry": 180, "target": 210, "result": "-5.2%", "win": False},
    {"pattern": "IHS #4", "entry": 45, "target": 55, "result": "+22.2%", "win": True},
    {"pattern": "IHS #5", "entry": 120, "target": 145, "result": "+20.8%", "win": True},
]

wins = sum(1 for r in results if r["win"])
print(f"\n  Backtest: {wins}/{len(results)} wins ({wins/len(results)*100:.0f}%)")
for r in results:
    icon = "WIN" if r["win"] else "LOSS"
    print(f"    [{icon}] {r['pattern']}: Entry {r['entry']} -> {r['result']}")

Advanced Analysis

# advanced.py — Multi-timeframe & Volume Analysis
from dataclasses import dataclass

@dataclass
class VolumeProfile:
    phase: str
    avg_volume: int
    trend: str
    signal: str

volume_phases = [
    VolumeProfile("Downtrend (Before)", 500000, "สูง", "ขาลงแรง"),
    VolumeProfile("Left Shoulder", 450000, "ลดลง", "แรงขายลด"),
    VolumeProfile("Head (จุดต่ำสุด)", 350000, "ต่ำสุด", "Capitulation"),
    VolumeProfile("Right Shoulder", 400000, "เพิ่มขึ้น", "สะสม"),
    VolumeProfile("Neckline Break", 800000, "สูงมาก", "ยืนยัน Breakout"),
    VolumeProfile("After Breakout", 600000, "สูง", "Trend ใหม่"),
]

print("=== Volume Profile ===")
for v in volume_phases:
    bar = "█" * (v.avg_volume // 100000)
    print(f"  [{v.phase}]")
    print(f"    Volume: {v.avg_volume:,} ({v.trend}) — {v.signal}")
    print(f"    {bar}")

# Common Mistakes
mistakes = {
    "ไม่รอ Breakout": "เข้าก่อน Neckline Break อาจเป็น False Pattern",
    "ไม่ดู Volume": "Breakout ต้องมี Volume สูง ถ้า Volume ต่ำ = อ่อน",
    "Timeframe เล็ก": "H1 หรือต่ำกว่า False Signal มาก ใช้ Daily ขึ้นไป",
    "ไม่ตั้ง Stop Loss": "ตั้ง SL ใต้ Right Shoulder เสมอ",
    "Target ไกลเกิน": "ใช้ 1x Pattern Height เป็น Target แรก",
    "ไม่ Retest": "Retest Neckline เป็นจุด Entry ที่ดีกว่า Breakout",
}

print(f"\n\nCommon Mistakes:")
for mistake, fix in mistakes.items():
    print(f"  [{mistake}]: {fix}")

เคล็ดลับ

การนำความรู้ไปประยุกต์ใช้งานจริง

แหล่งเรียนรู้ที่แนะนำ ได้แก่ Official Documentation ที่อัพเดทล่าสุดเสมอ Online Course จาก Coursera Udemy edX ช่อง YouTube คุณภาพทั้งไทยและอังกฤษ และ Community อย่าง Discord Reddit Stack Overflow ที่ช่วยแลกเปลี่ยนประสบการณ์กับนักพัฒนาทั่วโลก

Inverse Head and Shoulders คืออะไร

Chart Pattern กลับตัวจากขาลง Left Shoulder Head Right Shoulder Neckline Breakout สัญญาณซื้อ Target = Neckline + Height

จะยืนยัน Pattern อย่างไร

Volume เพิ่มตอน Breakout ปิดเหนือ Neckline Retest Support RSI MACD ยืนยัน Timeframe ใหญ่ หลายสัปดาห์-เดือน

Target Price คำนวณอย่างไร

ระยะ Head ถึง Neckline เช่น Head 80 Neckline 100 ระยะ 20 Target 120 Minimum Target Trailing Stop Take Profit

Head and Shoulders กับ Inverse ต่างกันอย่างไร

H&S ปกติ Uptrend สัญญาณขาย ยอด 3 จุด Inverse Downtrend สัญญาณซื้อ จุดต่ำ 3 จุด ทั้งคู่ Reversal น่าเชื่อถือ Volume Breakout

สรุป

Inverse Head and Shoulders Chart Pattern Reversal Neckline Breakout Volume Target Price Left Shoulder Head Right Shoulder Backtest Position Sizing Risk Management Stop Loss Retest Daily Weekly

📖 บทความที่เกี่ยวข้อง

inverse head and shoulders pattern entry and exitอ่านบทความ → head and shoulders pattern inverseอ่านบทความ → head and shoulders cool mentholอ่านบทความ → inverse head and shoulders patternอ่านบทความ → inverse head and shoulders pattern meaningอ่านบทความ →

📚 ดูบทความทั้งหมด →