在以plotshape函数保存脚本时,我会得到以下错误消息,无法确定修复程序:
脚本无法翻译自:,text="Buy",location.belowbar,color.green,transp=
脚本是Ubertrend:https://www.tradingview.com/script/J3op4W9q-UberTrend-v1-1/的修改版本
// Plot entries
plotshape(cross(close,Tsl) and close>Tsl ? True : na,title="SuperTrend Long", shape.triangleup,text="Buy",location.belowbar,color.green,transp=0) // Super Trend Long
plotshape(cross(Tsl,close) and close<Tsl ? True : na,title="SuperTrend Short", shape.triangledown,text="Sell",location.abovebar,color.red,transp=0) // Super Trend Short
plotshape(longToggle ? (k <= kMin and Trend == 1 ? Trend : na) : na, "Long Entry", shape.labelup,location.belowbar,navy,0,0, "", black) // Stochastic Long Entry
plotshape(longAltToggle ? (rising(k,1) and cross(k, 50) and Trend == 1 ? Trend : na) : na, "Long Alt Entry", shape.cross,location.belowbar,olive,0,0, "", black) // Stochastic Long Entry
plotshape(longExitToggle ? (k >= kMax and Trend == 1 ? Trend : na) : na, "Long Exit", shape.xcross,location.abovebar,red,0,0, "", black) // Stochastic Long Exit
plotshape(shortToggle ? (k >= kMax and Trend == -1 ? Trend : na) : na, "Short Entry", shape.labeldown , location.abovebar, navy,0,0, "", black) // Stochastic Short Entry
plotshape(shortAltToggle ? (falling(k,1) and cross(k, 50) and Trend == -1 ? Trend : na) : na, "Short Alt Entry", shape.cross , location.abovebar, olive,0,0, "", black) // Stochastic Short Entry
plotshape(shortExitToggle ? (k <= kMin and Trend == -1 ? Trend : na) : na, "Short Exit", shape.xcross , location.belowbar, red,0,0, "", black) // Stochastic Short Exit发布于 2020-12-30 19:34:11
这个图形函数看起来像个小马车。只是想出了一个办法让它发挥作用:
// Plot entries
buy_signal = (cross(close,Tsl) and close>Tsl) ? true : na
sell_signal = (cross(Tsl,close) and close<Tsl) ? true : na
plotshape(buy_signal ? true : na,title="SuperTrend Long",text="Buy",style=shape.triangleup,size=size.small,location=location.belowbar,color=#34eb46,transp=10) // Super Trend Long
plotshape(sell_signal ? true : na,title="SuperTrend Short",text="Sell",style=shape.triangledown,size=size.small,location=location.abovebar,color=#eb4334,transp=10)// Super Trend Shorthttps://stackoverflow.com/questions/65508490
复制相似问题