// === Fractal Signal Logic (Upgrade Only) ===
//longSignal = not na(anchorLow) and crossover(close, anchorLow)
crossdown1 = not na(anchorHigh) and close[1] < anchorHigh
crossdown2 = not na(anchorHigh) and close < anchorHigh
//shortSignal = crossdown1 and crossdown2
// === Highlight Signal Logic (L or S + any other signal)
highlightSignal = (longSignal or shortSignal) and (entrySignal or entrySignal2 or transition or transition6 )
// === Visual Marker for Highlighted Signal
plotshape(highlightSignal, location=location.abovebar, style=shape.labelup, color=color.yellow, text=“
”, size=size.large, title=“Highlighted Signal”)
// === Alert for Highlighted Signal
alertcondition(highlightSignal, title=“
Highlighted Signal Alert”, message=“Fractal signal coincides with another major trigger”)
// === Fractal-Based Fibonacci Retracement (Parallel to ATR-Based)
// Only activates when bullishSignal is true and anchorLow is valid
useFractalFib = bullishSignal and not na(anchorLow) and anchorLow < signalCandleLow
fractFibStart = useFractalFib ? anchorLow : na
fractFibEnd = useFractalFib ? signalCandleLow : na
fractFib100 = fractFibStart
fractFib786 = fractFibStart + (fractFibEnd - fractFibStart) * 0.786
fractFib618 = fractFibStart + (fractFibEnd - fractFibStart) * 0.618
fractFib50 = fractFibStart + (fractFibEnd - fractFibStart) * 0.5
fractFib382 = fractFibStart + (fractFibEnd - fractFibStart) * 0.382
fractFib236 = fractFibStart + (fractFibEnd - fractFibStart) * 0.236
fractFib0 = fractFibEnd
//plot(useFractalFib ? fractFib100 : na, title=“Fractal Fib 0%”, color=color.gray, linewidth=1)
//plot(useFractalFib ? fractFib786 : na, title=“Fractal Fib 78.6%”, color=color.green, linewidth=1)
//plot(useFractalFib ? fractFib618 : na, title=“Fractal Fib 61.8%”, color=color.orange, linewidth=1)
//plot(useFractalFib ? fractFib50 : na, title=“Fractal Fib 50%”, color=color.red, linewidth=1)
//plot(useFractalFib ? fractFib382 : na, title=“Fractal Fib 38.2%”, color=color.purple, linewidth=1)
//plot(useFractalFib ? fractFib236 : na, title=“Fractal Fib 23.6%”, color=color.yellow, linewidth=1)
//plot(useFractalFib ? fractFib0 : na, title=“Fractal Fib 100%”, color=color.white, linewidth=1)
// === MetaCluster Between Fractal Anchors ===
B = metaSignal and close > anchorLow and close < anchorHigh
//plotshape(B, title=“MetaCluster Between Anchors”, location=location.abovebar, style=shape.labelup, color=color.purple, text=“META✓”)
alertcondition(B or metaSignal or highlightSignal or v , title=“META TO CHECK Between Anchors Alert”, message=“META TO CHECK FIRST signal detected between fractal anchors.”)
allAlerts = B or highlightSignal or metaSignal or v or entrySignal or entrySignal2
alertcondition(allAlerts, title=“
CROCOBOT MASTER ALERT”, message=“Unified signal detected across CROCOBOT modules. Check dashboard for alignment.”)
// === Oversold/Overbought Conditions ===
rsiOversold = rsiVal <= 30
rsiOverbought = rsiVal >= 70
stochOversold = stochK * 100 <= 20
stochOverbought = stochK * 100 >= 80
cciOversold = cci5 <= -100 and cci20 <= -100
cciOverbought = cci5 >= 100 and cci20 >= 100
// === Checkmark Logic ===
rsiStochCheck = (rsiOversold and stochOversold) or (rsiOverbought and stochOverbought)
cciCheck = cciOversold or cciOverbought
// === Signal Panel ===
var table signalPanel = table.new(position.top_right, 1, 8, border_width=1)
if bar_index % 5 == 0
table.cell(signalPanel, 0, 0, “
Signal Panel”, text_color=color.white, bgcolor=color.gray, text_size=size.normal)
table.cell(signalPanel, 0, 1, “RSI: " + tostring(rsiVal, “#.##”) + " | Stoch %K: " + tostring(stochK * 100, “#.##”) + (rsiStochCheck ? "
” : “”), text_color=color.lime, bgcolor=color.black)
table.cell(signalPanel, 0, 2, “CCI(5): " + tostring(cci5, “#.##”) + " | CCI(20): " + tostring(cci20, “#.##”) + (cciCheck ? "
” : “”), text_color=color.orange, bgcolor=color.black)
table.cell(signalPanel, 0, 3, "Status: " + (rsiStochCheck and cciCheck ? “
All Aligned” : “Waiting…”), text_color=color.white, bgcolor=color.black)
// === Dashboard Signal Panel ===
dashboardSignal = rsiStochCheck and cciCheck
if bar_index % 5 == 0
table.cell(signalPanel, 0, 0, “
Signal Panel”, text_color=color.white, bgcolor=color.gray, text_size=size.normal)
table.cell(signalPanel, 0, 1, “RSI: " + tostring(rsiVal, “#.##”) + " | Stoch %K: " + tostring(stochK * 100, “#.##”) + (rsiStochCheck ? "
” : “”), text_color=color.lime, bgcolor=color.black)
table.cell(signalPanel, 0, 2, “CCI(5): " + tostring(cci5, “#.##”) + " | CCI(20): " + tostring(cci20, “#.##”) + (cciCheck ? "
” : “”), text_color=color.orange, bgcolor=color.black)
table.cell(signalPanel, 0, 3, "Status: " + (dashboardSignal ? “
All Aligned” : “Waiting…”), text_color=color.white, bgcolor=color.black)
//plotshape(dashboardSignal, title=“Dashboard Signal”, location=location.belowbar, color=color.fuchsia, style=shape.triangleup, text=“
”, size=size.large)
alertcondition(dashboardSignal, title=“
Dashboard Signal Alert”, message=“All dashboard indicators aligned (RSI, Stoch, CCI)”)
dashboardHighlight = dashboardSignal and highlightSignal
//plotshape(dashboardHighlight, title=“Dashboard + Highlight”, location=location.abovebar, color=color.orange, style=shape.labelup, text=“![]()
”, size=size.large)
alertcondition(dashboardHighlight, title=“![]()
Dashboard Highlight Alert”, message=“Dashboard indicators aligned with fractal highlight signal. Check CROCOBOT panel for confirmation.”)
//dashboardHighlight2 = dashboardSignal and highlightSignal and (entrySignal or entrySignal2 or transition or transition6 )
entryCombo = (entrySignal or entrySignal2 or transition or transition6)
entryComboPrev = (entrySignal[1] or entrySignal2[1] or transition[1] or transition6[1])
dashboardHighlight2 = (dashboardSignal or dashboardSignal[1]) and (highlightSignal or highlightSignal[1]) and (entryCombo or entryComboPrev)
//plotshape(dashboardHighlight, title=“Dashboard + Highlight2”, location=location.abovebar, color=color.orange, style=shape.labelup, text=“
2
”, size=size.large)
alertcondition(dashboardHighlight, title=“![]()
Dashboard Highlight Alert2”, message=“Dashboard indicators aligned with fractal highlight signal. Check CROCOBOT panel for confirmation.”)
alertcondition(dashboardHighlight or dashboardHighlight2, title=“![]()
Dashboard Highlight Alert2”, message=“Dashboard indicators aligned with fractal highlight signal. Check CROCOBOT panel for confirmation.”)
// === Trend Envelope Logic ===
ma1 = ema(close, 13)
ma2 = ema(close, 21)
ma3 = ema(close, 34)
ma = ema(close, 89)
range = tr
rangema = ema(range, 89)
upper = ma + rangema * 0.5
lower = ma - rangema * 0.5
// === Trend Conditions ===
tr_up = ma1 > upper and ma2 > upper and ma3 > upper
tr_down = ma1 < lower and ma2 < lower and ma3 < lower
// === Background Pulse (No Value Plotting) ===
bgcolor(tr_up ? color.green : tr_down ? color.red : na, transp=85)
// ===
ATR Multipliers
atr1x = 1.5
atr2x = 2.0
atr3x = 2.5
atr4x = 3.0
atr5x = 3.5
// ===
ATR Calculations
//atr1 = atr(14)
//atr2 = atr(10)
//atr3 = atr(26)
//atr4 = atr(22)
atr5 = atr(7)
//loss1 = atr1x * atr1
//loss2 = atr2x * atr2
//loss3 = atr3x * atr3
//loss4 = atr4x * atr4
loss5 = atr5x * atr5
// ===
Trailing Stops
var float sl1 = na
var float sl2 = na
var float sl3 = na
var float sl4 = na
var float sl5 = na
sl1 := close > nz(sl1[1]) ? max(nz(sl1[1]), close - loss1) : min(nz(sl1[1]), close + loss1)
sl2 := close > nz(sl2[1]) ? max(nz(sl2[1]), close - loss2) : min(nz(sl2[1]), close + loss2)
sl3 := close > nz(sl3[1]) ? max(nz(sl3[1]), close - loss3) : min(nz(sl3[1]), close + loss3)
sl4 := close > nz(sl4[1]) ? max(nz(sl4[1]), close - loss4) : min(nz(sl4[1]), close + loss4)
sl5 := close > nz(sl5[1]) ? max(nz(sl5[1]), close - loss5) : min(nz(sl5[1]), close + loss5)
// ===
Breakout Conditions
priceAboveAll = close > sl1 and close > sl2 and close > sl3 and close > sl4 and close > sl5
priceBelowAll = close < sl1 and close < sl2 and close < sl3 and close < sl4 and close < sl5
// ===
State Tracking
var string lastState = “none”
currentState = priceAboveAll ? “buy” : priceBelowAll ? “sell” : “hold”
stateChanged = currentState != lastState
lastState := stateChanged ? currentState : lastState
// ===
Alerts
//alertcondition(stateChanged and currentState == “buy”, title=“
Buy Breakout”, message=“Price broke above all SLs — Buy setup.”)
//alertcondition(stateChanged and currentState == “sell”, title=“
Sell Breakdown”, message=“Price broke below all SLs — Sell setup.”)
// ===
Candle Coloring
//barcolor(priceAboveAll ? color.green : priceBelowAll ? color.red : na)
// ===
Plot SL Trails
//plot(sl1, title=“SL1”, color=color.new(color.red, 0), linewidth=1)
//plot(sl2, title=“SL2”, color=color.new(color.orange, 0), linewidth=1)
//plot(sl3, title=“SL3”, color=color.new(color.yellow, 0), linewidth=1)
//plot(sl4, title=“SL4”, color=color.new(color.green, 0), linewidth=1)
//plot(sl5, title=“SL5”, color=color.new(color.blue, 0), linewidth=1)
// ===
Crocobot Entry Overlay
//plotshape(priceAboveAll, title=“Buy Overlay”, location=location.top, style=shape.triangleup, color=color.green, size=size.tiny)
//plotshape(priceBelowAll, title=“Sell Overlay”, location=location.bottom, style=shape.triangledown, color=color.red, size=size.tiny)
// ===
PnP: Elliott Wave Trigger via SL Breakout
enableElliottOverlay = input(true, title=“نمایش موج 3 یا C”)
strongBreakout = priceAboveAll and close > high[1] and close > high[2]
strongBreakdown = priceBelowAll and close < low[1] and close < low[2]
plotshape(enableElliottOverlay and strongBreakout, title=“شروع موج 3 (صعودی)”, location=location.belowbar, style=shape.labelup, color=color.lime, text=“موج 3↑”, textcolor=color.black)
plotshape(enableElliottOverlay and strongBreakdown, title=“شروع موج C (نزولی)”, location=location.abovebar, style=shape.labeldown, color=color.red, text=“موج C↓”, textcolor=color.white)
alertcondition(enableElliottOverlay and strongBreakout, title=“
شروع موج 3”, message=“شکست پرقدرت به بالا: احتمال شروع موج 3”)
alertcondition(enableElliottOverlay and strongBreakdown, title=“
شروع موج C”, message=“شکست پرقدرت به پایین: احتمال شروع موج C”)
// ===
PnP: Elliott Wave Numbering + Alerts
enableElliottWaves = input(true, title=“فعالسازی موجهای الیوت”)
useDynamicWaveCount = input(true, title=“Use Dynamic Wave Count”)
manualWaveCount = input(5, title=“Max Wave Count (Manual)”)
// === Signal Flags
//isEntry = entrySignal or entrySignal2
//isTransition = transition or transition6
//isDip = dipFormed
//isFibZone = close >= fib618 and close <= fib786
//isFractal = bullishFractal
//isAboveATR = close > atrTrailingStop1 and close > atrTrailingStop2
// === MetaCluster Score
//clusterScore = (isEntry ? 2 : 0) + (isTransition ? 2 : 0) + (isDip ? 1 : 0) + (isFibZone ? 1 : 0) + (isFractal ? 1 : 0) + (isAboveATR ? 1 : 0)
// === Confidence Layer
confidence = (isEntry and isFractal) ? 100 :
(isEntry or isTransition) ? 80 :
(isDip or isFibZone) ? 60 :
(isAboveATR) ? 50 : 30
// === Dynamic Wave Count via Score + Confidence
dynamicWaveCount = clusterScore >= 7 and confidence >= 90 ? 3 :
clusterScore >= 5 ? 5 :
clusterScore >= 3 ? 2 :
clusterScore >= 1 ? 4 : 1
// === Final Wave Count Selector
maxWaveCount = useDynamicWaveCount ? dynamicWaveCount : manualWaveCount
// === Dashboard Display
table.cell(signalPanel, 0, 6, "Wave Count: " + tostring(maxWaveCount), text_color=color.white, bgcolor=color.black)
table.cell(signalPanel, 0, 7, "Confidence: " + tostring(confidence), text_color=color.white, bgcolor=color.black)
var int waveUp = 0
var int waveDown = 0
newWaveUp = priceAboveAll and close > high[1] and close > high[2]
newWaveDown = priceBelowAll and close < low[1] and close < low[2]
waveUp := newWaveUp ? waveUp + 1 : waveUp
waveDown := newWaveDown ? waveDown + 1 : waveDown
waveUp := waveUp > maxWaveCount ? 1 : waveUp
waveDown := waveDown > maxWaveCount ? 1 : waveDown
// موجهای صعودی
//plotshape(enableElliottWaves and newWaveUp and waveUp == 1, location=location.belowbar, style=shape.labelup, color=color.green, text=“↑ موج 1”, textcolor=color.black)
//(enableElliottWaves and newWaveUp and waveUp == 2, location=location.belowbar, style=shape.labelup, color=color.green, text=“↑ موج 2”, textcolor=color.black)
//plotshape(enableElliottWaves and newWaveUp and waveUp == 3, location=location.belowbar, style=shape.labelup, color=color.green, text=“↑ موج 3”, textcolor=color.black)
//plotshape(enableElliottWaves and newWaveUp and waveUp == 4, location=location.belowbar, style=shape.labelup, color=color.green, text=“↑ موج 4”, textcolor=color.black)
//plotshape(enableElliottWaves and newWaveUp and waveUp == 5, location=location.belowbar, style=shape.labelup, color=color.green, text=“↑ موج 5”, textcolor=color.black)
waveEnd = waveUp == maxWaveCount or waveDown == maxWaveCount
// موجهای نزولی
//plotshape(enableElliottWaves and newWaveDown and waveDown == 1, location=location.abovebar, style=shape.labeldown, color=color.red, text=“↓ موج 1”, textcolor=color.white)
//plotshape(enableElliottWaves and newWaveDown and waveDown == 2, location=location.abovebar, style=shape.labeldown, color=color.red, text=“↓ موج 2”, textcolor=color.white)
//plotshape(enableElliottWaves and newWaveDown and waveDown == 3, location=location.abovebar, style=shape.labeldown, color=color.red, text=“↓ موج 3”, textcolor=color.white)
//plotshape(enableElliottWaves and newWaveDown and waveDown == 4, location=location.abovebar, style=shape.labeldown, color=color.red, text=“↓ موج 4”, textcolor=color.white)
///plotshape(enableElliottWaves and newWaveDown and waveDown == 5, location=location.abovebar, style=shape.labeldown, color=color.red, text=“↓ موج 5”, textcolor=color.white)
// === Bullish Wave Alerts ===
alertcondition((enableElliottWaves and newWaveUp and waveUp == 1) or (enableElliottWaves and newWaveDown and waveDown == 1), title=“Wave 1/1 Up”, message=“Wave 1 Up detected”)
alertcondition(enableElliottWaves and newWaveUp and waveUp == 2, title=“Wave 2 Up”, message=“Wave 2 Up detected”)
alertcondition(enableElliottWaves and newWaveUp and waveUp == 3, title=“Wave 3 Up”, message=“Wave 3 Up detected”)
alertcondition(enableElliottWaves and newWaveUp and waveUp == 4, title=“Wave 4 Up”, message=“Wave 4 Up detected”)
alertcondition((enableElliottWaves and newWaveUp and waveUp == 5) or (enableElliottWaves and newWaveDown and waveDown == 5), title=“Wave 5/5 Up”, message=“Wave 5 Up detected”)
// === Bearish Wave Alerts ===
//alertcondition(enableElliottWaves and newWaveDown and waveDown == 1, title=“Wave 1 Down”, message=“Wave 1 Down detected”)
alertcondition(enableElliottWaves and newWaveDown and waveDown == 2, title=“Wave 2 Down”, message=“Wave 2 Down detected”)
alertcondition(enableElliottWaves and newWaveDown and waveDown == 3, title=“Wave 3 Down”, message=“Wave 3 Down detected”)
alertcondition(enableElliottWaves and newWaveDown and waveDown == 4, title=“Wave 4 Down”, message=“Wave 4 Down detected”)
//alertcondition(enableElliottWaves and newWaveDown and waveDown == 5, title=“Wave 5 Down”, message=“Wave 5 Down detected”)
// Define your bullish signal condition (example: bullish engulfing)
//bullishSignal = close > open and close[1] < open[1] and close > open[1]
// Persistent counter
var int candleCount = na
candleCount := bullishSignal ? 1 : (not na(candleCount) ? candleCount + 1 : na)
// Labeling specific candles
if candleCount == 8
label.new(bar_index, high, “8”, style=label.style_label_down, color=color.rgb(54, 58, 69, 100), textcolor=color.white)
if candleCount == 13
label.new(bar_index, high, “13”, style=label.style_label_down, color=color.rgb(54, 58, 69, 100), textcolor=color.white)
if candleCount == 21
label.new(bar_index, high, “21”, style=label.style_label_down, color=color.rgb(54, 58, 69, 100), textcolor=color.white)
if candleCount == 34
label.new(bar_index, high, “34”, style=label.style_label_down, color=color.rgb(54, 58, 69, 100), textcolor=color.white)
if candleCount == 55
label.new(bar_index, high, “55”, style=label.style_label_down, color=color.rgb(54, 58, 69, 100), textcolor=color.white)
if candleCount == 89
label.new(bar_index, high, “89”, style=label.style_label_down, color=color.rgb(54, 58, 69, 100), textcolor=color.white)
// Reset counter if desired (optional)
// candleCount := someResetCondition ? na : candleCount
D = bullishSignal and (enableElliottWaves or enableElliottWaves or enableElliottWaves or enableElliottWaves or enableElliottWaves or candleCount == 8 or candleCount == 13 or candleCount == 34 or candleCount == 55 or candleCount == 89 )
plotshape(D and newWaveUp and waveUp == 1, location=location.bottom, style=shape.labelup, color=color.rgb(255, 255, 255, 100), text=“↑ موج 1”, textcolor=color.rgb(255, 255, 255))
alertcondition(D , title=“D”, message=“D”)
// === INPUTS ===
iBarsBack = input(defval=2, title=“Bars Back”, type=input.integer)
macdFast = input(defval=40, title=“MACD Fast Length”, type=input.integer)
macdSlow = input(defval=144, title=“MACD Slow Length”, type=input.integer)
macdSignal = input(defval=9, title=“MACD Signal Length”, type=input.integer)
// === MOVING AVERAGES ===
//sma20 = sma(close, 20)
//sma40 = sma(close, 40)
//ema40 = ema(close, 40)
//ema144 = ema(close, 144)
// === SLOPE CALCULATIONS ===
changeSMA20 = change(sma20, 1)
changeSMA40 = change(sma40, 1)
slopeSMA20 = changeSMA20
slopeSMA40 = changeSMA40
rad2degree = 180 / 3.14159265359
slopeSMA20Degree = rad2degree * atan(slopeSMA20)
slopeSMA40Degree = rad2degree * atan(slopeSMA40)
// === BARS BACK SLOPE ===
sma2sample = sma(close, 20)
slopeD20 = rad2degree * atan((sma2sample[1] - nz(sma2sample[iBarsBack])) / iBarsBack)
// === CCI CONDITIONS ===
//cci5 = cci(close, 20)
cci55 = cci(close, 5)
cciCondition1 = (cci5 <= -99 or cci5 >= 99) or (cci5[1] <= -99 or cci5[1] >= 99)
cciCondition2 = (cci55 <= -99 or cci55 >= 99) or (cci55[1] <= -99 or cci55[1] >= 99)
cciCondition22 = (cciCondition1 or cciCondition2)
// === TOUCH CONDITIONS ===
touchConditionBottom1 = (low[1] <= sma20[1] or high[1] <= sma20[1]) or (low <= sma20 or high <= sma20)
touchConditionBottom2 = close[1] >= sma40[1]
// === SMA & SLOPE CONDITIONS ===
smaSCondition = sma20[1] >= sma40[1]
slopeSMA20Condition = slopeSMA20Degree > 0
slopeSMA40Condition = slopeSMA40Degree > 0
// === BEARISH OVERRIDE ===
bearishOverride = close < sma20 or close < sma40
// === MAIN SIGNAL ===
finalResult = cciCondition22 and touchConditionBottom1 and touchConditionBottom2 and smaSCondition and slopeSMA20Condition and slopeSMA40Condition
// === MACD FLIP LOGIC ===
macdLine = ema(close, macdFast) - ema(close, macdSlow)
macdSignalLine = ema(macdLine, macdSignal)
bullFlip = crossover(macdLine, macdSignalLine)
bearFlip = crossunder(macdLine, macdSignalLine)
// === SIGNAL TYPES ===
confirmedBull = finalResult and bullFlip and not bearishOverride
pendingBull = finalResult and not bullFlip and not bearishOverride
bearishSignal = finalResult and bearishOverride
// === SMA COLOR LOGIC (Max Saturation) ===
sma20Color = close > sma20 ? color.lime : color.maroon
sma40Color = close > sma40 ? color.lime : color.maroon
// === BACKGROUND COLOR ===
bgcolor(confirmedBull ? color.lime : na, transp=85)
entryStrong = entrySignal and transition and isAboveATR
metaFractal = bullishFractal and clusterScore >= 4
transitionFiltered = transition and isAboveATR and isFibZone
highlightSignalOnce = (longSignal or shortSignal) and (entrySignal or entrySignal2 or transition or transition6)
longSignalOnce = bullishFractal and close > anchorLow
shortSignalOnce = bearishFractal and close < anchorHigh
entryModerate = entrySignal or entrySignal2
waveMid = waveUp == floor(maxWaveCount / 2) or waveDown == floor(maxWaveCount / 2)
waveStart = waveUp == 1 or waveDown == 1
// === PLOTTING ===
//plot(finalResult ? 1.0 : na, title=“Main Signal”, color=color.green, linewidth=2)
//plot(confirmedBull ? 2.0 : na, title=“Confirmed Flip”, color=color.blue, linewidth=3)
plotshape(confirmedBull, title=“Bull Flip Overlay”, location=location.belowbar, color=color.green, style=shape.arrowup)
plotshape(pendingBull, title=“Pending Signal”, location=location.belowbar, color=color.gray, style=shape.labeldown, text=“P”)
plotshape(bearishSignal, title=“Bearish Signal”, location=location.abovebar, color=color.red, style=shape.labeldown, text=“S”)
alertcondition(D or pendingBull or bearishSignal or confirmedBull , title=“D+”, message=“D+”)
//alertcondition(confirmedBull and metaSignal, title=“Meta Bull Flip”, message=“Confirmed bull flip with cluster alignment”)
alertcondition(D and newWaveUp and waveUp == 1, title=“D Wave 1 Trigger”, message=“Wave 1 detected with D+ alignment”)
// === SMA OVERLAYS WITH MAX GREEN/RED ===
//plot(sma20, title=“SMA 20”, color=sma20Color, linewidth=2)
//plot(sma40, title=“SMA 40”, color=sma40Color, linewidth=2)
// === Signal Strength Calculation ===
slBreachMetaSignal = crossunder(close, signalCandleLow) and metaSignal
signalStrength = confirmedBull ? 90 :
entryStrong ? 85 :
metaFractal ? 80 :
v ? 75 :
transitionFiltered ? 70 :
highlightSignalOnce ? 65 :
longSignalOnce or shortSignalOnce ? 60 :
entryModerate ? 55 :
pendingBull ? 50 :
dipFormed and isAboveATR ? 45 :
waveStart ? 40 :
waveMid ? 35 :
waveEnd ? 30 :
bearishSignal ? 25 :
slBreachMetaSignal ? 20 : 0
// === Plot Signal Strength Line ===
plot(signalStrength, title=“Signal Strength”, color=color.new(color.teal, 0), linewidth=2, style=plot.style_line)
// === Background Heatmap ===
bgcolor( signalStrength >= 80 ? color.new(color.green, 85) : signalStrength >= 60 ? color.new(color.orange, 85) : signalStrength >= 40 ? color.new(color.red, 85) : na, title=“Signal Strength Heatmap”)
// === Top-Right Panel (existing) ===
//var table signalPanel = table.new(position.top_right, 1, 1, border_width=1)
// === Tactical Descriptions ===
actionText = signalStrength >= 90 ? “
Aggressive Entry” : signalStrength >= 80 ? “
Full Entry / Scale In” : signalStrength >= 70 ? “
Light Entry / Probe” : signalStrength >= 60 ? “
Prep Entry / Watchlist” : signalStrength >= 40 ? “
Monitor / Structure Forming” : signalStrength >= 20 ? “
Avoid / Weak Signal” : “
No Signal”
confidenceText = confidence >= 90 ? “
High Conviction” : confidence >= 80 ? “
Strong Agreement” : confidence >= 60 ? “
Moderate Alignment” : confidence >= 40 ? “
Mixed Signals” : confidence >= 20 ? “
Low Confidence” : “
No Alignment”
strengthColor = signalStrength >= 70 ? color.green : signalStrength >= 40 ? color.rgb(63, 60, 100) : color.red
// === Signal Panel ===
//var table signalPanel2 = table.new(position.bottom_left, 1, 8, border_width=1)
if bar_index % 5 == 0
//table.cell(signalPanel2, 0, 0, “
Signal Panel”, text_color=color.white, bgcolor=color.gray)
//table.cell(signalPanel, 0, 1, “RSI: " + tostring(rsiVal, “#.##”) + " | Stoch %K: " + tostring(stochK * 100, “#.##”) + (rsiStochCheck ? "
” : “”), text_color=color.lime, bgcolor=color.black)
//table.cell(signalPanel, 0, 2, “CCI(5): " + tostring(cci5, “#.##”) + " | CCI(20): " + tostring(cci20, “#.##”) + (cciCheck ? "
” : “”), text_color=color.orange, bgcolor=color.black)
//table.cell(signalPanel, 0, 3, "Status: " + (dashboardSignal ? “
All Aligned” : “Waiting…”), text_color=color.white, bgcolor=color.black)
table.cell(signalPanel, 0, 4, "Signal Strength: " + tostring(signalStrength), text_color=color.white, bgcolor=strengthColor)
table.cell(signalPanel, 0, 5, "Action: " + actionText, text_color=color.white, bgcolor=color.gray)
table.cell(signalPanel, 0, 6, "Confidence: " + tostring(confidenceText) + "% | " , text_color=color.white, bgcolor=color.navy)
//table.cell(signalPanel2, 0, 7, "Wave: " + tostring(waveCount) + " | Flip: " + (flip ? “
” : “—”), text_color=color.white, bgcolor=color.black)
alertcondition(signalStrength >= 80, title=“
Strong Signal Alert”, message=“Signal strength is high ({{signalStrength}}) on {{ticker}} — consider tactical entry.”)
alertcondition(confidence >= 80, title=“
High Confidence Alert”, message=“Confidence score is high ({{confidence}}%) on {{ticker}} — indicators are aligned.”)
alertcondition(signalStrength >= 80 and confidence >= 80, title=“![]()
Strong + Confident Signal”, message=“High signal strength and confidence on {{ticker}} — tactical setup confirmed.”)
توجه داشته باشید تریدینگ ویو در آخرین بروزرسانی خود قادر به نمایش نهایتا 65 پلات می باشد . بهمین جهت برخی از آیتم ها با استفاده از // پنهان شده اند دو بخش ارسالی بهترین وجه از وجوه ممکن را به نقش کشیده اما جهت استفاده حداکثری از تمام توان کد میتونید بر اساس نیاز خود با استفاده از // بخش های منفی را نمایان و نمایان را مخفی بسازید .
توجه داشته باشید بجهت بهره برداری دقیق از آموزش های آتی نیاز است تا ستینگ نمایشی عینا مطابق با پیشنهادات مندرج در اولین انتشار تنظیم گردد .
پایان انتشار سورس کد نسخه ی نجار ایده ال
PROMAX
در ادامه و در پست سوم از ان مجموعه تکنیک هایی که با آن امکان ورود با نهایت دقت ممکن میسر است توضیح داده میشود . همچنین شیوه نامه ی اتصال این کد به سامانه ی دریافت سیگنال و اجرای خوودکار در متا تریدر در بخش مربوط به توضیحات الارم ها توضیح داده خواهد شد .
بامید از دست ندادن 1 سنت برای تک تک شما عزیزان