feat: Telgos 2-Bar-Prime Alarmfilter hinzugefügt
- Neuer Spezial-Alarm für Blues Long - prüft nur aktuelle Kerze (0) und vorherige Kerze (-1) - optionale Bedingung: Auslöser seit Beginn der Blues-Phase - Changelog & README entsprechend erweitert
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
|
||||
|
||||
// CrocVibes by Telgos
|
||||
// Danke für die Grundlagen und Basisversion: amper04, ray_duke, husky, Audidriver13│
|
||||
|
||||
// =================================================================================================
|
||||
// Croc Vibes by Telgos – Version 4.1.0
|
||||
// Lizenz: Mozilla Public License 2.0 – https://mozilla.org/MPL/2.0/
|
||||
// Danksagung (Basis/Ideen): amper04, ray_duke, husky, Audidriver13
|
||||
// =================================================================================================
|
||||
|
||||
//@version=6
|
||||
// Version 4.0.1
|
||||
indicator("Croc Vibes by Telgos", overlay=true, max_labels_count=500, max_lines_count=500)
|
||||
|
||||
wolke_Line_pink = input.source(title="Wolke Linie Pink", defval=close, group="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")
|
||||
hellgruener_punkt_long = input.source(title="Hellgruener Punkt Long", defval=close, group="Chart-Signale")
|
||||
@@ -21,6 +23,9 @@ 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
|
||||
// -------------------------------------
|
||||
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")
|
||||
@@ -40,8 +45,14 @@ welle_rr = input.source(title="Welle (6) dunkelRot", defval=close, group="Lochs
|
||||
|
||||
src1 = input.source(close, "Day OverBought 1", group="MSI")
|
||||
|
||||
label_offset_mult = input.float(3.0, title="Label-Abstand (ATR x)", minval=0.1, step=0.1, group="Darstellung")
|
||||
// -------------------------------------
|
||||
// Darstellung
|
||||
// -------------------------------------
|
||||
label_offset_mult = input.float(1.5, title="Label-Abstand (ATR x)", minval=0.1, step=0.1, group="Darstellung")
|
||||
|
||||
// -------------------------------------
|
||||
// Helper / Ableitungen
|
||||
// -------------------------------------
|
||||
asBool(src) => nz(src) > 0
|
||||
atr = ta.atr(16)
|
||||
|
||||
@@ -102,6 +113,9 @@ 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])
|
||||
@@ -215,6 +229,9 @@ if end_short
|
||||
short_pending_active := false
|
||||
short_refLow := na
|
||||
|
||||
// -------------------------------------
|
||||
// Standard-Alertbedingungen
|
||||
// -------------------------------------
|
||||
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}}")
|
||||
@@ -231,6 +248,9 @@ 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)
|
||||
// -------------------------------------
|
||||
grp = "ALERT-COMBO"
|
||||
|
||||
optNone = "— (keins) —"
|
||||
@@ -243,11 +263,11 @@ optRotesPlus = "Rotes Kreuz (grüne Wolke)"
|
||||
optBlueLActive = "Blues: Ein Hoch kommt noch (aktiv)"
|
||||
optBlueSActive = "Blues: Ein Tief kommt noch (aktiv)"
|
||||
|
||||
sel1 = input.string(optNone, "Signal-Auswahl 1", options=["— (keins) —","Pearl Long","Pearl Short","Ulti Rally","Stephan Setup","BGRL","Rotes Kreuz (grüne Wolke)","Blues: Ein Hoch kommt noch (aktiv)","Blues: Ein Tief kommt noch (aktiv)"], group=grp)
|
||||
sel2 = input.string(optNone, "Signal-Auswahl 2", options=["— (keins) —","Pearl Long","Pearl Short","Ulti Rally","Stephan Setup","BGRL","Rotes Kreuz (grüne Wolke)","Blues: Ein Hoch kommt noch (aktiv)","Blues: Ein Tief kommt noch (aktiv)"], group=grp)
|
||||
sel3 = input.string(optNone, "Signal-Auswahl 3", options=["— (keins) —","Pearl Long","Pearl Short","Ulti Rally","Stephan Setup","BGRL","Rotes Kreuz (grüne Wolke)","Blues: Ein Hoch kommt noch (aktiv)","Blues: Ein Tief kommt noch (aktiv)"], group=grp)
|
||||
sel4 = input.string(optNone, "Signal-Auswahl 4", options=["— (keins) —","Pearl Long","Pearl Short","Ulti Rally","Stephan Setup","BGRL","Rotes Kreuz (grüne Wolke)","Blues: Ein Hoch kommt noch (aktiv)","Blues: Ein Tief kommt noch (aktiv)"], group=grp)
|
||||
sel5 = input.string(optNone, "Signal-Auswahl 5", options=["— (keins) —","Pearl Long","Pearl Short","Ulti Rally","Stephan Setup","BGRL","Rotes Kreuz (grüne Wolke)","Blues: Ein Hoch kommt noch (aktiv)","Blues: Ein Tief kommt noch (aktiv)"], group=grp)
|
||||
sel1 = input.string(optNone, "Signal-Auswahl 1", options=[optNone,optPearlLong,optPearlShort,optUlti,optStephan,optBGRL,optRotesPlus,optBlueLActive,optBlueSActive], group=grp)
|
||||
sel2 = input.string(optNone, "Signal-Auswahl 2", options=[optNone,optPearlLong,optPearlShort,optUlti,optStephan,optBGRL,optRotesPlus,optBlueLActive,optBlueSActive], group=grp)
|
||||
sel3 = input.string(optNone, "Signal-Auswahl 3", options=[optNone,optPearlLong,optPearlShort,optUlti,optStephan,optBGRL,optRotesPlus,optBlueLActive,optBlueSActive], group=grp)
|
||||
sel4 = input.string(optNone, "Signal-Auswahl 4", options=[optNone,optPearlLong,optPearlShort,optUlti,optStephan,optBGRL,optRotesPlus,optBlueLActive,optBlueSActive], group=grp)
|
||||
sel5 = input.string(optNone, "Signal-Auswahl 5", options=[optNone,optPearlLong,optPearlShort,optUlti,optStephan,optBGRL,optRotesPlus,optBlueLActive,optBlueSActive], group=grp)
|
||||
noCombine = input.bool(false, "Signale nicht kombinieren", group=grp, tooltip="Aus: Alle ausgewählten Signale müssen gleichzeitig zutreffen (UND). Ein: Irgendeins reicht (ODER).")
|
||||
|
||||
f_pick(name) =>
|
||||
@@ -295,22 +315,33 @@ comboCond = hasSelection ? (useOr ? anySel : allSel) : false
|
||||
|
||||
alertcondition(comboCond, title="ALERT-COMBO (aus Eingaben)", message="ALERT-COMBO erfüllt – {{ticker}} {{interval}}")
|
||||
|
||||
// --- START: Telgos-Spezial-Alarm (Version 3 Kerzen) ---
|
||||
// -------------------------------------
|
||||
// Telgos 2-Bar-Prime (Kerze 0 oder -1)
|
||||
// -------------------------------------
|
||||
grpTHP = "Telgos-Filter"
|
||||
require_since_start = input.bool(true, "2-Bar-Prime: Auslöser seit Blues-Start", group=grpTHP)
|
||||
|
||||
// 1. Definieren, welche Signale als Auslöser gelten.
|
||||
var bool ausloeser_signal = isPearlLong or ulti_rally or stephan_setup or is_bgrl or is_rotes_plus
|
||||
// Auslösermenge für 2-Bar-Prime
|
||||
ausloeser_signal = isPearlLong or ulti_rally or stephan_setup or is_bgrl or is_rotes_plus
|
||||
|
||||
// 2. Prüfen, ob ein Auslöser auf der aktuellen oder den zwei vorherigen Kerzen aktiv war.
|
||||
hat_ausloeser_in_letzten_3_kerzen = ausloeser_signal[0] or ausloeser_signal[1] or ausloeser_signal[2]
|
||||
// Kerzenfenster: nur aktuelle Kerze (0) oder vorherige Kerze (-1)
|
||||
trigger_now_or_prev = ausloeser_signal or (bar_index > 0 ? ausloeser_signal[1] : false)
|
||||
|
||||
// 3. Die finale Alarmbedingung: "Ein Hoch kommt noch" muss aktiv sein UND ein Auslöser muss kürzlich erschienen sein.
|
||||
telgos_spezial_cond = long_pending_active and hat_ausloeser_in_letzten_3_kerzen
|
||||
|
||||
// 4. Die neue Alert-Condition für die TradingView-Alarmeinstellungen.
|
||||
alertcondition(telgos_spezial_cond, title="Telgos-Spezial-Alarm", message="Telgos-Spezial: Hoch erwartet + Signal auf Kerze 0/-1/-2 ({{ticker}} {{interval}})")
|
||||
// Optional: Der Auslöser muss seit Beginn der aktuellen Blues-Phase aufgetreten sein
|
||||
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
|
||||
|
||||
// --- ENDE: Telgos-Spezial-Alarm ---
|
||||
// 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}}")
|
||||
|
||||
// -------------------------------------
|
||||
// Labels / Shapes (dezente Visualisierung)
|
||||
// -------------------------------------
|
||||
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
|
||||
@@ -332,4 +363,4 @@ plotshape(is_bgrl, title="BGRL", location=location.abovebar, colo
|
||||
plotshape(is_rotes_plus, title="Rotes Kreuz", location=location.belowbar, color=color.new(color.red, 100), style=shape.labeldown, size=size.tiny)
|
||||
|
||||
plotshape(long_pending_active, title="Ein Hoch kommt noch", location=location.abovebar, color=color.new(color.blue, 100), style=shape.circle, size=size.tiny)
|
||||
plotshape(short_pending_active, title="Ein Tief kommt noch", location=location.belowbar, color=color.new(color.blue, 100), style=shape.circle, size=size.tiny)
|
||||
plotshape(short_pending_active, title="Ein Tief kommt noch", location=location.belowbar, color=color.new(color.blue, 100), style=shape.circle, size=size.tiny)
|
||||
|
Reference in New Issue
Block a user