0

我的条件是确定 3 个较低的低点。

一旦满足这个条件。我想在以下条件下绘制接下来 3 天的线。

Cond1:低低 -(低低 * 2%) Cond2:低低 -(低低 * 3%)

4

1 回答 1

0

这应该让您知道最后 x 根柱线是否正在形成较低的低点。

lowerLowCount = 3;

// Identify if current bar is a lower low.
isLowerLowCurrent = low < Ref(low, -1);

// Use sum to check last x bars are all lower lows.
isLowerLowCount = Sum(isLowerLowCurrent, lowerLowCount) == lowerLowCount;

布尔 True 和 False 值也可以用作 1 和 0,这就是为什么我可以在布尔数组 isLowerLowCurrent 上使用 Sum()。

于 2020-08-01T16:09:42.043 回答