
¿Cuál es el problema con las estrategias tradicionales de oscilación? Hay demasiadas señales, mala calidad, falsos brechas frecuentes.Cada señal tiene una calificación de calidad de 1 a 5 puntos, solo se comercializan señales de alta calidad de 4 o más。
La lógica central es simple y crudamente: identifica un Higher Low (un punto más bajo) y un Lower High (un punto más bajo) y luego puntua la señal en 4 dimensiones.En un mínimo de 4 minutos, el filtro elimina el 80% de las señales de basura。
1 punto básicoLa existencia de la forma oscilante ha sido confirmada. Confirmación de la entrega + 1 puntoEl promedio de transacciones de más de 20 ciclos es de 1.2 veces el valor promedio, lo que indica que hay una identificación de fondos. El RSI está en posición +1El RSI se mantiene en el rango de 30-70, evitando falsas señales de sobrecompra y sobreventa. Entidad de la línea K + 1 puntoEn el caso de las entidades, el porcentaje es de más del 60%, asegurando que no sean formas indecisas como las estrellas cruzadas. La tendencia se ha alineado a un punto.El precio, el MA20 y el MA50 están en la misma dirección.
Resultado: 5 puntos de puntuación máxima, 4 puntos o más son negociables y 3 o menos son ignorados.。
La lógica de los estancamientos es muy clara:
¿Por qué el ciclo de 10?Debido a que la naturaleza de la estrategia de oscilación es capturar una reversión a corto plazo, los 10 ciclos no solo brindan suficiente espacio de respiración al precio, sino que también no permiten que el stop loss sea demasiado grande. Es más adecuado para la estructura del mercado que el multiplicador ATR fijo.
La estrategia también identifica “movimientos fallidos”:
Estos fracasos suelen indicar una aceleración de la tendencia, y es el momento perfecto para invertir.。
Cuando dos líneas K consecutivas aparecen en la misma dirección, la señal de confirmación se muestra con el símbolo de diamante. Esto generalmente significa:
Las señales continuas suelen tener un 15% a 20% más de éxito que las señales individuales.。
El mejor entorno:
Evite el uso de escenarios:
El riesgo claro:
Consejos para la administración de fondos: el riesgo no excede el 2% de la cuenta en una sola operación, y se suspende el comercio después de 3 pérdidas consecutivas para reevaluar la situación del mercado.
/*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)