我有两个pine脚本(tradingview)。我如何才能将脚本转换为Pandas python,以及如何计算人‘pds’。我不需要情节

2023-01-27 11:23:23 浏览数 (1)

//@version=3

study("SSL channel", overlay=true)

period=input(title="Period", defval=10)

len=input(title="Period", defval=10)

smaHigh=sma(high, len)

smaLow=sma(low, len)

Hlv = na

Hlv := close > smaHigh ? 1 : close < smaLow ? -1 : Hlv[1]

sslDown = Hlv < 0 ? smaHigh: smaLow

sslUp = Hlv < 0 ? smaLow : smaHigh

plot(sslDown, linewidth=2, color=red)

plot(sslUp, linewidth=2, color=lime)

0 人点赞