如何让这个脚本停止在 Renko 图表中重绘

问题描述 投票:0回答:0

有没有办法制作非重绘 HTF Renko 图表?每当实时图表绘制时,在 Renko 图表中重新加载相同的图表后就会有所不同。

此脚本不会在普通烛台中重新绘制,但会在 RENKO 烛台中重新绘制。


//@version=5
indicator(title='HTF Renko', overlay=true)

//HTF CANDLES 
ht = input('60', 'Timeframe')
f_secureSecurity(_symbol, _res, _src) => 
     request.security(_symbol, _res, _src[1], lookahead = barmerge.lookahead_on) 

Htfclose = f_secureSecurity(syminfo.tickerid, ht, close)
plot(Htfclose, color=color.green, title='HTF Close')

//Signals
buy = close > Htfclose and barstate.isconfirmed
sell =  close < Htfclose and barstate.isconfirmed

//Plots
plotshape(buy, style=shape.labelup, location=location.belowbar, size=size.tiny)
plotshape(sell, style=shape.labeldown, location=location.abovebar, size=size.tiny)

如何使这个脚本在 Renko Charts 中成为非重绘脚本?

pine-script algorithmic-trading tradingview-api
© www.soinside.com 2019 - 2024. All rights reserved.