NSE:LICI   LIFE INSURA CORP OF INDIA

study(title="BestIntradayTips", shorttitle="BIT", precision=0, overlay=true, scale=scale.left)
trendDetectionLength=input(2)
showDistributionBelowZero=input(false, type=bool)
mov = close>close ? 1 : close<close ? -1 : 0
trend= (mov != 0) and (mov != mov) ? mov : nz(trend)
isTrending = rising(close, trendDetectionLength) or falling(close, trendDetectionLength) //abs(close-close) >= dif
wave=(trend != nz(wave)) and isTrending ? trend : nz(wave)
vol=wave==wave ? (nz(vol)+volume) : volume
up=wave == 1 ? vol : 0
dn=showDistributionBelowZero ? (wave == 1 ? 0 : wave == -1 ? -vol : vol) : (wave == 1 ? 0 : vol)
input_src         = wave == 1 ? vol : 0
input_ma_period   = input(50, title="Moving average")
input_max_height  = input(1000, title="Maximum value on left bar")


ma                = sma(input_src, input_ma_period)
normalized_volume = min(input_src / ma * 100, input_max_height * 1)

plot(input_max_height, transp=100, title="")

//
input_src1         = showDistributionBelowZero ? (wave == 1 ? 0 : wave == -1 ? -vol : vol) : (wave == 1 ? 0 : vol)
input_ma_period1  = input(50, title="Moving average")
input_max_height1  = input(1000, title="Maximum value on left bar")
hline(0)
hline(250)
hline(500)
hline(750)
ma1                = sma(input_src1, input_ma_period1)
normalized_volume1 = min(input_src1 / ma1 * 100, input_max_height1 * 1)
resCustom = input(title="Timeframe", type=resolution, defval="1440" )
v=security(tickerid, resCustom,normalized_volume)
resCustom1 = input(title="Timeframe", type=resolution, defval="1440" )
v1=security(tickerid, resCustom,normalized_volume1)



a=v>0 and v1<50
b=v1>0 and v<50

bgcolor(a > 0 ? blue : na, transp=80)
bgcolor(b > 0 ? red : na, transp=80)

ไอเดียที่เกี่ยวข้อง

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

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