问题
I want to plot the quality of earnings which is not available in the trading view. However, what I got is not the staircase chart. How can I plot the staircase chart? I have tried the style option in plot function and gaps option in the financial function but no luck.
study("Quality of earnings")
CFO = financial(syminfo.tickerid, "CASH_F_OPERATING_ACTIVITIES", "FY")
net = financial(syminfo.tickerid, "NET_INCOME", "FY")
plot(CFO/net)
回答1:
This will plot a stepline, overlaid on the main chart and on the left scale.
//@version=4
study("Quality of earnings", overlay=true, scale=scale.left)
cfo = financial(syminfo.tickerid, "CASH_F_OPERATING_ACTIVITIES", "FY")
net = financial(syminfo.tickerid, "NET_INCOME", "FY")
qoe = cfo/net
plot(qoe, style=plot.style_stepline)
来源:https://stackoverflow.com/questions/65154643/tradingview-pine-script-plot-staircase-chart