PROTECTED SOURCE SCRIPT
突破鬧鐘

//version=5
indicator("突破鬧鐘", overlay=true)
prevHigh = high[1]
prevLow = low[1]
var label activeLabel = na
var int activeDirection = 0
isBreakHigh = high >= prevHigh
isBreakLow = low <= prevLow
if activeDirection == 1 and low < prevHigh
label.delete(activeLabel)
activeLabel := na
activeDirection := 0
if activeDirection == -1 and high > prevLow
label.delete(activeLabel)
activeLabel := na
activeDirection := 0
if isBreakHigh and activeDirection != 1
if not na(activeLabel)
label.delete(activeLabel)
activeLabel := label.new(bar_index, low, text="突破前高: " + str.tostring(prevHigh), style=label.style_label_up, color=color.green, textcolor=color.white, yloc=yloc.belowbar)
activeDirection := 1
if isBreakLow and activeDirection != -1
if not na(activeLabel)
label.delete(activeLabel)
activeLabel := label.new(bar_index, high, text="跌破前低: " + str.tostring(prevLow), style=label.style_label_down, color=color.red, textcolor=color.white, yloc=yloc.abovebar)
activeDirection := -1
indicator("突破鬧鐘", overlay=true)
prevHigh = high[1]
prevLow = low[1]
var label activeLabel = na
var int activeDirection = 0
isBreakHigh = high >= prevHigh
isBreakLow = low <= prevLow
if activeDirection == 1 and low < prevHigh
label.delete(activeLabel)
activeLabel := na
activeDirection := 0
if activeDirection == -1 and high > prevLow
label.delete(activeLabel)
activeLabel := na
activeDirection := 0
if isBreakHigh and activeDirection != 1
if not na(activeLabel)
label.delete(activeLabel)
activeLabel := label.new(bar_index, low, text="突破前高: " + str.tostring(prevHigh), style=label.style_label_up, color=color.green, textcolor=color.white, yloc=yloc.belowbar)
activeDirection := 1
if isBreakLow and activeDirection != -1
if not na(activeLabel)
label.delete(activeLabel)
activeLabel := label.new(bar_index, high, text="跌破前低: " + str.tostring(prevLow), style=label.style_label_down, color=color.red, textcolor=color.white, yloc=yloc.abovebar)
activeDirection := -1
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 이를 자유롭게 제한 없이 사용할 수 있습니다 – 자세한 내용은 여기에서 확인하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 이를 자유롭게 제한 없이 사용할 수 있습니다 – 자세한 내용은 여기에서 확인하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.