分享一下9转序列(TD9)的tradingview code

这个TD9 indicator好像因为版权问题在tradingview下架了。搜了一下没搜到现成代码,于是自己diy了一个。有需要的自取。 :)

//@version=5
indicator("MyTd", overlay = true)
var cup = 0
var cdown = 0
if close > close[4]
    cup := cup + 1
    cdown := 0
else
    cdown := cdown + 1
    cup := 0
if cup > 0
    label.new(bar_index, high, text = str.tostring(cup), yloc = yloc.abovebar, style = label.style_none, textcolor = color.green)
if cdown > 0
    label.new(bar_index, high, text = str.tostring(cdown), yloc = yloc.belowbar, style = label.style_none, textcolor = color.red)

 

图形效果是这样子的。 (btw, qq已经到down trend 12了,快苦尽甘来了 :)。 根据对称性,上次up trend是12转的,当然上上次是18)。

所有跟帖: 

haha, I asked ChatGPT to write this for me :) taking 5 seconds -三心三意- 给 三心三意 发送悄悄话 (0 bytes) () 07/28/2024 postreply 15:55:00

哈哈,就是看了你今天帖子里的TD指标,才去搜的 :) -opst- 给 opst 发送悄悄话 (83 bytes) () 07/28/2024 postreply 16:01:51

you can ask chatGpT to write 50% of the technical indicator -三心三意- 给 三心三意 发送悄悄话 (0 bytes) () 07/28/2024 postreply 16:09:00

The official name of this is Tom Demark sequential indicator -三心三意- 给 三心三意 发送悄悄话 (0 bytes) () 07/28/2024 postreply 15:57:00

还有18? -Trader RM- 给 Trader RM 发送悄悄话 (0 bytes) () 07/28/2024 postreply 16:02:35

嗯,5月29号 -opst- 给 opst 发送悄悄话 (0 bytes) () 07/28/2024 postreply 16:03:41

Trading View Indicator: “Sequencer” by LuxAlgo -AroundThePost- 给 AroundThePost 发送悄悄话 (0 bytes) () 07/28/2024 postreply 19:15:46

请您先登陆,再发跟帖!