Chiến lược tính điểm nhận dạng cú đánh

RSI SMA VOLUME PATTERN
Ngày tạo: 2025-09-09 09:24:08 sửa đổi lần cuối: 2025-09-09 09:24:08
sao chép: 0 Số nhấp chuột: 275
2
tập trung vào
319
Người theo dõi

Chiến lược tính điểm nhận dạng cú đánh Chiến lược tính điểm nhận dạng cú đánh

Đây không phải là một chiến lược lắc lư bình thường, mà là một hệ thống bắn tỉa chính xác với điểm số AI

Có vấn đề gì với chiến lược xoay chuyển truyền thống? Có quá nhiều tín hiệu, chất lượng không đồng đều, và có quá nhiều đột phá giả.Mỗi tín hiệu có điểm chất lượng từ 1 đến 5, chỉ giao dịch tín hiệu chất lượng cao hơn 4 điểm

Logic cốt lõi đơn giản và thô sơ: nhận diện Higher Low (thấp cao hơn) và Lower High (thấp cao hơn), sau đó đánh giá tín hiệu bằng 4 chiều.Chỉ cần 4 phút để mở kho và lọc 80% tín hiệu rác

Ở đâu hệ thống điểm số 5 chiều tốt hơn chỉ số đơn lẻ?

1 điểm cơ bảnXác nhận sự tồn tại của hình dạng dao động + 1 điểm: Số lượng giao dịch trên 20 chu kỳ tăng gấp 1,2 lần giá trị trung bình, cho thấy có sự xác nhận tài chính RSI vị trí + 1 điểmRSI ở khoảng 30-70, tránh các tín hiệu giả mạo về quá mua quá bán Khối K + 1 điểm+ 60% là các thực thể, đảm bảo không phải là các hình dạng lưỡng lự như sao chữ thập. + 1 điểmGiá cả: MA20 và MA50, cả ba đều tương ứng

Kết quả: 5 điểm là tín hiệu có tỷ lệ thắng cao nhất, hơn 4 điểm là tín hiệu có thể giao dịch, dưới 3 điểm là tín hiệu bị bỏ qua.

Thiết kế dừng thiệt hại: 10 chu kỳ cực đại, không phải ATR tùy chỉnh

Lập luận của Stop Loss rất rõ ràng:

  • + Stop Loss = 10 đường K.
  • Stop Loss là 10 đường K.

Tại sao lại là 10?Bởi vì bản chất của chiến lược dao động là nắm bắt sự đảo ngược ngắn hạn, 10 chu kỳ không chỉ cho giá đủ không gian để thở, mà còn không cho phép khoảng cách dừng lỗ quá lớn. Nó phù hợp hơn với cấu trúc thị trường so với ATR cố định.

Một tín hiệu thất bại cũng là một cơ hội

Chiến lược này cũng xác định được “sự lắc lư thất bại”:

  • Higher Low thất bại: hình thành điểm thấp cao hơn rồi lại rơi
  • Thất bại của Lower High: Tạo ra một đỉnh thấp hơn và đột phá

Những thất bại này thường là dấu hiệu cho thấy xu hướng tăng lên, và đó là thời điểm tuyệt vời để mua lại.

Tín hiệu liên tục = xác nhận xu hướng

Khi hai đường K liên tiếp xuất hiện tín hiệu xác nhận cùng một hướng, đánh dấu bằng kim cương. Điều này thường có nghĩa:

  • Tiếp tục xem thêm: Xu hướng tăng
  • Tỷ lệ thất bại liên tục: Xu hướng giảm mạnh

Tỷ lệ chiến thắng của tín hiệu liên tiếp thường cao hơn 15-20% so với tín hiệu đơn lẻ

Các trường hợp áp dụng: Thị trường có nhiều biến động/thị trường trống

Môi trường hoạt động tốt nhất

  • Thị trường có xu hướng rõ ràng nhưng thường xuyên bị điều chỉnh lại
  • Tốc độ dao động vừa phải (không cực kỳ bình tĩnh hoặc cực kỳ bồn chồn)
  • Các giống có số lượng tương đối ổn định

Tránh sử dụng cảnh

  • Một cơn bão đơn phương đã rơi xuống (các tín hiệu dao động thường xuyên bị phá vỡ)
  • Đĩa ngang có tỷ lệ dao động rất thấp (tín hiệu hiếm và chất lượng kém)
  • Các giống nhỏ có số lượng rất không ổn định

Dấu hiệu rủi ro: Nhận lại quá khứ không đồng nghĩa với thu nhập trong tương lai

Rủi ro rõ ràng

  1. Chiến lược có khả năng thua lỗ liên tục, đặc biệt là giai đoạn chuyển đổi xu hướng
  2. Dòng tín hiệu trên 4 phút có chất lượng cao nhưng vẫn có tỷ lệ thất bại 30-40%
  3. Thiết kế dừng lỗ tương đối lỏng lẻo, có thể mất nhiều tiền một lần
  4. Hiệu suất khác nhau trong các môi trường thị trường khác nhau

Tư vấn quản lý tài chínhMột lần rủi ro không vượt quá 2% tài khoản, tạm dừng giao dịch sau 3 lần thua lỗ liên tiếp và đánh giá lại môi trường thị trường.

Mã nguồn chiến lược
/*backtest
start: 2024-09-09 00:00:00
end: 2025-09-07 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT","balance":500000}]
*/

//@version=6
strategy("Higher Lows, Lower Highs & Failures with Signal Quality Scoring", overlay=true)

// --- Higher Low detection ---
shares = 1
minScore = 4  // Minimum score to take trades

lowPoint      = ta.lowest(low, 3)
prevLowPoint  = ta.lowest(low[3], 3)
isHigherLow   = low == lowPoint and low > prevLowPoint
bullConfirm   = isHigherLow and close > open

// --- Lower High detection ---
highPoint     = ta.highest(high, 3)
prevHighPoint = ta.highest(high[3], 3)
isLowerHigh   = high == highPoint and high < prevHighPoint
bearConfirm   = isLowerHigh and close < open

// --- Failures ---
failHigherLow = isHigherLow[1] and low < low[1]
failLowerHigh = isLowerHigh[1] and high > high[1]

// --- 2-in-a-row detection ---
bullSecond = bullConfirm and bullConfirm[1]
bearSecond = bearConfirm and bearConfirm[1]

// --- SIGNAL QUALITY SCORING (1-5 scale) ---
bullScore = if bullConfirm
    score = 1  // Base score
    
    // Factor 1: Volume confirmation
    avgVolume = ta.sma(volume, 20)
    if volume > avgVolume * 1.2
        score := score + 1
        
    // Factor 2: RSI positioning
    rsi = ta.rsi(close, 14)
    if rsi < 70 and rsi > 30
        score := score + 1
        
    // Factor 3: Candle strength
    bodySize = math.abs(close - open)
    candleRange = high - low
    bodyRatio = candleRange > 0 ? bodySize / candleRange : 0
    if bodyRatio > 0.6
        score := score + 1
        
    // Factor 4: Trend alignment
    ma20 = ta.sma(close, 20)
    ma50 = ta.sma(close, 50)
    if ma20 > ma50 and close > ma20
        score := score + 1
        
    math.max(1, math.min(5, score))
else
    na

bearScore = if bearConfirm
    score = 1  // Base score
    
    // Factor 1: Volume confirmation
    avgVolume = ta.sma(volume, 20)
    if volume > avgVolume * 1.2
        score := score + 1
        
    // Factor 2: RSI positioning
    rsi = ta.rsi(close, 14)
    if rsi > 30 and rsi < 70
        score := score + 1
        
    // Factor 3: Candle strength
    bodySize = math.abs(close - open)
    candleRange = high - low
    bodyRatio = candleRange > 0 ? bodySize / candleRange : 0
    if bodyRatio > 0.6
        score := score + 1
        
    // Factor 4: Trend alignment
    ma20 = ta.sma(close, 20)
    ma50 = ta.sma(close, 50)
    if ma20 < ma50 and close < ma20
        score := score + 1
        
    math.max(1, math.min(5, score))
else
    na

// --- Plot main signals with score-based styling ---
// Bullish signals
plotshape(bullConfirm and bullScore == 1, "Bull Score 1", shape.triangleup, location.belowbar, color.gray, size=size.tiny)
plotshape(bullConfirm and bullScore == 2, "Bull Score 2", shape.triangleup, location.belowbar, color.orange, size=size.small)
plotshape(bullConfirm and bullScore == 3, "Bull Score 3", shape.triangleup, location.belowbar, color.yellow, size=size.normal)
plotshape(bullConfirm and bullScore == 4, "Bull Score 4", shape.triangleup, location.belowbar, color.lime, size=size.normal)
plotshape(bullConfirm and bullScore == 5, "Bull Score 5", shape.triangleup, location.belowbar, color.green, size=size.large)

// Bearish signals
plotshape(bearConfirm and bearScore == 1, "Bear Score 1", shape.triangledown, location.abovebar, color.gray, size=size.tiny)
plotshape(bearConfirm and bearScore == 2, "Bear Score 2", shape.triangledown, location.abovebar, color.orange, size=size.small)
plotshape(bearConfirm and bearScore == 3, "Bear Score 3", shape.triangledown, location.abovebar, color.yellow, size=size.normal)
plotshape(bearConfirm and bearScore == 4, "Bear Score 4", shape.triangledown, location.abovebar, color.lime, size=size.normal)
plotshape(bearConfirm and bearScore == 5, "Bear Score 5", shape.triangledown, location.abovebar, color.green, size=size.large)

// --- Plot failures ---
plotshape(failHigherLow, "Failed Higher Low", shape.arrowdown, location.abovebar, color.red, size=size.small)
plotshape(failLowerHigh, "Failed Lower High", shape.arrowup, location.belowbar, color.green, size=size.small)

// --- Plot consecutive signals ---
plotshape(bullSecond, "Double Bullish Star", shape.diamond, location.bottom, color.lime, size=size.tiny)
plotshape(bearSecond, "Double Bearish Star", shape.diamond, location.top, color.red, size=size.tiny)

// --- Display score labels ---
if bullConfirm
    labelColor = bullScore == 1 ? color.gray : bullScore == 2 ? color.orange : bullScore == 3 ? color.yellow : bullScore == 4 ? color.lime : color.green
    label.new(bar_index, low - (high - low) * 0.1, "↑ " + str.tostring(bullScore), style=label.style_label_up, color=labelColor, textcolor=color.white, size=size.small)

if bearConfirm
    labelColor = bearScore == 1 ? color.gray : bearScore == 2 ? color.orange : bearScore == 3 ? color.yellow : bearScore == 4 ? color.lime : color.green
    label.new(bar_index, high + (high - low) * 0.1, "↓ " + str.tostring(bearScore), style=label.style_label_down, color=labelColor, textcolor=color.white, size=size.small)

// --- Alerts for high-quality signals only ---
alertcondition(bullConfirm and bullScore >= 4, "High Quality Bullish", "Strong Bullish Signal Detected")
alertcondition(bearConfirm and bearScore >= 4, "High Quality Bearish", "Strong Bearish Signal Detected")

// --- STRATEGY LOGIC ---
// Track previous highs and lows for stop levels
var float prevHigh = na
var float prevLow = na

// Update previous high/low when we get signals
if bullConfirm and bullScore >= minScore
    prevLow := ta.lowest(low, 10)  // Previous 10-bar low for stop
    
if bearConfirm and bearScore >= minScore
    prevHigh := ta.highest(high, 10)  // Previous 10-bar high for stop

// Entry conditions (only scores 4 or higher)
longCondition = bullConfirm and bullScore >= minScore
shortCondition = bearConfirm and bearScore >= minScore

// Execute trades
if longCondition and strategy.position_size == 0
    strategy.entry("Long", strategy.long, qty=shares)
    strategy.exit("Long Exit", "Long", stop=prevLow)
    
if shortCondition and strategy.position_size == 0
    strategy.entry("Short", strategy.short, qty=shares)
    strategy.exit("Short Exit", "Short", stop=prevHigh)

// Close opposite position if new signal occurs
if longCondition and strategy.position_size < 0
    strategy.close("Short")
    strategy.entry("Long", strategy.long, qty=shares)
    strategy.exit("Long Exit", "Long", stop=prevLow)
    
if shortCondition and strategy.position_size > 0
    strategy.close("Long")
    strategy.entry("Short", strategy.short, qty=shares)
    strategy.exit("Short Exit", "Short", stop=prevHigh)

// Plot stop levels for visualization
plot(strategy.position_size > 0 ? prevLow : na, "Long Stop", color.red, linewidth=2, style=plot.style_linebr)
plot(strategy.position_size < 0 ? prevHigh : na, "Short Stop", color.red, linewidth=2, style=plot.style_linebr)