[英]Pinescript: How can one plot two different symbols in one script, without them being too far away from each other?
I would like to plot two different symbols from Pinescript on the Chart.我想 plot 图表上 Pinescript 的两个不同符号。 Let's take DXY and SPX as example.
我们以 DXY 和 SPX 为例。 The problem is, that both have very different values with DXY at 112 and SPX at 3800. That leads to the issue of them being plotted far away from each other, because Pine automatically only uses one Scale for both.
问题是,两者都有非常不同的值,DXY 为 112,SPX 为 3800。这导致它们的绘制距离彼此很远,因为 Pine 自动只为两者使用一个比例。
Is there a way to fix that?有没有办法解决这个问题?
Even if the two symbols are far from each other, you can always adjust the chart scaling manually.即使两个符号相距很远,您也可以随时手动调整图表缩放比例。 https://best-trading-indicator.com/pages/how-to-install-a-custom-indicator-on-tradingview#menu-scaling-issues
https://best-trading-indicator.com/pages/how-to-install-a-custom-indicator-on-tradingview#menu-scaling-issues
To answer your question more in-depth, I'm not aware of a way to scale via script two assets with such a difference in price with Pinescript only and with 1 script only.为了更深入地回答您的问题,我不知道有一种方法可以通过脚本扩展两种资产,仅使用 Pinescript 和仅使用 1 个脚本的价格差异如此之大。
The indicator() function may use the scale parameter: https://www.tradingview.com/pine-script-reference/v5/#fun_indicator指标() function 可以使用比例参数: https://www.tradingview.com/pine-script-reference/v5/#fun_indicator
Maybe, your solution would be to do what you want with 2 scripts instead of 1也许,您的解决方案是使用 2 个脚本而不是 1 个脚本来做您想做的事情
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.