7 registered members (clonman, TipmyPip, Niels, dBc, Ed_Love, 3run, 1 invisible),
18,869
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Scaling Currencies Relative To Each Other On Chart
#434414
12/18/13 03:09
12/18/13 03:09
|
Joined: Sep 2012
Posts: 99
TankWolf
OP
Junior Member
|
OP
Junior Member
Joined: Sep 2012
Posts: 99
|
Hi All, Was wondering if anyone knows how to scale 2 currencies together on the one chart so they overlay. I can plot both currencies on the same chart but I cant seem to work out a way to calculate a scaling ratio to compare 2 currencies to exploit possible arbitrage scenarios that may arise. Any suggestions would be helpful. function run() { BarPeriod = 60; StartDate = 2008; EndDate = 2013; LookBack = 200; ColorUp = 0; ColorDn = 0; set(PLOTNOW);
asset("GBP/USD"); vars PoundPrice = series(price());
asset("EUR/USD"); vars EuroPrice = series(price());
vars Correlation100 = series(Correlation(PoundPrice,EuroPrice,100));
plot("PoundPrice",PoundPrice[0],0,RED); plot("EuroPrice",EuroPrice[0],0,BLUE); plot("Correlation100",Correlation100[0],NEW,BLACK); }
|
|
|
|