vdubus

VDUB_REJECTION_SPIKE_V4 UPDATED / Re vamped & de cluttered

*Updated

نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
//@version=2
study("VDUB_REJECTION_SPIKE_V4", overlay=true, shorttitle="VDUB_REJECTION_SPIKE_V4")
//====================channel 1==========================
len = input(55, minval=1, title="EMA LENGTH")
src = input(close, title="Source 1")
out = ema(src, len)
plot(out, title="EMA", color=blue, style=circles, linewidth=1)
last8h = highest(close, 13)
lastl8 = lowest(close, 13)

plot(last8h, color=black, linewidth=1, title="Upper channel 1")
plot(lastl8, color=black, linewidth=1, title="Lower channel 1")

bearish = cross(close,out) == 1 and close[1] > close 
bullish = cross(close,out) == 1 and close[1] < close 

//======================channel 2==================================
len0 = 34
src0 = input(close, title="Source 2")
out0 = sma(src0, len0)
last8h0 = highest(close, 34)
lastl80 = lowest(close, 34)
bearish0 = cross(close,out) == 1 and falling(close, 1)
bullish0 = cross(close,out) == 1 and rising(close, 1)
channel20=input(true, title="Bar Channel On/Off")
ul20=plot(channel20?last8h0:last8h0==nz(last8h0[1])?last8h0:na, color=black, linewidth=2, style=linebr, title="Upper channel 2", offset=0)
ll20=plot(channel20?lastl80:lastl80==nz(lastl80[1])?lastl80:na, color=black, linewidth=2, style=linebr, title="Upper channel 2", offset=0)

// Moddified [RS]Support and Resistance V0
RST = input(title='Support / Resistance length:', type=integer, defval=16)     //
RSTT = valuewhen(high >= highest(high, RST), high, 0)
RSTB = valuewhen(low <= lowest(low, RST), low, 0)
RT2 = plot(RSTT, color=RSTT != RSTT[1] ? na : red, linewidth=2, offset=+0)
RB2 = plot(RSTB, color=RSTB != RSTB[1] ? na : green, linewidth=2, offset=0)

// ZIGZAG -----------------------------------------------//
length = input(4, title="Zigzag Length")
hls = rma(hl2, length)
isRising = hls >= hls[1]

zigzag1 = isRising and not isRising[1] ? lowest(length) :  not isRising and isRising[1] ? highest(length) : na
plot(zigzag1, color=blue, style=line, linewidth=2)
////////////////////////////////////////////////////

التحليلات ذات الصلة