croc_vibes.pine hinzugefügt
This commit is contained in:
169
croc_vibes.pine
Normal file
169
croc_vibes.pine
Normal file
@@ -0,0 +1,169 @@
|
||||
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
|
||||
|
||||
// ┌────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
// │ │
|
||||
// │ ██████╗ ██╗ ██╗ ██╗ ██████╗ ███████╗ ██████╗ │
|
||||
// │ ██╔════╝ ██║ ██║ ██║ ██╔══██╗ ██╔════╝ ██╔════╝ │
|
||||
// │ ██║ ██║ ██║ ██║ ██████╔╝ █████╗ ╚█████╗ │
|
||||
// │ ██║ ╚██╗ ██╔╝ ██║ ██╔══██╗ ██╔══╝ ╚════██╗ │
|
||||
// │ ╚██████╗ ╚████╔╝ ██║ ██████╔╝ ███████╗ ██████╔╝ │
|
||||
// │ ╚═════╝ ╚═══╝ ╚═╝ ╚═════╝ ╚══════╝ ╚═════╝ │
|
||||
// │ V3.3 │
|
||||
// │ by Telgos │
|
||||
// │ │
|
||||
// ├────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
// │ │
|
||||
// │ Danke für die Grundlagen: │
|
||||
// │ ray_duke, husky, Audidriver13 │
|
||||
// │ │
|
||||
// ├────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
// │ │
|
||||
// │ Besonderen Dank an amper04, der eine funktionsfähige Basis │
|
||||
// │ zur Verfügung gestellt hat. │
|
||||
// │ │
|
||||
// └────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
//@version=5
|
||||
indicator("CVibes V3.3 by Telgos", overlay=true)
|
||||
|
||||
// === Inputs ===
|
||||
// --- Gruppe: Chart-Signale ---
|
||||
wolke_Line_rot = input.source(title="Wolke Linie Pink", defval=close, group="Chart-Signale")
|
||||
blauer_punkt_long = input.source(title="Blauer Punkt Long", defval=close, group="Chart-Signale")
|
||||
blauer_punkt_short = input.source(title="Blauer Punkt Short", defval=close, group="Chart-Signale")
|
||||
hellgruener_punkt_long = input.source(title="Hellgruener Punkt Long", 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")
|
||||
bb_kombi_long = input.source(title="BB Kombi long", defval=close, group="Chart-Signale")
|
||||
lollipop_long = input.source(title="Lollipop long", defval=close, group="Chart-Signale")
|
||||
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")
|
||||
|
||||
// --- Gruppe: Lochstreifen ---
|
||||
status_g = input.source(title="Status (1) Grün", defval=close, group="Lochstreifen")
|
||||
status_r = input.source(title="Status (2) 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")
|
||||
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_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")
|
||||
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")
|
||||
|
||||
// --- Gruppe: MSI ---
|
||||
src1 = input.source(close, "Day OverBought 1", group="MSI")
|
||||
src2 = input.source(close, "Week OverBought 2", group="MSI")
|
||||
src3 = input.source(close, "Week OverBought 5", group="MSI")
|
||||
|
||||
// --- Gruppe: Allgemeine Einstellungen ---
|
||||
show_trade_markers = input.bool(true, title="Long-Einstieg Marken anzeigen", group="Allgemeine Einstellungen")
|
||||
show_blue_dot_labels = input.bool(true, title="Blaue Punkte Labels anzeigen", group="Allgemeine Einstellungen")
|
||||
signal_close = input.source(title="Schließungspreis", defval=close, group="Allgemeine Einstellungen")
|
||||
swing_lookback = input.int(5, title="Swing-Lookback", minval=1, group="Allgemeine Einstellungen")
|
||||
label_offset_mult = input.float(3.0, title="Label Abstand (ATR Multiplikator)", minval=0.1, step=0.1, group="Allgemeine Einstellungen")
|
||||
|
||||
// === Logik ===
|
||||
atr = ta.atr(16)
|
||||
baerische_welle = (welle_rr > 0 or welle_r > 0)
|
||||
bullische_welle = (welle_gg > 0 or welle_g > 0)
|
||||
|
||||
// === Pearl Diver ===
|
||||
allRed = (status_r > 0) and (kerze_r > 0) and (wolke_r > 0) and (trend_r > 0) and (setter_r > 0) and baerische_welle
|
||||
kerzeSG_l = (status_r > 0) and ((kerze_s > 0) or (kerze_g > 0)) and (wolke_r > 0) and (trend_r > 0) and (setter_r > 0) and baerische_welle
|
||||
isPearlLong = kerzeSG_l and allRed[1] and allRed[2]
|
||||
|
||||
allGreen = (status_g > 0) and (kerze_g > 0) and (wolke_g > 0) and (trend_g > 0) and (setter_g > 0) and bullische_welle
|
||||
kerzeSG_s = (status_g > 0) and ((kerze_s > 0) or (kerze_r > 0)) and (wolke_g > 0) and (trend_g > 0) and (setter_g > 0) and bullische_welle
|
||||
isPearlShort = kerzeSG_s and allGreen[1] and allGreen[2]
|
||||
|
||||
// === Stephan-Setup (V2-Logik) ===
|
||||
stephan_zusatzbedingung_erfuellt = (cloud_punkt_long > 0) or
|
||||
(red_devil_long > 0) or
|
||||
(lollipop_long > 0) or
|
||||
(bb_kombi_long > 0) or
|
||||
(aw_rocket_long > 0) or
|
||||
(bgrl_signal > 0)
|
||||
stephan_setup = (src1 < 0) and (src2 < 0) and (src3 < 0) and (wolke_g > 0) and (trend_s > 0) and (setter_r > 0) and stephan_zusatzbedingung_erfuellt
|
||||
|
||||
// === Ulti Rally (V2-kompatibel) ===
|
||||
Kerze_in_wolke_gr = signal_close - wolke_Line_rot
|
||||
ulti_rally = (hellgruener_punkt_long > 0) and (Kerze_in_wolke_gr > 0) and (status_r > 0) and (kerze_r > 0) and (setter_r > 0) and not baerische_welle
|
||||
|
||||
// === BGRL ===
|
||||
is_bgrl = bgrl_signal > 0
|
||||
|
||||
// === Blaue Punkte ===
|
||||
highest_swing = ta.highest(high, swing_lookback)
|
||||
lowest_swing = ta.lowest(low, swing_lookback)
|
||||
isBlueShortFulfilled = (wolke_g > 0 and blauer_punkt_short > high and high == highest_swing)
|
||||
isBlueLongFulfilled = (wolke_r > 0 and blauer_punkt_long < low and low == lowest_swing)
|
||||
punkt_erfuellt = isBlueShortFulfilled or isBlueLongFulfilled
|
||||
|
||||
// === Alerts ===
|
||||
alertcondition(isPearlLong, title="Pearl Long", message="Pearl Diver erkannt")
|
||||
alertcondition(isPearlShort, title="Pearl Short", message="Oyster Farmer erkannt")
|
||||
alertcondition(ulti_rally, title="Ulti Rally", message="Ulti Rally erkannt")
|
||||
alertcondition(stephan_setup, title="Stephan Setup", message="Stephan Setup erkannt")
|
||||
alertcondition(is_bgrl, title="BGRL", message="Black Green Rocket Long erkannt")
|
||||
alertcondition(punkt_erfuellt, title="Blauer Punkt erfüllt", message="Blauer Punkt Swing erfüllt")
|
||||
|
||||
// === Labels ===
|
||||
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
|
||||
label.new(bar_index, high + atr * label_offset_mult, text="Oyster Farmer", style=label.style_label_down, color=color.purple, textcolor=color.white, size=size.small)
|
||||
if ulti_rally
|
||||
label.new(bar_index, low - atr * label_offset_mult, text="Ulti", style=label.style_label_up, color=color.aqua, textcolor=color.white, size=size.small)
|
||||
if stephan_setup
|
||||
label.new(bar_index, low - atr * label_offset_mult, text="Stephan", style=label.style_label_up, color=color.teal, textcolor=color.white, size=size.small)
|
||||
if is_bgrl
|
||||
label.new(bar_index, low - atr * label_offset_mult, text="BGRL", style=label.style_label_up, color=color.black, textcolor=color.white, size=size.small)
|
||||
|
||||
// === Blaue Punkt Labels ===
|
||||
if isBlueShortFulfilled and show_blue_dot_labels
|
||||
label.new(bar_index, high + atr * label_offset_mult, text="Blauer erfüllt", style=label.style_label_down, color=color.blue, textcolor=color.white, size=size.small)
|
||||
if isBlueLongFulfilled and show_blue_dot_labels
|
||||
label.new(bar_index, low - atr * label_offset_mult, text="Blauer erfüllt", style=label.style_label_up, color=color.blue, textcolor=color.white, size=size.small)
|
||||
if wolke_g > 0 and blauer_punkt_short > high and not punkt_erfuellt and show_blue_dot_labels
|
||||
label.new(bar_index, high + atr * label_offset_mult, text="Ein Hoch kommt noch", style=label.style_label_down, color=color.blue, textcolor=color.white, size=size.small)
|
||||
if wolke_g > 0 and blauer_punkt_short < low and show_blue_dot_labels
|
||||
label.new(bar_index, low - atr * label_offset_mult, text="Tief verpasst", style=label.style_label_up, color=color.blue, textcolor=color.white, size=size.small)
|
||||
if wolke_r > 0 and blauer_punkt_long < low and not punkt_erfuellt and show_blue_dot_labels
|
||||
label.new(bar_index, low - atr * label_offset_mult, text="Ein Tief kommt noch", style=label.style_label_up, color=color.blue, textcolor=color.white, size=size.small)
|
||||
if wolke_r > 0 and blauer_punkt_long > high and show_blue_dot_labels
|
||||
label.new(bar_index, high + atr * label_offset_mult, text="Hoch verpasst", style=label.style_label_down, color=color.blue, textcolor=color.white, size=size.small)
|
||||
|
||||
// === Marken rechts neben letzter Kerze ===
|
||||
tick = syminfo.mintick
|
||||
entry_price = high + tick
|
||||
sl_kerze = low - tick
|
||||
sl_wolke = wolke_Line_rot
|
||||
sl_swing = ta.lowest(low, swing_lookback)
|
||||
stop_loss = math.min(math.min(sl_kerze, sl_wolke), sl_swing)
|
||||
tp_distance = entry_price - stop_loss
|
||||
take_profit = entry_price + tp_distance
|
||||
|
||||
if barstate.islast and show_trade_markers
|
||||
line.new(x1=bar_index + 6, y1=entry_price, x2=bar_index + 6, y2=entry_price, color=color.blue, width=2)
|
||||
label.new(x=bar_index + 7, y=entry_price, text=str.tostring(entry_price, format.mintick), style=label.style_label_left, color=color.blue, textcolor=color.white, size=size.small)
|
||||
|
||||
line.new(x1=bar_index + 6, y1=stop_loss, x2=bar_index + 6, y2=stop_loss, color=color.purple, width=2)
|
||||
label.new(x=bar_index + 7, y=stop_loss, text=str.tostring(stop_loss, format.mintick), style=label.style_label_left, color=color.purple, textcolor=color.white, size=size.small)
|
||||
|
||||
line.new(x1=bar_index + 6, y1=take_profit, x2=bar_index + 6, y2=take_profit, color=color.green, width=2)
|
||||
label.new(x=bar_index + 7, y=take_profit, text=str.tostring(take_profit, format.mintick), style=label.style_label_left, color=color.green, textcolor=color.white, size=size.small)
|
||||
|
||||
// === Shapes für Screener/Backtest ===
|
||||
plotshape(isPearlLong, title="Pearl Long", location=location.abovebar, color=color.new(color.purple, 100), style=shape.labelup, size=size.tiny)
|
||||
plotshape(isPearlShort, title="Pearl Short", location=location.belowbar, color=color.new(color.purple, 100), style=shape.labeldown, size=size.tiny)
|
||||
plotshape(ulti_rally, title="Ulti Rally", location=location.abovebar, color=color.new(color.aqua, 100), style=shape.diamond, size=size.tiny)
|
||||
plotshape(stephan_setup, title="Stephan Setup", location=location.abovebar, color=color.new(color.teal, 100), style=shape.labelup, size=size.tiny)
|
||||
plotshape(is_bgrl, title="BGRL", location=location.abovebar, color=color.new(color.black, 100), style=shape.triangleup, size=size.tiny)
|
||||
plotshape(punkt_erfuellt, title="Blauer Punkt erfüllt", location=location.belowbar, color=color.new(color.blue, 100), style=shape.circle, size=size.tiny)
|
Reference in New Issue
Block a user