OPEN-SOURCE SCRIPT
Arena TP Manager

//version=5
indicator("Arena TP Manager", overlay=true, max_labels_count=500)
// === INPUTS ===
entryPrice = input.float(0.0, "Entry Price", step=0.1)
stopLossPerc = input.float(5.0, "Stop Loss %", step=0.1)
tp1Perc = input.float(10.0, "TP1 %", step=0.1)
tp2Perc = input.float(20.0, "TP2 %", step=0.1)
tp3Perc = input.float(30.0, "TP3 %", step=0.1)
// === CALCULATIONS ===
stopLoss = entryPrice * (1 - stopLossPerc/100)
tp1 = entryPrice * (1 + tp1Perc/100)
tp2 = entryPrice * (1 + tp2Perc/100)
tp3 = entryPrice * (1 + tp3Perc/100)
// === PLOTTING ===
plot(entryPrice > 0 ? entryPrice : na, title="Entry", color=color.yellow, linewidth=2, style=plot.style_linebr)
plot(entryPrice > 0 ? stopLoss : na, title="Stop Loss", color=color.red, linewidth=2, style=plot.style_linebr)
plot(entryPrice > 0 ? tp1 : na, title="TP1", color=color.green, linewidth=2, style=plot.style_linebr)
plot(entryPrice > 0 ? tp2 : na, title="TP2", color=color.green, linewidth=2, style=plot.style_linebr)
plot(entryPrice > 0 ? tp3 : na, title="TP3", color=color.green, linewidth=2, style=plot.style_linebr)
// === LABELS ===
if (entryPrice > 0)
label.new(bar_index, entryPrice, "ENTRY: " + str.tostring(entryPrice), style=label.style_label_up, color=color.yellow, textcolor=color.black)
label.new(bar_index, stopLoss, "SL: " + str.tostring(stopLoss), style=label.style_label_down, color=color.red, textcolor=color.white)
label.new(bar_index, tp1, "TP1: " + str.tostring(tp1), style=label.style_label_up, color=color.green, textcolor=color.white)
label.new(bar_index, tp2, "TP2: " + str.tostring(tp2), style=label.style_label_up, color=color.green, textcolor=color.white)
label.new(bar_index, tp3, "TP3: " + str.tostring(tp3), style=label.style_label_up, color=color.green, textcolor=color.white)
indicator("Arena TP Manager", overlay=true, max_labels_count=500)
// === INPUTS ===
entryPrice = input.float(0.0, "Entry Price", step=0.1)
stopLossPerc = input.float(5.0, "Stop Loss %", step=0.1)
tp1Perc = input.float(10.0, "TP1 %", step=0.1)
tp2Perc = input.float(20.0, "TP2 %", step=0.1)
tp3Perc = input.float(30.0, "TP3 %", step=0.1)
// === CALCULATIONS ===
stopLoss = entryPrice * (1 - stopLossPerc/100)
tp1 = entryPrice * (1 + tp1Perc/100)
tp2 = entryPrice * (1 + tp2Perc/100)
tp3 = entryPrice * (1 + tp3Perc/100)
// === PLOTTING ===
plot(entryPrice > 0 ? entryPrice : na, title="Entry", color=color.yellow, linewidth=2, style=plot.style_linebr)
plot(entryPrice > 0 ? stopLoss : na, title="Stop Loss", color=color.red, linewidth=2, style=plot.style_linebr)
plot(entryPrice > 0 ? tp1 : na, title="TP1", color=color.green, linewidth=2, style=plot.style_linebr)
plot(entryPrice > 0 ? tp2 : na, title="TP2", color=color.green, linewidth=2, style=plot.style_linebr)
plot(entryPrice > 0 ? tp3 : na, title="TP3", color=color.green, linewidth=2, style=plot.style_linebr)
// === LABELS ===
if (entryPrice > 0)
label.new(bar_index, entryPrice, "ENTRY: " + str.tostring(entryPrice), style=label.style_label_up, color=color.yellow, textcolor=color.black)
label.new(bar_index, stopLoss, "SL: " + str.tostring(stopLoss), style=label.style_label_down, color=color.red, textcolor=color.white)
label.new(bar_index, tp1, "TP1: " + str.tostring(tp1), style=label.style_label_up, color=color.green, textcolor=color.white)
label.new(bar_index, tp2, "TP2: " + str.tostring(tp2), style=label.style_label_up, color=color.green, textcolor=color.white)
label.new(bar_index, tp3, "TP3: " + str.tostring(tp3), style=label.style_label_up, color=color.green, textcolor=color.white)
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.