Version 4.1.3: Schalter für Preis-Textboxen ergänzt und Filter-Option umbenannt

- Neuer Toggle „Preis-Textboxen an Blues-Linien anzeigen“ (Standard: an)
- Telgos 2-Bar-Prime Filter klarer beschrieben („Ein Hoch/Tief kommt noch für Filter aktiv“) inkl. Tooltip
This commit is contained in:
2025-09-06 12:10:24 +02:00
parent b1be0e3cc2
commit 8b4a556d41
3 changed files with 74 additions and 90 deletions

View File

@@ -1,15 +1,12 @@
// =================================================================================================
// Croc Vibes by Telgos Version 4.1.1
// Croc Vibes by Telgos Version 4.1.2
// Lizenz: Mozilla Public License 2.0 https://mozilla.org/MPL/2.0/
// Danksagung (Basis/Ideen): amper04, ray_duke, husky, Audidriver13
// =================================================================================================
//@version=6
indicator("Croc Vibes by Telgos", overlay=true, max_labels_count=500, max_lines_count=500)
// -------------------------------------
// Eingaben: Chart-Signale
// -------------------------------------
// ========= Eingaben: Chart-Signale =========
wolke_Line_pink = input.source(title="Wolke Linie Pink", defval=close, group="Chart-Signale")
cloud_punkt_long = input.source(title="Cloud Punkt Long", defval=close, group="Chart-Signale")
red_devil_long = input.source(title="Red Devil Long", defval=close, group="Chart-Signale")
@@ -23,36 +20,30 @@ lollipop_long = input.source(title="Lollipop long", defval=close, group
aw_rocket_long = input.source(title="AW-Rocket long", defval=close, group="Chart-Signale")
bgrl_signal = input.source(title="Black Green Rocket Long", defval=close, group="Chart-Signale")
// -------------------------------------
// Eingaben: Lochstreifen / MSI
// -------------------------------------
// ========= Eingaben: Lochstreifen / MSI =========
kerze_g = input.source(title="Kerzenfarbe (1) Gruen", defval=close, group="Lochstreifen")
kerze_s = input.source(title="Kerzenfarbe (2) Schwarz", defval=close, group="Lochstreifen")
kerze_r = input.source(title="Kerzenfarbe (3) Rot", defval=close, group="Lochstreifen")
status_r = input.source(title="Status (2) Rot", defval=close, group="Lochstreifen")
kerze_r = input.source(title="Kerzenfarbe (3) Rot", defval=close, group="Lochstreifen")
status_r = input.source(title="Status (2) Rot", defval=close, group="Lochstreifen")
status_g = input.source(title="Status (3) Grün", defval=close, group="Lochstreifen")
wolke_g = input.source(title="Wolke (1) Grün", defval=close, group="Lochstreifen")
wolke_r = input.source(title="Wolke (3) Rot", defval=close, group="Lochstreifen")
wolke_g = input.source(title="Wolke (1) Grün", defval=close, group="Lochstreifen")
wolke_r = input.source(title="Wolke (3) Rot", defval=close, group="Lochstreifen")
trend_s = input.source(title="Trend (1) Schwarz", defval=close, group="Lochstreifen")
trend_r = input.source(title="Trend (2) Rot", defval=close, group="Lochstreifen")
trend_g = input.source(title="Trend (3) Grün", defval=close, group="Lochstreifen")
setter_r = input.source(title="Setter (Trend 5) Rot", defval=close, group="Lochstreifen")
trend_r = input.source(title="Trend (2) Rot", defval=close, group="Lochstreifen")
trend_g = input.source(title="Trend (3) Grün", defval=close, group="Lochstreifen")
setter_r = input.source(title="Setter (Trend 5) Rot", defval=close, group="Lochstreifen")
setter_g = input.source(title="Setter (Trend 6) grün", defval=close, group="Lochstreifen")
welle_g = input.source(title="Welle (1) grün", defval=close, group="Lochstreifen")
welle_g = input.source(title="Welle (1) grün", defval=close, group="Lochstreifen")
welle_gg = input.source(title="Welle (2) dunkelgrün", defval=close, group="Lochstreifen")
welle_r = input.source(title="Welle (4) Rot", defval=close, group="Lochstreifen")
welle_rr = input.source(title="Welle (6) dunkelRot", defval=close, group="Lochstreifen")
welle_r = input.source(title="Welle (4) Rot", defval=close, group="Lochstreifen")
welle_rr = input.source(title="Welle (6) dunkelRot", defval=close, group="Lochstreifen")
src1 = input.source(close, "Day OverBought 1", group="MSI")
// -------------------------------------
// Darstellung
// -------------------------------------
// ========= Darstellung =========
label_offset_mult = input.float(1.5, title="Label-Abstand (ATR x)", minval=0.1, step=0.1, group="Darstellung")
show_price_labels = input.bool(true, "Preis-Textboxen an Blues-Linien anzeigen", group="Darstellung")
// -------------------------------------
// Helper / Ableitungen
// -------------------------------------
// ========= Helper =========
asBool(src) => nz(src) > 0
atr = ta.atr(16)
@@ -88,12 +79,13 @@ cz_r = asBool(kerze_r)
baerische_welle = wl_rr or wl_r
bullische_welle = wl_gg or wl_g
allRed = st_r and cz_r and wk_r and tr_r and set_r and baerische_welle
kerzeSG_l = st_r and (cz_s or cz_g) and wk_r and tr_r and set_r and baerische_welle
isPearlLong = kerzeSG_l and allRed[1] and allRed[2]
// ========= Kernsignale =========
allRed = st_r and cz_r and wk_r and tr_r and set_r and baerische_welle
kerzeSG_l = st_r and (cz_s or cz_g) and wk_r and tr_r and set_r and baerische_welle
isPearlLong = kerzeSG_l and allRed[1] and allRed[2]
allGreen = st_g and cz_g and wk_g and tr_g and set_g and bullische_welle
kerzeSG_s = st_g and (cz_s or cz_r) and wk_g and tr_g and set_g and bullische_welle
allGreen = st_g and cz_g and wk_g and tr_g and set_g and bullische_welle
kerzeSG_s = st_g and (cz_s or cz_r) and wk_g and tr_g and set_g and bullische_welle
isPearlShort = kerzeSG_s and allGreen[1] and allGreen[2]
stephan_zusatzbedingung_erfuellt = cp_long or rd_long or lolli_long or bb_long or awr_long or bgrl or g_plus
@@ -102,9 +94,10 @@ stephan_setup = not na(src1) and wk_g and tr_s and set_r and stephan_zusatzbedin
Kerze_in_wolke_gr = close - wolke_Line_pink
ulti_rally = hgr_long and (Kerze_in_wolke_gr > 0) and st_r and cz_r and set_r and not baerische_welle
is_bgrl = bgrl
is_bgrl = bgrl
is_rotes_plus = r_plus and wk_g
// ========= Blues-Zonenpflege =========
g_active = wk_g
r_active = wk_r
@@ -113,16 +106,13 @@ f_rise(sig) =>
cond_prev = na(sig[1]) or (sig[1] <= 0)
cond_now and cond_prev
// -------------------------------------
// Zonenpflege für grüne/rote Wolke (Blues-Logik)
// -------------------------------------
var int g_zoneStart = na
var float g_zoneHigh = na
g_switch = barstate.isfirst ? true : (g_active != g_active[1])
if bar_index == 0 or g_switch
g_zoneStart := bar_index
g_zoneHigh := na
g_inZone = g_active and bar_index >= g_zoneStart
g_inZone = g_active and bar_index >= g_zoneStart
g_zoneHigh_prev = g_zoneHigh
if g_inZone
if na(g_zoneHigh) or high > g_zoneHigh
@@ -134,7 +124,7 @@ r_switch = barstate.isfirst ? true : (r_active != r_active[1])
if bar_index == 0 or r_switch
r_zoneStart := bar_index
r_zoneLow := na
r_inZone = r_active and bar_index >= r_zoneStart
r_inZone = r_active and bar_index >= r_zoneStart
r_zoneLow_prev = r_zoneLow
if r_inZone
if na(r_zoneLow) or low < r_zoneLow
@@ -170,8 +160,8 @@ ev_short_break := false
if long_start_ok and not long_pending_active
long_pending_active := true
long_refHigh := g_zoneHigh_prev
ev_long_start := true
long_refHigh := g_zoneHigh_prev
ev_long_start := true
if high < long_refHigh
if not na(startLblLong)
label.delete(startLblLong)
@@ -182,8 +172,8 @@ if long_start_ok and not long_pending_active
if short_start_ok and not short_pending_active
short_pending_active := true
short_refLow := r_zoneLow_prev
ev_short_start := true
short_refLow := r_zoneLow_prev
ev_short_start := true
if low > short_refLow
if not na(startLblShort)
label.delete(startLblShort)
@@ -229,9 +219,7 @@ if end_short
short_pending_active := false
short_refLow := na
// -------------------------------------
// Standard-Alertbedingungen
// -------------------------------------
// ========= Alerts: Standard =========
alertcondition(isPearlLong, title="Pearl Long", message="Pearl Diver erkannt {{ticker}} {{interval}}")
alertcondition(isPearlShort, title="Pearl Short", message="Oyster Farmer erkannt {{ticker}} {{interval}}")
alertcondition(ulti_rally, title="Ulti Rally", message="Ulti Rally erkannt {{ticker}} {{interval}}")
@@ -248,18 +236,15 @@ alertcondition(ev_short_done, title="Blues: Ein Tief kommt noch (Erfüllt)",
alertcondition(ev_long_break, title="Blues: Ein Hoch kommt noch (Wolkenbruch)", message="Blues Long INVALID (Cloud Break) {{ticker}} {{interval}}")
alertcondition(ev_short_break, title="Blues: Ein Tief kommt noch (Wolkenbruch)", message="Blues Short INVALID (Cloud Break) {{ticker}} {{interval}}")
// -------------------------------------
// Alert-Kombinator (UND/ODER)
// -------------------------------------
// ========= Alert-Kombinator (UND/ODER) =========
grp = "ALERT-COMBO"
optNone = "— (keins) —"
optPearlLong = "Pearl Long"
optPearlShort = "Pearl Short"
optUlti = "Ulti Rally"
optStephan = "Stephan Setup"
optBGRL = "BGRL"
optRotesPlus = "Rotes Kreuz (grüne Wolke)"
optNone = "— (keins) —"
optPearlLong = "Pearl Long"
optPearlShort = "Pearl Short"
optUlti = "Ulti Rally"
optStephan = "Stephan Setup"
optBGRL = "BGRL"
optRotesPlus = "Rotes Kreuz (grüne Wolke)"
optBlueLActive = "Blues: Ein Hoch kommt noch (aktiv)"
optBlueSActive = "Blues: Ein Tief kommt noch (aktiv)"
@@ -303,7 +288,7 @@ s4 = sel4 != optNone
s5 = sel5 != optNone
anySel = (s1 ? c1 : false) or (s2 ? c2 : false) or (s3 ? c3 : false) or (s4 ? c4 : false) or (s5 ? c5 : false)
allSel = (s1 ? c1 : true ) and (s2 ? c2 : true ) and (s3 ? c3 : true ) and (s4 ? c4 : true ) and (s5 ? c5 : true )
allSel = (s1 ? c1 : true) and (s2 ? c2 : true) and (s3 ? c3 : true) and (s4 ? c4 : true) and (s5 ? c5 : true)
hasSelection = s1 or s2 or s3 or s4 or s5
pickedBlueL = (sel1 == optBlueLActive) or (sel2 == optBlueLActive) or (sel3 == optBlueLActive) or (sel4 == optBlueLActive) or (sel5 == optBlueLActive)
@@ -315,62 +300,55 @@ comboCond = hasSelection ? (useOr ? anySel : allSel) : false
alertcondition(comboCond, title="ALERT-COMBO (aus Eingaben)", message="ALERT-COMBO erfüllt {{ticker}} {{interval}}")
// -------------------------------------
// Telgos 2-Bar-Prime (Kerze 0 oder -1)
// -------------------------------------
// ========= Telgos 2-Bar-Prime =========
grpTHP = "Telgos-Filter"
require_since_start = input.bool(true, "2-Bar-Prime: Auslöser seit Blues-Start", group=grpTHP)
require_since_start = input.bool(true, "Ein Hoch/Tief kommt noch für Filter aktiv", group=grpTHP, tooltip="Wenn aktiviert: Nur Auslöser berücksichtigen, die seit Beginn des aktuellen 'Ein Hoch/Tief kommt noch' aufgetreten sind")
// Auslösermenge für 2-Bar-Prime
ausloeser_signal = isPearlLong or ulti_rally or stephan_setup or is_bgrl or is_rotes_plus
// Kerzenfenster: nur aktuelle Kerze (0) oder vorherige Kerze (-1)
trigger_now_or_prev = ausloeser_signal or (bar_index > 0 ? ausloeser_signal[1] : false)
// Optional: Der Auslöser muss seit Beginn der aktuellen Blues-Phase aufgetreten sein
since_start = ta.barssince(ev_long_start)
since_start = ta.barssince(ev_long_start)
since_trigger = ta.barssince(ausloeser_signal)
cond_since_start = not na(since_start) and not na(since_trigger) and since_trigger <= since_start
// Finale Bedingung
telgos_2bar_prime_cond = long_pending_active and trigger_now_or_prev and (not require_since_start or cond_since_start)
// Ein eigener Alarmtitel/-text
alertcondition(telgos_2bar_prime_cond, title="Telgos 2-Bar-Prime", message="Telgos 2-Bar-Prime {{ticker}} {{interval}}")
// Preis-Textbox links vom Linienstart, exakt auf Linienhöhe (robust, kein Kreuz)
// ========= Preis-Textboxen an blauen Linien (Toggle) =========
var label priceLblLong = na
var label priceLblShort = na
// LONG Text links vom Startpunkt der Long-Linie
if long_pending_active and not na(longPendingLine)
int lx1 = line.get_x1(longPendingLine)
if show_price_labels and long_pending_active and not na(longPendingLine)
int lx1 = line.get_x1(longPendingLine)
float ly1 = line.get_y1(longPendingLine)
string tL = str.tostring(ly1, format.mintick)
if na(priceLblLong)
priceLblLong := label.new(lx1, ly1, tL, xloc=xloc.bar_index, yloc=yloc.price, style=label.style_label_right, textcolor=color.blue, color=color.new(color.white, 100), size=size.normal)
else
label.set_x(priceLblLong, lx1), label.set_y(priceLblLong, ly1), label.set_text(priceLblLong, tL)
label.set_x(priceLblLong, lx1)
label.set_y(priceLblLong, ly1)
label.set_text(priceLblLong, tL)
else
if not na(priceLblLong)
label.delete(priceLblLong), priceLblLong := na
label.delete(priceLblLong)
priceLblLong := na
// SHORT Text links vom Startpunkt der Short-Linie
if short_pending_active and not na(shortPendingLine)
int sx1 = line.get_x1(shortPendingLine)
if show_price_labels and short_pending_active and not na(shortPendingLine)
int sx1 = line.get_x1(shortPendingLine)
float sy1 = line.get_y1(shortPendingLine)
string tS = str.tostring(sy1, format.mintick)
if na(priceLblShort)
priceLblShort := label.new(sx1, sy1, tS, xloc=xloc.bar_index, yloc=yloc.price, style=label.style_label_right, textcolor=color.blue, color=color.new(color.white, 100), size=size.normal)
else
label.set_x(priceLblShort, sx1), label.set_y(priceLblShort, sy1), label.set_text(priceLblShort, tS)
label.set_x(priceLblShort, sx1)
label.set_y(priceLblShort, sy1)
label.set_text(priceLblShort, tS)
else
if not na(priceLblShort)
label.delete(priceLblShort), priceLblShort := na
label.delete(priceLblShort)
priceLblShort := na
// -------------------------------------
// Labels / Shapes (dezente Visualisierung)
// -------------------------------------
// ========= Dezente Labels / Shapes =========
if isPearlLong
label.new(bar_index, low - atr * label_offset_mult, text="Pearl Diver", style=label.style_label_up, color=color.purple, textcolor=color.white, size=size.small)
if isPearlShort