admin管理员组文章数量:1400201
in this code I am trying to put two scaled financial numbers on the chart after scaling them:
- Free Cash Flow
- Net Income
But they look similar after scaling them, I tried many ways to scale them but I get the same issue.
Can anyone tell me how to solve this issue?
Here is the code I wrote
//@version=6
indicator("Stocks In an Index", "Stocks Analysis", overlay=false)
//Free Cash Flow
FreeCashFlow = request.financial(syminfo.tickerid, "FREE_CASH_FLOW", "FY")
var float FreeCashFlowMin = na
var float FreeCashFlowMax = na
if not na(FreeCashFlow)
FreeCashFlowMin := na(FreeCashFlowMin) ? FreeCashFlow : (FreeCashFlow < FreeCashFlowMin ? FreeCashFlow : FreeCashFlowMin)
FreeCashFlowMax := na(FreeCashFlowMax) ? FreeCashFlow : (FreeCashFlow > FreeCashFlowMax ? FreeCashFlow : FreeCashFlowMax)
normalizedFreeCashFlow = not na(FreeCashFlow) and (FreeCashFlowMax != FreeCashFlowMin) ? (FreeCashFlow - FreeCashFlowMin) / (FreeCashFlowMax - FreeCashFlowMin) : na
plot(normalizedFreeCashFlow, color=color.purple, title="Normalized FREE_CASH_FLOW")
//Net Income
netIncome = request.financial(syminfo.tickerid, "NET_INCOME", "FY")
var float netIncomeMin = na
var float netIncomeMax = na
if not na(FreeCashFlow)
netIncomeMin := na(netIncomeMin) ? netIncome : (netIncome < netIncomeMin ? netIncome : netIncomeMin)
netIncomeMax := na(netIncomeMax) ? netIncome : (netIncome > netIncomeMax ? netIncome : netIncomeMax)
normalizednetIncome = not na(netIncome) and (netIncomeMax != netIncomeMin) ? (netIncome - netIncomeMin) / (netIncomeMax - netIncomeMin) : na
plot(normalizednetIncome, color=color.green, title="Normalized Net Income")
本文标签: pine script v6Problem With Scaling Indicators Using PineScript in TradingViewStack Overflow
版权声明:本文标题:pine script v6 - Problem With Scaling Indicators Using PineScript in TradingView - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744134764a2592346.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论