在交易视图中将变量绘制为文本

时间:2020-12-27 06:57:07

标签: pine-script

我在 pinescript 中有一个代码,它给出了数字作为变量。我想绘制与上面相同的蜡烛图。 代码正确给出数字

bias = 0.0
bias := high > high[1] and low > low[1] ? high : high < high[1] and low < low [1] ? low : nz(bias[1])
    
b = 0.0
b := bias > bias[1] and bias[1] < bias[2] ? 1 : bias < bias[1] and bias[1] > bias[2] ? - 1  : bias > bias[1] ? (nz(b[1]) + 1) : bias < bias[1] ? (nz(b[1]) - 1) : bias == bias[1]? nz(b[1]): nz(b[1])

我尝试了 plotshape,但出现以下错误:

<块引用>

第 18 行:无法使用参数调用“plotshape”(series[bool]、location=const string、text=series[string]、textcolor=const color);可用重载: plotshape(series[bool], const string, input string, input string, series[color], input integer, series[integer], const string, series[color], const bool, const string, input integer, const整数,字符串)=> 无效; plotshape(, const string, input string, input string, , input integer, series[integer], const string, , const bool, const string, input integer, const integer, string) =>无效

0 个答案:

没有答案