Binance Square

pinescript

7 Aufrufe
4 Kommentare
chamod wenushka
--
Original ansehen
//@version=5 indicator("Kaufe die Dip-Strategie (Jede Münze)", overlay=true) // === EINGABEN === stochKLen = input.int(14, "Stochastische %K Länge") stochDLen = input.int(3, "Stochastische %D Länge") stochSmooth = input.int(3, "Stochastische Glättung") buyZone = input.float(0.98, "Kaufzone % (z.B. 0.98 = 2% darunter)", step=0.01) tpMultiplier = input.float(1.05, "Gewinnmitnahme % (z.B. 1.05 = 5% darüber)", step=0.01) slMultiplier = input.float(0.97, "Stop-Loss % (z.B. 0.97 = 3% darunter)", step=0.01) // === STOKASTISCHER OSZILLATOR === k = ta.sma(ta.stoch(close, high, low, stochKLen), stochSmooth) d = ta.sma(k, stochDLen) // === DYNAMISCHE NIVEAUS === var float entryPrice = na var bool inTrade = false // === KAUFBEDINGUNGEN === buyCondition = ta.crossover(k, d) and k < 80 if (buyCondition and not inTrade) entryPrice := close inTrade := true // === TP und SL NIVEAUS === takeProfitPrice = entryPrice * tpMultiplier stopLossPrice = entryPrice * slMultiplier // === AUSSTIEGSBEDINGUNGEN === exitConditionTP = inTrade and close >= takeProfitPrice exitConditionSL = inTrade and close <= stopLossPrice if (exitConditionTP or exitConditionSL) inTrade := false entryPrice := na // === PLOTS === plotshape(buyCondition and not inTrade, title="Kaufsignal", location=location.belowbar, color=color.green, style=shape.labelup, text="KAUFEN") plotshape(exitConditionTP, title="Gewinnmitnahme", location=location.abovebar, color=color.red, style=shape.labeldown, text="TP") plotshape(exitConditionSL, title="Stop-Loss", location=location.abovebar, color=color.orange, style=shape.labeldown, text="SL") plot(entryPrice, title="Einstiegspreis", color=color.new(color.green, 60)) plot(inTrade ? takeProfitPrice : na, title="Gewinnmitnahme Niveau", color=color.new(color.red, 60), style=plot.style_line) plot(inTrade ? stopLossPrice : na, title="Stop-Loss Niveau", color=color.new(color.orange, 60), style=plot.style_line) #pinescript #Write2Earn
//@version=5
indicator("Kaufe die Dip-Strategie (Jede Münze)", overlay=true)

// === EINGABEN ===
stochKLen = input.int(14, "Stochastische %K Länge")
stochDLen = input.int(3, "Stochastische %D Länge")
stochSmooth = input.int(3, "Stochastische Glättung")

buyZone = input.float(0.98, "Kaufzone % (z.B. 0.98 = 2% darunter)", step=0.01)
tpMultiplier = input.float(1.05, "Gewinnmitnahme % (z.B. 1.05 = 5% darüber)", step=0.01)
slMultiplier = input.float(0.97, "Stop-Loss % (z.B. 0.97 = 3% darunter)", step=0.01)

// === STOKASTISCHER OSZILLATOR ===
k = ta.sma(ta.stoch(close, high, low, stochKLen), stochSmooth)
d = ta.sma(k, stochDLen)

// === DYNAMISCHE NIVEAUS ===
var float entryPrice = na
var bool inTrade = false

// === KAUFBEDINGUNGEN ===
buyCondition = ta.crossover(k, d) and k < 80

if (buyCondition and not inTrade)
entryPrice := close
inTrade := true

// === TP und SL NIVEAUS ===
takeProfitPrice = entryPrice * tpMultiplier
stopLossPrice = entryPrice * slMultiplier

// === AUSSTIEGSBEDINGUNGEN ===
exitConditionTP = inTrade and close >= takeProfitPrice
exitConditionSL = inTrade and close <= stopLossPrice

if (exitConditionTP or exitConditionSL)
inTrade := false
entryPrice := na

// === PLOTS ===
plotshape(buyCondition and not inTrade, title="Kaufsignal", location=location.belowbar, color=color.green, style=shape.labelup, text="KAUFEN")
plotshape(exitConditionTP, title="Gewinnmitnahme", location=location.abovebar, color=color.red, style=shape.labeldown, text="TP")
plotshape(exitConditionSL, title="Stop-Loss", location=location.abovebar, color=color.orange, style=shape.labeldown, text="SL")

plot(entryPrice, title="Einstiegspreis", color=color.new(color.green, 60))
plot(inTrade ? takeProfitPrice : na, title="Gewinnmitnahme Niveau", color=color.new(color.red, 60), style=plot.style_line)
plot(inTrade ? stopLossPrice : na, title="Stop-Loss Niveau", color=color.new(color.orange, 60), style=plot.style_line)
#pinescript #Write2Earn
Melde dich an, um weitere Inhalte zu entdecken
Bleib immer am Ball mit den neuesten Nachrichten aus der Kryptowelt
⚡️ Beteilige dich an aktuellen Diskussionen rund um Kryptothemen
💬 Interagiere mit deinen bevorzugten Content-Erstellern
👍 Entdecke für dich interessante Inhalte
E-Mail-Adresse/Telefonnummer