全部 智大领峰 TBQuant功能 TBL语言 TB开户 问答专区 高手圈 其他
已解决
求N周期最高点折线
2023-05-19 10:26

求某合约N周期的最高点、最低点的连续折线,要求:如果极值点没有变化,则序列变量(序列变量必须连续的吗?)不赋值,有变化时需要赋值,如何实现,求各位大神不吝赐教,拜谢!

If (Highest(High[1], periodSingle) <>Highest(High[2], periodSingle))

{

highestCrest = Highest(High[1], periodSingle);

PlotAuto(\"highestCrest: \", highestCrest, 0, Red);

}

If (Lowest(Low[1], periodSingle), RN) <> Round(Lowest(Low[2], periodSingle))

{

lowestTrough = Lowest(Low[1], periodSingle);

PlotAuto(\"lowestTrough: \", lowestTrough, 0, Cyan);

}

Commentary(\"highestCrest: \" + Text(highestCrest));

Commentary(\"highestCrest[1]: \" + Text(highestCrest[1]));

Commentary(\"highestCrest[2]: \" + Text(highestCrest[2]));

Commentary(\"lowestTrough: \" + Text(lowestTrough));

Commentary(\"lowestTrough[1]: \" + Text(lowestTrough[1]));

Commentary(\"lowestTrough[2]: \" + Text(lowestTrough[2]));

结果仍然有相等的数值,即highestCrest = highestCrest[1] = highestCrest[2],为什么呢?

kyover

听不懂什么意思 极值点怎么还有变化 历史的极值点难道不是固定住的么

2023-05-19 10:37
shlgdqhtb

是一定周期内的极值点,如5周期15分钟的最高和最低点,由这些极值点分别连成的折线。

2023-05-19 10:39
shlgdqhtb

data-href=

2023-05-19 10:40
shlgdqhtb

data-href=

2023-05-19 10:41
您未登录,请先 登录注册 后发表评论
顶部