gpt4 book ai didi

plot - 编译plotshape函数TradingView Pine脚本时出错

转载 作者:行者123 更新时间:2023-12-03 07:39:03 24 4
gpt4 key购买 nike

将脚本保存在plotshape函数中时出现以下错误消息,但无法找出解决方法:

Script could not be translated from:,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

最佳答案

这个plotshape函数看起来有点像 buggy 。只是想出了一种使其工作的方法:

// 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 Short

关于plot - 编译plotshape函数TradingView Pine脚本时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65508490/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com