GPTUSDT 1MIN v2
GPTUSDT 1MIN v2
////////////
// Inputs //
// Styling inputs
prec = input(1, title='Return Precision', group =
"Weekly Table")
from_date = input.time(timestamp("01 Jan 2000 00:00 +0000"), "From Date", group =
"Weekly Table")
i_endTime = input.time(defval=timestamp('01 Jan 2099 00:00 +0000'), title='End
Time', group='Weekly Table')
prof_color = input.color(color.green, title = "Gradient Colors", group = "Weeky
Table", inline = "colors")
loss_color = input.color(color.red, title = "", group = "Weeky
Table", inline = "colors")
// Benchmark inputs
use_cur = input.bool(true, title = "Use current Symbol for Benchmark",
group = "Benchmark")
symb_bench = input.symbol('BTCUSDT', title = "Benchmark",
group = "Benchmark")
disp_bench = input.bool(false, title = "Display Benchmark?",
group = "Benchmark")
disp_alpha = input.bool(false, title = "Display Alpha?",
group = "Benchmark")
hprice = 0.0
hprice := not na(swh) ? swh : hprice[1]
lprice = 0.0
lprice := not na(swl) ? swl : lprice[1]
le = false
le := not na(swh) ? true : le[1] and close > hprice ? false : le[1]
se = false
se := not na(swl) ? true : se[1] and close < lprice ? false : se[1]
// Using the input stop/ limit percent, we can convert to ticks and use the ticks
to level functions.
// This can be used to calculate the take profit and stop levels.
//ALERTS {
i_alert_txt_entry_long = input.text_area(defval = "", title = "Long Entry Message",
group = "Alerts")
i_alert_txt_entry_short = input.text_area(defval = "", title = "Short Entry
Message", group = "Alerts")
i_alert_txt_exit_long = input.text_area(defval = "", title = "Long Exit Message",
group = "Alerts")
i_alert_txt_exit_short = input.text_area(defval = "", title = "Short Exit Message",
group = "Alerts")
if long
css.exitPercent("exit long", percentStop, percentTP, alertMessage =
i_alert_txt_exit_long)
if short
css.exitPercent("exit short", percentStop, percentTP, alertMessage =
i_alert_txt_exit_short)