Сделайте запрос на закрытие Kumo_Top, Kumo_Bottom и символа (при необходимости), используя разные ценные бумаги:
//@version=3
strategy("我的策略", shorttitle = "long stragegy", overlay = true)
Kumo_offset = input(26, title = "位移周期")
CK_offset = input(26, title = "延迟线位移周期")
Kumo_offset := Kumo_offset - 1
CK_offset := CK_offset + 1
Kumo_Top = open - close / 2 // as an example
Kumo_Bottom = high - low * 4 // as an example
// top = close > Kumo_Top[Kumo_offset]
four_h_l = security(tickerid, '240', Kumo_Top)
four_h_s= security(tickerid, '240', Kumo_Bottom)
four_h_l_close = security(tickerid, '240', close) //if you need different close
plot(four_h_l_close[Kumo_offset] > four_h_l[Kumo_offset] ? 1 : 0, color=red)
plot(four_h_l_close[Kumo_offset] < four_h_s[Kumo_offset] ? 1 : 0, color=green)