TAtrader

Highs & Lows by TaTrader

Hello,

This is my script for H&Ls. I am still working on it.

EDIT: be careful when using it!
It does NOT compare previous H&L levels with those in the making. It can only be used if you hold your positions a long time.
Skrip open-source

Dalam semangat TradingView, penulis dari skrip ini telah mempublikasikannya ke sumber-terbuka, maka trader dapat mengerti dan memverifikasinya. Semangat untuk penulis! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.

Inggin menggunakan skrip ini pada chart?
study("Highs & Lows by TaTrader", overlay = true)
time = input(title = "Timeframe (minutes)", defval = 240)

// Calculate Highs & Lows
low_m = lowest(low, 30*240/time)
high_m = highest(high, 30*240/time)
low_w = lowest(low, 15*240/time)
high_w = highest(high, 15*240/time)

// Set up Highs & Lows
bottom_m = valuewhen(low <= low_m[1], low, 0)
top_m = valuewhen(high >= high_m[1], high, 0)
bottom_w = valuewhen(low <= low_w[1], low, 0)
top_w = valuewhen(high >= high_w[1], high, 0)

// Draw Highs & Lows
// Important S&R Levels --> extend lines (hline)
plot(bottom_m, color=bottom_m != bottom_m[1] ? na : black, style = cross, linewidth = 2, join = true)
plot(top_m, color=top_m != top_m[1] ? na : black, style = cross, linewidth = 2, join = true)
plot(bottom_w, color=bottom_w != bottom_w[1] ? na : black, style = line, linewidth = 2, join = true)
plot(top_w, color=top_w != top_w[1] ? na : black, style = line, linewidth = 2, join = true)

// Breakthrough signals
plot(bottom_m, color=(close < bottom_m[1]) ? red : na, style = line, linewidth = 2)
plot(top_m, color=(close > top_m[1]) ? green : na, style = line, linewidth = 2)
plot(bottom_w, color=(close < bottom_w[1]) ? red : na, style = line, linewidth = 2)
plot(top_w, color=(close > top_w[1]) ? green : na, style = line, linewidth = 2)

plot(top_m, color=(close > top_m[1]) ? green : na, style = line, linewidth = 2)
plot(bottom_m, color=(close < bottom_m[1]) ? red : na, style = line, linewidth = 2)
plot(top_w, color=(close > top_w[1]) ? green : na, style = line, linewidth = 2)
plot(bottom_w, color=(close < bottom_w[1]) ? red  : na, style = line, linewidth = 2)

// PVT!!!
//plot((high_w - low_w) / (high_m[1] - low_m[1]) * rsi(hlc3, 14), color = black, join = true)