soru

soru range

32
As usual - play with the settings.

Cheers
สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?
study(title="soru range", shorttitle="soru range", overlay=true) 

y=ismonthly?'M':isweekly?'W':isdaily?'D':''
m = input(55)
TW1 = tostring(interval*m)+y

base_lvl1 = (hlc3) *2
baselow1 = base_lvl1 - high
basehigh1 = base_lvl1 - low
base_lvl2 = (ohlc4) *2
baselow2 = base_lvl2 - high
basehigh2 = base_lvl2 - low

//TW1 
TW1_base_lvl1 = security(tickerid, TW1, base_lvl1[1]) 
TW1_baselow1 = security(tickerid, TW1, baselow1[1]) 
TW1_basehigh1 = security(tickerid, TW1, basehigh1[1]) 
TW1_base_lvl2 = security(tickerid, TW1, base_lvl2[1]) 
TW1_baselow2 = security(tickerid, TW1, baselow2[1]) 
TW1_basehigh2 = security(tickerid, TW1, basehigh2[1]) 

TW1_color_low1 = close < TW1_baselow1 ? red : black
TW1_color_high1 = close > TW1_basehigh1 ? #008000 : black
TW1_color_low2 = close < TW1_baselow2 ? red : black
TW1_color_high2 = close > TW1_basehigh2 ? #008000 : black

l1 = plot(TW1_baselow1 ? TW1_baselow1 : na, title="Projected Low1 TW1",style=circles, color=TW1_color_low1 ,linewidth=1, transp=100) 
h1 = plot(TW1_basehigh1 ? TW1_basehigh1 : na, title="Projected High1 TW1",style=circles, color=TW1_color_high1 ,linewidth=1, transp=100) 
l14 = plot(TW1_baselow2 ? TW1_baselow2 : na, title="Projected Low2 TW1",style=circles, color=TW1_color_low2 ,linewidth=1, transp=100) 
h14 = plot(TW1_basehigh2 ? TW1_basehigh2 : na, title="Projected High2 TW1",style=circles, color=TW1_color_high2 ,linewidth=1, transp=100)
fillcol1=black
fill(l1,l14,color=fillcol1, transp=60)
fill(h1,h14,color=fillcol1, transp=60)

l = TW1_baselow1 < TW1_baselow2 ? TW1_baselow1 : TW1_baselow2
h = TW1_basehigh1 > TW1_basehigh2 ? TW1_basehigh1 : TW1_basehigh2


m1 = plot((TW1_baselow1+TW1_basehigh1)/2, title="Projected Low1 TW1",style=circles, color=TW1_color_low1 ,linewidth=1, transp=100) 
m2 = plot((TW1_baselow2+TW1_basehigh2)/2, title="Projected Low1 TW1",style=circles, color=TW1_color_low1 ,linewidth=1, transp=100) 

fill(m1,m2,color=gray)