105 0 5
EXPERIMENTAL: a experience with currency relative strength .
Remove from Favorite Scripts Add to Favorite Scripts
study(title="0001", shorttitle="0001", overlay=false)

pos_change = close >= open ? nz(pos_change[1]) + ((close/open)-1) : 0
neg_change = close <= open ? nz(neg_change[1]) + ((close/open)-1) : 0

//plot(pos_change, style=histogram, color=green, linewidth=3)
//plot(neg_change, style=histogram, color=maroon, linewidth=3)

t_change = cum(pos_change)+cum(neg_change)
dxy = security('DXY', period, t_change)
eurusd = security('EURUSD', period, t_change)
gbpusd = security('GBPUSD', period, t_change)
audusd = security('AUDUSD', period, t_change)
usdcad = security('USDCAD', period, t_change)
usdchf = security('USDCHF', period, t_change)
usdcnh = security('USDCNH', period, t_change)
usdjpy = security('USDJPY', period, t_change)

//plot(t_change, color=black)
plot(dxy, title='DXY', color=black)
plot(eurusd, title='EURUSD', color=gray)
plot(gbpusd, title='GBPUSD', color=silver)
plot(audusd, title='AUDUSD', color=maroon)
plot(usdcad, title='USDCAD', color=red)
plot(usdchf, title='USDCHF', color=purple)
plot(usdcnh, title='USDCNH', color=fuchsia)
plot(usdjpy, title='USDJPY', color=green)

hline(0)
Ideas Scripts Chart
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
日本