我基本上是想把它移植过来,但不知道怎么做。一方面,它没有选择 Thinkscript 使用的最高/最低参考
如果有人可以提供帮助,那就太好了,谢谢
declare lower;
input perioda = 51;
input periodb = 47;
input RoundingValue = 4;
def llow = Lowest(low, perioda); def c_ln = close - llow;
def hhigh = Highest(high, perioda);
def hn_ln = hhigh - llow;
def numerator = Sum(c_ln, periodb);
def denominator = Sum(hn_ln, perioda);
plot MarketSentiment = round(100* (numerator/denominator), RoundingValue);
marketsentiment.setDefaultColor(color.yellow);
这是我所拥有的,但显然没有用
study("My Script")
study("idkbro")
perioda = 51, periodb= 47, RoundingValue = 4
llow = Lowest(low, perioda)
hhigh = Highest(high, perioda)
c_ln = close - llow
hn_ln = hhigh - llow
numerator = Sum(c_ln, periodb)
denominator = Sum(hn_ln, perioda)
plot(MarketSentiment, round(100* (numerator/denominator), RoundingValue))
plot(close)