在Pine脚本中,"plotshape"函数用于在图表上绘制形状指示器,以便在特定条件下显示图形。要更改"plotshape"的位置,可以使用该函数的参数来指定所需的位置。 "plotshape"函数的语法如下: 代码语言:txt 复制 plotshape(series, title, location, color, style, text, textcolor, size, transp, offset) ...
Higher Closer & Lower Closehc = close > high[1] //如果当前蜡烛图收盘价大于前一根蜡烛图的收盘价,则为True lc = close < clos[1] plotshape(hc,styel=shape.triangleup, location=location.belowba…
要突出显示接近移动平均值的candle,可以使用plotshape()函数来在图表上绘制形状。plotshape()函数接受多个参数,包括形状类型、位置、颜色等。 在pine脚本中,可以使用条件语句来判断当前价格是否接近移动平均值。例如,可以计算当前价格与移动平均值之间的差异,并设置一个阈值来确定是否接近。
我尝试使用 if 条件,但在条件下不允许使用 Plotshape。 plotshape(buy, title='BUY ', text='▲', style=shape.labelup, location=location.belowbar, color=color.new(#000c76, 0), textcolor=color.new(#ffffff, 0), size=size.tiny) plotshape(sell, title='SELL', text='▼', style=shape....
dojiBull = doji and swingLow //处于过去10根蜡烛图最低点的十字星,预示着底部反弹 dojiBear = doji and swingHigh // 绘图 plotshape(dojiBull, style=shape.triangleup, location=location.belowbar, color=color.green) plotshape(dojiBear, style=shape.triangledown, location=location.abovebar, color=...
您唯一的选择是 plotshape()。 第一个脚本执行可用符合“简单”的价值,并且在后续执行中它们保持一致。 ...此外,许多内置功能都需要“简单”的参数,这些论点不会随着时间而变化。 pine-script 1个回答 0投票 simple 。您可以具有带有圆形表情符号的无形标签。我认为,看起来更好。
//@version=5indicator("My Script",overlay=true)src=close a=ta.sma(src,5)b=ta.sma(src,50)c=ta.cross(a,b)plot(a,color=color.blue)plot(b,color=color.black)plotshape(c,color=color.red) 或者是这样写的: //@version=5strategy("My Strategy",overlay=true)longCondition=ta.crossover(ta....
There is a plotchar() function that allows you to plot ASCII characters on your chart. This is often used to plot a note either on top or on the bottom of the price bar. Another common plotting function is plotshape() which allows you to plot various shapes. This one is quite popular...
You may also need to play around withbgcolor()or withplotshape()in order to see the signals better – but that’s all there is to it! If you have any questions or suggestions about what you’d like me to cover next, feel free to leave them below. See you next time!
A simple indicator to plot 5 different types of moving averages (SMA, EMA, WMA, HMA, RMA) and VWAP in different colors. Setup Open "Pine Editor" Open the dropdown called "Open" Click "New indicator" Paste the script in and press "Add to chart" ...