Preis-Textboxen an blauen Linien hinzugefügt

Zeigt den exakten Preis der aktiven Blues-Linie (Long/Short) direkt links am Startpunkt der Linie an.
Verbessert die Lesbarkeit und verhindert Überschneidungen mit der Linie.
This commit is contained in:
2025-09-06 08:48:58 +02:00
parent 7bbe02db3b
commit b1be0e3cc2
3 changed files with 57 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
// =================================================================================================
// Croc Vibes by Telgos Version 4.1.0
// Croc Vibes by Telgos Version 4.1.1
// Lizenz: Mozilla Public License 2.0 https://mozilla.org/MPL/2.0/
// Danksagung (Basis/Ideen): amper04, ray_duke, husky, Audidriver13
// =================================================================================================
@@ -327,7 +327,6 @@ ausloeser_signal = isPearlLong or ulti_rally or stephan_setup or is_bgrl or is_r
// 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_trigger = ta.barssince(ausloeser_signal)
@@ -339,6 +338,36 @@ telgos_2bar_prime_cond = long_pending_active and trigger_now_or_prev and (not re
// 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)
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)
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)
else
if not na(priceLblLong)
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)
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)
else
if not na(priceLblShort)
label.delete(priceLblShort), priceLblShort := na
// -------------------------------------
// Labels / Shapes (dezente Visualisierung)
// -------------------------------------