简体   繁体   English

Pinescript:一个 plot 如何在一个脚本中使用两个不同的符号,而它们之间的距离又不会太远?

[英]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.

相关问题 Pine Script Tradingview:当plot离价格太远时,如何防止图表被压缩? - Pine Script Tradingview: How to prevent the chart from being compressed when the plot is too far from the price? 如何使用 PineScript (Tradingview) 中的 ta.correlation 函数来显示两个不同品种的相关性? - How can I use the ta.correlation function in PineScript (Tradingview) to show the correlation of two different symbols? PineScript:一个接一个地满足两个条件时的Plotshape - PineScript: Plotshape when two conditions are met one after the other 如何从过去的整个时间段中获得高点,其中一个 ema 跨越另一个? 脚本 - How to get the high from a whole timeperiod in the past where one ema crossed above the other? Pinescript 如何绘制不同时间段的EMA? 脚本 - How to plot ema from different time period? Pinescript 如何在不违反语法的情况下继续在 PineScript 中更深入地编写一行代码? - How to continue coding one line deeper in PineScript without violating the syntax? 如何将此脚本从 pinescript 版本 2 转移到 5 - How can I transfer this script from pinescript Version 2 to 5 PineScript,两个指标函数,但只有一个安全调用 - PineScript, two indicator function but only one security call 我如何将这两个脚本代码合并到一个指标中? - How can i combine these two script codes into one indicator? 我如何 plot 在 pinescript 中重复价格水平? - How can I plot repeating price levels in pinescript?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM