使用security时如何避免重画

问题描述

enter image description here我尝试在tradingview上使用PineCoders f_secureSecurity代码,以避免在使用security()时重新绘制,对于以下代码,但是仍然在重新绘制,请您能帮我了解什么是错的吗?

//@version=4
strategy(title="archiesma",overlay=true,default_qty_type=strategy.percent_of_equity,default_qty_value=100)

timeFrame = input(title="Other time frame",type=input.resolution,defval="")
f_secureSecurity(_symbol,_res,_src) => security(_symbol,_src[1],lookahead = barmerge.lookahead_on)

L = close > open
S = close < open

LongW = f_secureSecurity(heikinashi(syminfo.tickerid),timeFrame,L)
ShortW = f_secureSecurity(heikinashi(syminfo.tickerid),S)


strategy.entry("Long",strategy.long,when = LongW)
strategy.entry("Short",strategy.short,when = ShortW)

strategy.close("Long",when = ShortW)
strategy.close("Short",when = LongW)

解决方法

https://www.google.com/amp/s/fr.tradingview.com/script/cyPWY96u-How-to-avoid-repainting-when-using-security-PineCoders-FAQ/%3famp

首先:在Google上搜索

第二:询问

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...