READ-ONLY

Das Forum ist jetzt ein schreibgeschütztes Archiv.

Für Fehlerberichte und Fragen zur Plattform → [email protected]

Unsere Community lebt auf Discord und YouTube - komm zu uns!

HILFE BEIM HOCHLADEN DIESES INDIKATORS BITTE

0 Antworten

WILLIAM GAKUO

Abonnent, bbp_participant, Kunde, Gemeinschaft, sq-ultimate, 1 Antworten.

Profil besuchen

vor 1 Jahr #289975

Kann mir jemand helfen, den untenstehenden Indikatorcode hochzuladen?

 

indicator('Breakout]', overlay = true, max_lines_count = 4, max_labels_count = 500)
// INPUTS --------------------------------------------------------------------------------------------------------{
int length = 100 // Länge der Zeilenverlängerung
float multi = input.float(4, 'Kanalbreite', step = 0.1) // Multiplikator für Kanalbreite
bool show_x = input.bool(false, "X-Signale anzeigen")
bool filter_sig = input.bool(false, "Signale nach Trends filtern", "Bei True filtert der Indikator ▲▼ basierend auf der Ausbruchsbedingung des Kanals. Wenn der Kanal bullisch ist, werden nur ▲ Signale mit grünem Kreis angezeigt, wenn er bearisch ist, werden nur ▼ Signale mit rotem Kreis angezeigt")
color color1 = input.color(#1dac70, "", inline = "col", group = "OB/OS")
color color3 = input.color(#df3a79, "", inline = "col", group = "OB/OS")
bool gradient = input.bool(true, "Gradient", inline = "ll", group = "OB/OS")
int transp = input.int(80, "", inline = "ll", group = "OB/OS")
color color2 = chart.fg_color // Farbe der Mittellinie
// Variablen initialisieren
var float wert = na
var float wert_oben = na
var float wert_niedriger = na
var float wert_oberer_mittelwert = na
var float wert_untere_mitte = na
var bool trend = false
var count = 0
// }
// CALCULATIONS----------------------------------------------------------------------------------------------{
float atr = ta.sma(ta.atr(200), 100) * multi // ATR-basierte Kanalbreite
// Kanalwerte initialisieren
wenn bar_index == 301
    Wert := hl2
    wert_oben := hl2 + atr
    wert_niedrig := hl2 - atr
    wert_oben_mittel := math.avg(wert, wert_oben)
    wert_niedrig_mittel := math.avg(wert, wert_niedrig)
    wert_niedrig_mittel
// Prüfung auf Überschneidungen
bool cross_upper = ta.crossover(low, value_upper) und barstate.isconfirmed
bool cross_lower = ta.crossunder(high, value_lower) und barstate.isconfirmed
// Zählen der Balken außerhalb des Kanals
wenn niedrig > Wert_oben oder hoch < Wert_unten
    Anzahl := Anzahl + 1
    zählen
// Kanalwerte beim Übergang oder nach 100 Takten zurücksetzen
if cross_upper oder cross_lower oder count == 100
    Anzahl := 0
    Wert := hl2
    wert_oben := hl2 + atr
    wert_niedrig := hl2 - atr
    wert_oben_mittel := math.avg(wert, wert_oben)
    wert_niedrig_mittel := math.avg(wert, wert_niedrig)
    wert_niedrig_mittel
bool chage = not(Wert != Wert[1])
bool buy_ = ta.crossover(low, value_lower_mid) and low[10] > value_lower_mid and barstate.isconfirmed and chage
bool sell_ = ta.crossunder(high, value_upper_mid) and high[10] < value_upper_mid and barstate.isconfirmed and chage
bool fakeout_up = ta.crossunder(high, value_upper) und barstate.isconfirmed und chage
bool fakeout_dn = ta.crossover(low, value_lower) und barstate.isconfirmed und chage
// }
// PLOT ------------------------------------------------------------------------------------------------------------{
// Linien zeichnen und füllen
p1 = plot(wert_oben != wert_oben[1] ? na : wert_oben, color = color1, linewidth = 1, style = plot.style_linebr)
p0 = plot(bar_index % 2 == 0 ? value : na, color = color2, style = plot.style_linebr)
p2 = plot(wert_niedrig != wert_niedrig[1] ? na : wert_niedrig, color = color3, linewidth = 1, style = plot.style_linebr)
upper_mid = math.avg(wert_ober, wert)
untere_Mitte = math.avg(wert_unter, wert)
p01 = plot(upper_mid != upper_mid[1] ? na : upper_mid, color = color.new(color2, 50), style = plot.style_linebr)
p02 = plot(lower_mid != lower_mid[1] ? na : lower_mid, color = color.new(color2, 50), style = plot.style_linebr)
fill(p1, p01, wert_oben, wert, color.new(wert_oben != wert_oben[1] ? na : color1, transp), color.new(wert_oben != wert_oben[1] ? na : color1, gradient ? 100 : transp))
fill(p2, p02, value, value_lower, color.new(value_upper != value_upper[1] ? na : color3, gradient ? 100 : transp), color.new(value_upper != value_upper[1] ? na : color3, transp))
// Kreuzsignale aufzeichnen
wenn quer_oben
    trend := true
    label.new(bar_index - 1, value_upper[1], text = '⦿', textcolor = color1, style = label.style_label_center, color = color(na), size = size.large, tooltip = "Bullish Break")
wenn Kreuz_Unter
    trend := false
    label.new(bar_index - 1, value_lower[1], text = '⦿', textcolor = color3, style = label.style_label_center, color = color(na), size = size.large, tooltip = "Bearish Break")
if buy_ und (filter_sig ? trend : true)
    label.new(bar_index - 1, low[1], text = '▲', textcolor = color1, style = label.style_label_up, color = color(na), size = size.normal)
if sell_ und (filter_sig ? not trend : true)
    label.new(bar_index - 1, high[1], text = '▼', textcolor = color3, style = label.style_label_down, color = color(na), size = size.normal)
wenn fakeout_up und show_x
    label.new(bar_index - 1, high[1], text = 'X', textcolor = color3, style = label.style_label_down, color = color(na), size = size.normal)
wenn fakeout_dn und show_x
    label.new(bar_index - 1, low[1], text = 'X', textcolor = color1, style = label.style_label_up, color = color(na), size = size.normal)
// }

0