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
保護スクリプト
このスクリプトのソースコードは非公開で投稿されています。 ただし、制限なく自由に使用できます – 詳細はこちらでご確認ください。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
保護スクリプト
このスクリプトのソースコードは非公開で投稿されています。 ただし、制限なく自由に使用できます – 詳細はこちらでご確認ください。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。