Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/308.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Pine script Pine脚本中screener的自定义函数_Pine Script - Fatal编程技术网

Pine script Pine脚本中screener的自定义函数

Pine script Pine脚本中screener的自定义函数,pine-script,Pine Script,我正在尝试将现有的开源screener转换为我自己的脚本 我的脚本中有这行代码,我想为它编写一个函数,可以扫描市场寻找可能的机会 color = show_a ? d_tc > d_bc and d_poi < p_poi ? color.white : d_tc < d_bc and d_poi > p_poi ? color.white : d_poi > d_bc ? color.green : d_poi < d_bc ? color.red : co

我正在尝试将现有的开源screener转换为我自己的脚本

我的脚本中有这行代码,我想为它编写一个函数,可以扫描市场寻找可能的机会

color =
show_a ?
d_tc > d_bc and d_poi < p_poi ? color.white :
d_tc < d_bc and d_poi > p_poi ? color.white :
d_poi > d_bc ? color.green :
d_poi < d_bc ? color.red :
color.silver :
na

plot(d_poi, color = c_colo, title = "points")

golong=c_colo ==color.green
goshort=c_colo==color.red
alertcondition(golong, "Buy", " Buy Signal at {{exchange}}:{{ticker}}, Price = {{close}} at 
{{timenow}}")
alertcondition(goshort, "Sell", " Sell Signal at {{exchange}}:{{ticker}}, Price = {{close}} at 
{{timenow}}")
颜色=
秀给你看?
d_tc>d_bc和d_poip_poi?颜色。白色:
d_poi>d_bc?颜色。绿色:
d_poi
现在,我使用的自定义筛选程序来自Quant Nomad的链接

我希望当条件满足时,扫描仪将显示所有机会

color =
show_a ?
d_tc > d_bc and d_poi < p_poi ? color.white :
d_tc < d_bc and d_poi > p_poi ? color.white :
d_poi > d_bc ? color.green :
d_poi < d_bc ? color.red :
color.silver :
na

plot(d_poi, color = c_colo, title = "points")

golong=c_colo ==color.green
goshort=c_colo==color.red
alertcondition(golong, "Buy", " Buy Signal at {{exchange}}:{{ticker}}, Price = {{close}} at 
{{timenow}}")
alertcondition(goshort, "Sell", " Sell Signal at {{exchange}}:{{ticker}}, Price = {{close}} at 
{{timenow}}")
请帮忙