Technical Analysis
Technical Analysis การวิเคราะห์ทางเทคนิค Chart Patterns Indicators Moving Average RSI MACD Bollinger Bands Support Resistance Trend Volume Trading Strategy
| Indicator | Type | Signal | Best For | Setting |
|---|---|---|---|---|
| SMA/EMA | Trend | Cross above/below | Trend direction | 20, 50, 200 |
| RSI | Momentum | Overbought >70 Oversold <30 | Reversal timing | 14 periods |
| MACD | Momentum | Signal line cross | Trend momentum | 12, 26, 9 |
| Bollinger Bands | Volatility | Squeeze/Expansion | Breakout entry | 20, 2 StdDev |
| Stochastic | Momentum | %K %D cross | Range trading | 14, 3, 3 |
| ADX | Trend Strength | >25 strong trend | Filter trending | 14 periods |
| Fibonacci | S/R Levels | 38.2% 50% 61.8% | Pullback entry | Swing H/L |
| Volume | Confirmation | High vol = confirm | Breakout confirm | 20 MA |
Chart Analysis Code
# === Technical Analysis with Python ===
# pip install pandas numpy ta
import numpy as np
from dataclasses import dataclass
def sma(prices, period):
result = []
for i in range(len(prices)):
if i < period - 1:
result.append(None)
else:
result.append(np.mean(prices[i-period+1:i+1]))
return result
def ema(prices, period):
result = [prices[0]]
multiplier = 2 / (period + 1)
for i in range(1, len(prices)):
val = (prices[i] - result[-1]) * multiplier + result[-1]
result.append(val)
return result
def rsi(prices, period=14):
deltas = np.diff(prices)
gains = np.where(deltas > 0, deltas, 0)
losses = np.where(deltas < 0, -deltas, 0)
avg_gain = np.mean(gains[:period])
avg_loss = np.mean(losses[:period])
rs_values = []
for i in range(period, len(gains)):
avg_gain = (avg_gain * (period-1) + gains[i]) / period
avg_loss = (avg_loss * (period-1) + losses[i]) / period
if avg_loss == 0:
rs_values.append(100)
else:
rs = avg_gain / avg_loss
rs_values.append(100 - (100 / (1 + rs)))
return rs_values
# Example
np.random.seed(42)
prices = 100 + np.cumsum(np.random.randn(100) * 0.5)
sma_20 = sma(list(prices), 20)
rsi_14 = rsi(list(prices), 14)
print("=== Technical Analysis Results ===")
print(f" Current Price: {prices[-1]:.2f}")
print(f" SMA(20): {sma_20[-1]:.2f}")
print(f" RSI(14): {rsi_14[-1]:.2f}")
trend = "Bullish" if prices[-1] > sma_20[-1] else "Bearish"
rsi_signal = "Overbought" if rsi_14[-1] > 70 else "Oversold" if rsi_14[-1] < 30 else "Neutral"
print(f" Trend: {trend}")
print(f" RSI Signal: {rsi_signal}")
@dataclass
class TradeSignal:
indicator: str
signal: str
direction: str
strength: str
signals = [
TradeSignal("Price vs SMA(20)", f"Price {'above' if trend == 'Bullish' else 'below'} SMA", trend, "Medium"),
TradeSignal("RSI(14)", f"RSI = {rsi_14[-1]:.1f}", rsi_signal, "Medium"),
TradeSignal("SMA Cross", "SMA(20) vs SMA(50)", "Check manually", "High"),
TradeSignal("Volume", "Check if above average", "Confirm", "High"),
]
print(f"\nSignal Summary:")
for s in signals:
print(f" [{s.indicator}] {s.signal} | {s.direction} | Strength: {s.strength}")
Chart Patterns
# === Chart Pattern Recognition ===
@dataclass
class ChartPattern:
pattern: str
pattern_type: str
signal: str
target: str
confirmation: str
reliability: str
patterns = [
ChartPattern("Head & Shoulders", "Reversal", "Bearish after uptrend",
"Neckline distance projected down", "Break below neckline + volume", "High"),
ChartPattern("Inverse H&S", "Reversal", "Bullish after downtrend",
"Neckline distance projected up", "Break above neckline + volume", "High"),
ChartPattern("Double Top", "Reversal", "Bearish — two peaks same level",
"Height of pattern projected down", "Break below support + volume", "High"),
ChartPattern("Double Bottom", "Reversal", "Bullish — two troughs same level",
"Height of pattern projected up", "Break above resistance + volume", "High"),
ChartPattern("Ascending Triangle", "Continuation", "Bullish — flat top rising bottom",
"Height projected from breakout", "Break above flat resistance", "Medium-High"),
ChartPattern("Descending Triangle", "Continuation", "Bearish — flat bottom falling top",
"Height projected from breakdown", "Break below flat support", "Medium-High"),
ChartPattern("Bull Flag", "Continuation", "Bullish — flag after strong move up",
"Flagpole length from breakout", "Break above flag resistance", "High"),
ChartPattern("Wedge (Rising)", "Reversal", "Bearish — converging trendlines up",
"Beginning of wedge", "Break below lower trendline", "Medium"),
]
print("=== Chart Patterns ===")
for p in patterns:
print(f" [{p.pattern}] Type: {p.pattern_type} | Reliability: {p.reliability}")
print(f" Signal: {p.signal}")
print(f" Target: {p.target}")
print(f" Confirm: {p.confirmation}")
# Candlestick Patterns
candles = {
"Doji": "Indecision — open = close, potential reversal",
"Hammer": "Bullish reversal — long lower shadow at support",
"Shooting Star": "Bearish reversal — long upper shadow at resistance",
"Engulfing Bull": "Bullish — large candle engulfs previous bear candle",
"Engulfing Bear": "Bearish — large candle engulfs previous bull candle",
"Morning Star": "Bullish reversal — 3 candle pattern at bottom",
"Evening Star": "Bearish reversal — 3 candle pattern at top",
}
print(f"\n\nCandlestick Patterns:")
for k, v in candles.items():
print(f" [{k}]: {v}")
Trading Strategy
# === Trading Strategy Framework ===
@dataclass
class Strategy:
name: str
timeframe: str
entry: str
exit: str
stop_loss: str
risk_reward: str
win_rate: str
strategies = [
Strategy("MA Cross", "Daily", "EMA(20) crosses above EMA(50)", "EMA(20) crosses below EMA(50)",
"Below recent swing low", "1:2", "45-55%"),
Strategy("RSI Reversal", "4H", "RSI < 30 + bullish candle at support",
"RSI > 70 or target hit", "Below support level", "1:2", "50-60%"),
Strategy("Breakout", "1H-4H", "Break above resistance + volume spike",
"Trailing stop or target", "Below breakout level", "1:3", "35-45%"),
Strategy("Fibonacci Pullback", "4H-Daily", "Pullback to 61.8% Fib + RSI support",
"Previous high or Fib extension", "Below 78.6% Fib", "1:2.5", "50-55%"),
Strategy("Bollinger Squeeze", "4H", "Bandwidth < 0.05 → break direction",
"Opposite band or 2x ATR", "Middle band", "1:2", "45-50%"),
]
print("Trading Strategies:")
for s in strategies:
print(f" [{s.name}] TF: {s.timeframe}")
print(f" Entry: {s.entry}")
print(f" Exit: {s.exit}")
print(f" SL: {s.stop_loss} | R:R: {s.risk_reward} | Win: {s.win_rate}")
learning_path = {
"Week 1-2": "Candlestick basics, Support/Resistance, Trendlines",
"Week 3-4": "Moving Averages, RSI, MACD fundamentals",
"Month 2": "Chart Patterns, Volume Analysis, Fibonacci",
"Month 3": "Strategy building, Backtesting, Risk Management",
"Month 4-6": "Paper Trading, Journal, Psychology",
"Month 6+": "Live trading small size, Review, Improve",
}
print(f"\n\nLearning Path:")
for k, v in learning_path.items():
print(f" [{k}]: {v}")
เคล็ดลับ
- Trend: เทรดตาม Trend เสมอ อย่าเทรดสวน Trend
- Confluence: ใช้หลาย Indicator ยืนยันกัน ไม่พึ่ง Indicator เดียว
- Volume: ดู Volume ยืนยัน Breakout ทุกครั้ง
- Risk: ตั้ง Stop Loss ทุกครั้ง Risk ไม่เกิน 1-2% ต่อ Trade
- Journal: จดบันทึกทุก Trade วิเคราะห์ผลย้อนหลัง
การนำความรู้ไปประยุกต์ใช้งานจริง
แหล่งเรียนรู้ที่แนะนำ ได้แก่ Official Documentation ที่อัพเดทล่าสุดเสมอ Online Course จาก Coursera Udemy edX ช่อง YouTube คุณภาพทั้งไทยและอังกฤษ และ Community อย่าง Discord Reddit Stack Overflow ที่ช่วยแลกเปลี่ยนประสบการณ์กับนักพัฒนาทั่วโลก
เปรียบเทียบข้อดีและข้อเสีย
จากตารางเปรียบเทียบจะเห็นว่าข้อดีมีมากกว่าข้อเสียอย่างชัดเจน โดยเฉพาะในแง่ของประสิทธิภาพและความสามารถในการ Scale สำหรับข้อเสียส่วนใหญ่สามารถแก้ไขได้ด้วยการเรียนรู้อย่างเป็นระบบและวางแผนทรัพยากรให้เหมาะสม
Technical Analysis คืออะไร
วิเคราะห์ราคาจากกราฟอดีต คาดการณ์อนาคต Chart Patterns Indicators Moving Average RSI MACD Support Resistance Volume ทุกตลาด หุ้น Forex Crypto
Indicator สำคัญมีอะไรบ้าง
MA Trend SMA EMA Cross RSI Overbought Oversold MACD Momentum Bollinger Bands Volatility Stochastic Volume ADX Trend Strength Fibonacci S/R
Chart Pattern มีอะไรบ้าง
Reversal Head Shoulders Double Top Bottom Continuation Flag Pennant Triangle Wedge Candlestick Doji Hammer Engulfing Morning Evening Star Volume ยืนยัน
เริ่มต้นเรียน Technical Analysis อย่างไร
Candlestick OHLC Support Resistance Trend Line Moving Average RSI MACD TradingView Paper Trading จดบันทึก John Murphy หนังสือ
สรุป
Technical Analysis Chart Patterns Indicators Moving Average RSI MACD Bollinger Bands Support Resistance Volume Trend Strategy Risk Management Trading
