如何使用高于某一级别的多个蜡烛对句点进行编码



我正试图找出如何在特定区域捕捉反弹。看看当价格在某个区域上方一段时间(但这段时间将基于蜡烛的数量而不是时间(时,我将如何编码,然后落入该区域。

有人知道怎么做吗?

我们将不胜感激。谢谢

我试着去酒吧看看,但我真的迷路了。

您需要一个var来计算条形图的数量,并需要一些bool标志来查看您与区域的关系。

var cnt = 0
bingo = false
is_above_zone = close > zone_top
is_fall_into_zone = ta.crossunder(close, zone_top)
if ((cnt > your_limit) and is_fall_into_zone)
bingo := true
cnt := is_above_zone ? cnt + 1 : 0  // Increment the counter if you are above the zone. Set it to 0 otherwise

最新更新