RicardoSantos

[RS]Power Correlation Oscillator (GOLD) V0

EXPERIMENTAL:
Gold version.
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
//@version=2
study(title='[RS]Power Correlation Oscillator (GOLD) V0', shorttitle='PCO(GOLD)', overlay=false)

s00 = security('XAUUSD', period, close>close[1])
s01 = security('XAUEUR', period, close>close[1])
s02 = security('XAUGBP', period, close>close[1])
s03 = security('XAUAUD', period, close>close[1])
s04 = security('XAUNZD', period, close>close[1])
s05 = security('XAUJPY', period, close>close[1])
s06 = security('XAUCHF', period, close>close[1])
s07 = security('XAUINR', period, close>close[1])
s08 = security('XAUCAD', period, close>close[1])
s09 = security('XAUZAR', period, close>close[1])

power = s00 + s01 + s02 + s03 + s04 + s05 + s06 + s07 + s08 + s09
avg_power = sma(power, input(15))
smooth_power = ema(avg_power, input(10))

hline(0, color=gray)
hline(5, color=gray)
hline(10, color=gray)
plot(title='Power', series=power, style=columns, color=power>=5?lime:red, transp=85, histbase=5)
plot(title='Average', series=avg_power, color=gray)
plot(title='Smooth', series=smooth_power, color=black)