SiamCafe.net Blog
Technology

Trade View

trade view
Trade View | SiamCafe Blog
2025-12-27· อ. บอม — SiamCafe.net· 11,066 คำ

TradingView

TradingView Trade View วิเคราะห์กราฟ Technical Analysis Indicators Pine Script Alert Screener Paper Trading Charting หุ้น Crypto Forex

FeatureFreeEssential ($12.95)Plus ($24.95)Premium ($49.95)
Charts1248
Indicators/Chart351025
Alerts520100400
TimeframeStandard+ Second-based+ Second-basedAll
ScreenerBasicFullFullFull + Export
Paper TradingYesYesYesYes

Technical Analysis

# === Technical Analysis Concepts ===

from dataclasses import dataclass

@dataclass
class TAIndicator:
    name: str
    category: str
    formula: str
    signal: str
    timeframe: str

indicators = [
    TAIndicator("RSI (14)",
        "Momentum",
        "RSI = 100 - (100 / (1 + RS)), RS = Avg Gain / Avg Loss",
        "Buy: RSI < 30 (Oversold), Sell: RSI > 70 (Overbought)",
        "Daily, 4H, 1H"),
    TAIndicator("MACD (12,26,9)",
        "Trend + Momentum",
        "MACD = EMA(12) - EMA(26), Signal = EMA(9) of MACD",
        "Buy: MACD Cross above Signal, Sell: Cross below",
        "Daily, 4H"),
    TAIndicator("Bollinger Bands (20,2)",
        "Volatility",
        "Middle = SMA(20), Upper/Lower = Middle ± 2*StdDev",
        "Buy: Price touch Lower Band, Sell: touch Upper Band",
        "Daily, 4H, 1H"),
    TAIndicator("EMA (20, 50, 200)",
        "Trend",
        "EMA = Price * K + EMA(prev) * (1-K), K = 2/(N+1)",
        "Golden Cross: EMA50 > EMA200 (Bullish), Death Cross: opposite",
        "Daily, Weekly"),
    TAIndicator("Volume Profile",
        "Volume",
        "Volume at each price level over period",
        "High Volume Node = Support/Resistance, Low = Gap",
        "Daily, Weekly"),
    TAIndicator("Stochastic RSI (14,14,3,3)",
        "Momentum",
        "StochRSI = (RSI - Lowest RSI) / (Highest RSI - Lowest RSI)",
        "Buy: < 20 (Oversold) + Cross up, Sell: > 80 + Cross down",
        "4H, 1H, 15m"),
]

print("=== Technical Indicators ===")
for i in indicators:
    print(f"\n  [{i.name}] {i.category}")
    print(f"    Formula: {i.formula}")
    print(f"    Signal: {i.signal}")
    print(f"    TF: {i.timeframe}")

Pine Script

# === Pine Script Examples ===

# //@version=5
# indicator("RSI + MACD Combined Signal", overlay=false)
#
# // Inputs
# rsiLength = input.int(14, "RSI Length")
# rsiOverbought = input.int(70, "RSI Overbought")
# rsiOversold = input.int(30, "RSI Oversold")
# macdFast = input.int(12, "MACD Fast")
# macdSlow = input.int(26, "MACD Slow")
# macdSignal = input.int(9, "MACD Signal")
#
# // Calculate RSI
# rsi = ta.rsi(close, rsiLength)
#
# // Calculate MACD
# [macdLine, signalLine, hist] = ta.macd(close, macdFast, macdSlow, macdSignal)
#
# // Combined Signal
# buySignal = rsi < rsiOversold and ta.crossover(macdLine, signalLine)
# sellSignal = rsi > rsiOverbought and ta.crossunder(macdLine, signalLine)
#
# // Plot
# plot(rsi, "RSI", color.blue)
# hline(rsiOverbought, "Overbought", color.red)
# hline(rsiOversold, "Oversold", color.green)
#
# // Alerts
# alertcondition(buySignal, "Buy Signal", "RSI Oversold + MACD Cross Up")
# alertcondition(sellSignal, "Sell Signal", "RSI Overbought + MACD Cross Down")
#
# // Background color on signal
# bgcolor(buySignal ? color.new(color.green, 80) : na)
# bgcolor(sellSignal ? color.new(color.red, 80) : na)

@dataclass
class PineScriptFunction:
    function: str
    category: str
    example: str
    purpose: str

functions = [
    PineScriptFunction("ta.rsi(source, length)",
        "Indicator",
        "rsi = ta.rsi(close, 14)",
        "คำนวณ RSI"),
    PineScriptFunction("ta.macd(source, fast, slow, signal)",
        "Indicator",
        "[macd, signal, hist] = ta.macd(close, 12, 26, 9)",
        "คำนวณ MACD Line, Signal, Histogram"),
    PineScriptFunction("ta.sma(source, length)",
        "Moving Average",
        "sma50 = ta.sma(close, 50)",
        "Simple Moving Average"),
    PineScriptFunction("ta.crossover(a, b)",
        "Signal",
        "buySignal = ta.crossover(macd, signal)",
        "ตรวจจับ a ตัดขึ้นเหนือ b"),
    PineScriptFunction("strategy.entry(id, direction)",
        "Strategy",
        "strategy.entry('Buy', strategy.long)",
        "สั่ง Entry Position สำหรับ Backtest"),
    PineScriptFunction("alertcondition(condition, title, message)",
        "Alert",
        "alertcondition(buySignal, 'Buy', 'RSI + MACD Buy')",
        "สร้าง Alert Condition"),
]

print("=== Pine Script Functions ===")
for f in functions:
    print(f"  [{f.function}] {f.category}")
    print(f"    Example: {f.example}")
    print(f"    Purpose: {f.purpose}")

Alert & Strategy

# === Trading Strategy & Alert System ===

@dataclass
class TradingStrategy:
    name: str
    indicators: str
    entry: str
    exit: str
    risk: str

strategies = [
    TradingStrategy("EMA Crossover",
        "EMA 20 + EMA 50",
        "Buy: EMA20 Cross above EMA50",
        "Sell: EMA20 Cross below EMA50 หรือ Trailing Stop 2%",
        "Stop Loss: -2% จาก Entry, Risk/Reward 1:2"),
    TradingStrategy("RSI Reversal",
        "RSI 14 + Support/Resistance",
        "Buy: RSI < 30 + Price at Support",
        "Sell: RSI > 70 หรือ Price at Resistance",
        "Stop Loss: Below Support, Target: Resistance"),
    TradingStrategy("MACD + Volume",
        "MACD (12,26,9) + Volume",
        "Buy: MACD Cross Up + Volume > Average",
        "Sell: MACD Cross Down + Volume > Average",
        "Stop Loss: -3%, Take Profit: +6%"),
    TradingStrategy("Bollinger Squeeze",
        "Bollinger Bands + Keltner Channel",
        "Buy: Squeeze Release + Close above Upper BB",
        "Sell: Squeeze Release + Close below Lower BB",
        "Stop Loss: Middle Band, Trail: 2*ATR"),
]

@dataclass
class AlertSetup:
    alert_type: str
    condition: str
    action: str
    delivery: str

alerts = [
    AlertSetup("Price Alert",
        "BTC crosses above $70,000",
        "Notify + Play sound",
        "App Push + Email + Webhook"),
    AlertSetup("Indicator Alert",
        "RSI(14) crosses below 30",
        "Notify + Show popup",
        "App Push + Email"),
    AlertSetup("Pine Script Alert",
        "Custom buy/sell signal from strategy",
        "Webhook to trading bot",
        "Webhook URL → Bot → Auto Trade"),
    AlertSetup("Screener Alert",
        "Stock matches screener filter",
        "Notify new matches",
        "App Push + Email"),
]

print("=== Strategies ===")
for s in strategies:
    print(f"\n  [{s.name}] {s.indicators}")
    print(f"    Entry: {s.entry}")
    print(f"    Exit: {s.exit}")
    print(f"    Risk: {s.risk}")

print("\n=== Alerts ===")
for a in alerts:
    print(f"  [{a.alert_type}] {a.condition}")
    print(f"    Action: {a.action} | Delivery: {a.delivery}")

เคล็ดลับ

ข้อควรรู้สำหรับนักลงทุนไทย ปี 2026

การลงทุนในสินทรัพย์ดิจิทัลและตลาดการเงินต้องเข้าใจความเสี่ยง สิ่งสำคัญที่สุดคือ การจัดการความเสี่ยง ไม่ลงทุนมากกว่าที่พร้อมจะเสีย กระจายพอร์ตลงทุนในสินทรัพย์หลายประเภท ตั้ง Stop Loss ทุกครั้ง และไม่ใช้ Leverage สูงเกินไป

ในประเทศไทย กลต กำหนดกรอบกฎหมายชัดเจนสำหรับ Digital Assets ผู้ให้บริการต้องได้รับใบอนุญาต นักลงทุนต้องทำ KYC และเสียภาษี 15% จากกำไร แนะนำให้ใช้แพลตฟอร์มที่ได้รับอนุญาตจาก กลต เท่านั้น เช่น Bitkub Satang Pro หรือ Zipmex

สำหรับ Forex ต้องเลือก Broker ที่มี Regulation จากหน่วยงานที่น่าเชื่อถือ เช่น FCA, ASIC, CySEC เริ่มต้นด้วย Demo Account ก่อน เรียนรู้ Technical Analysis และ Fundamental Analysis ให้เข้าใจ และมีแผนการเทรดที่ชัดเจน ไม่เทรดตามอารมณ์

TradingView คืออะไร

Platform วิเคราะห์กราฟ Charting Indicators Pine Script Alert Screener Paper Trading Social หุ้น Crypto Forex Free + Paid Plans

Technical Analysis พื้นฐานมีอะไร

Trend Support Resistance Chart Patterns Candlestick Volume Fibonacci Timeframe Uptrend Downtrend Sideways Higher High Lower Low

Indicator ที่ใช้บ่อยมีอะไร

RSI MACD Bollinger Bands EMA SMA Volume Profile Stochastic RSI ATR Overbought Oversold Golden Cross Death Cross Momentum Volatility

Pine Script คืออะไร

ภาษา Script TradingView v5 Custom Indicator Strategy Backtest Alert ta.rsi ta.macd ta.sma crossover plot alertcondition Library

สรุป

TradingView Technical Analysis RSI MACD Bollinger EMA Volume Pine Script Alert Strategy Backtest Screener Paper Trading Production

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

carry trade japonอ่านบทความ → how to trade gold commodity in zerodhaอ่านบทความ → best copy trade forexอ่านบทความ → copy trade appอ่านบทความ →

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