fix: Correct Smart Validation Queue confirmation threshold in Telegram notification (0.15% → 0.3%)
This commit is contained in:
@@ -271,6 +271,52 @@ rsiShortOk = not useRsiFilter or (rsi14 >= rsiShortMin and rsi14 <= rsiShortMax)
|
||||
finalLongSignal = buyReady and longOk and adxOk and longBufferOk and rsiLongOk and longPositionOk and volumeOk
|
||||
finalShortSignal = sellReady and shortOk and adxOk and shortBufferOk and rsiShortOk and shortPositionOk and volumeOk
|
||||
|
||||
// DEBUG: Show why signals are blocked when trend flips
|
||||
showDebugLabels = input.bool(true, "Show debug labels when signals blocked", group="Debug")
|
||||
var label debugLbl = na
|
||||
|
||||
if showDebugLabels and (buyReady or sellReady)
|
||||
var string debugText = ""
|
||||
var color debugColor = color.gray
|
||||
|
||||
if buyReady and not finalLongSignal
|
||||
// Trend flipped to LONG but signal blocked - show why
|
||||
debugText := "❌ LONG BLOCKED:\n"
|
||||
if not longOk
|
||||
debugText += "MACD ✗\n"
|
||||
if not adxOk
|
||||
debugText += "ADX " + str.tostring(adxVal, "#.#") + " < " + str.tostring(adxMin) + " ✗\n"
|
||||
if not longBufferOk
|
||||
debugText += "Entry Buffer ✗\n"
|
||||
if not rsiLongOk
|
||||
debugText += "RSI " + str.tostring(rsi14, "#.#") + " not in " + str.tostring(rsiLongMin) + "-" + str.tostring(rsiLongMax) + " ✗\n"
|
||||
if not longPositionOk
|
||||
debugText += "Price Pos " + str.tostring(pricePosition, "#.#") + "% > " + str.tostring(longPosMax) + "% ✗\n"
|
||||
if not volumeOk
|
||||
debugText += "Volume " + str.tostring(volumeRatio, "#.##") + " not in " + str.tostring(volMin) + "-" + str.tostring(volMax) + " ✗\n"
|
||||
debugColor := color.new(color.red, 30)
|
||||
label.delete(debugLbl)
|
||||
debugLbl := label.new(bar_index, high, text=debugText, yloc=yloc.price, style=label.style_label_down, textcolor=color.white, color=debugColor, size=size.small)
|
||||
|
||||
else if sellReady and not finalShortSignal
|
||||
// Trend flipped to SHORT but signal blocked - show why
|
||||
debugText := "❌ SHORT BLOCKED:\n"
|
||||
if not shortOk
|
||||
debugText += "MACD ✗\n"
|
||||
if not adxOk
|
||||
debugText += "ADX " + str.tostring(adxVal, "#.#") + " < " + str.tostring(adxMin) + " ✗\n"
|
||||
if not shortBufferOk
|
||||
debugText += "Entry Buffer ✗\n"
|
||||
if not rsiShortOk
|
||||
debugText += "RSI " + str.tostring(rsi14, "#.#") + " not in " + str.tostring(rsiShortMin) + "-" + str.tostring(rsiShortMax) + " ✗\n"
|
||||
if not shortPositionOk
|
||||
debugText += "Price Pos " + str.tostring(pricePosition, "#.#") + "% < " + str.tostring(shortPosMin) + "% ✗\n"
|
||||
if not volumeOk
|
||||
debugText += "Volume " + str.tostring(volumeRatio, "#.##") + " not in " + str.tostring(volMin) + "-" + str.tostring(volMax) + " ✗\n"
|
||||
debugColor := color.new(color.orange, 30)
|
||||
label.delete(debugLbl)
|
||||
debugLbl := label.new(bar_index, low, text=debugText, yloc=yloc.price, style=label.style_label_up, textcolor=color.white, color=debugColor, size=size.small)
|
||||
|
||||
plotshape(finalLongSignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.circle, size=size.small)
|
||||
plotshape(finalShortSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.circle, size=size.small)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user