Advertisement
Guest User

Untitled

a guest
Jun 20th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. //@version=3
  2. study("MegaCorrelationX")
  3.  
  4. tmme= "120"
  5.  
  6. a=security("XAUUSD", tmme, close)
  7. b=security("BITSTAMP:BTCUSD", tmme, close)
  8. c=security("CNHUSD*DXY", tmme, close)
  9. d=security("DXY", tmme, close)
  10. w=security("SPX", tmme, close)
  11.  
  12.  
  13. Cab=correlation(a, b, 20)
  14. Cac=correlation(a, c, 20)
  15. Cad=correlation(a, d, 20)
  16. Caw=correlation(a, w, 20)
  17. Cbc=correlation(b, c, 20)
  18. Cbd=correlation(b, d, 20)
  19. Cbw=correlation(b, w, 20)
  20. Ccd=correlation(c, d, 20)
  21. Ccw=correlation(c, w, 20)
  22. Cdw=correlation(d, w, 20)
  23.  
  24. plot(Cab, title='Gold:BTC', color=#f9cb9c, linewidth=3)
  25. plot(Cac, title='Gold:Yuan', color=#6aa84f, linewidth=3)
  26. plot(Cad, title='Gold:Dollar', color=#c27ba0, linewidth=3)
  27. plot(Caw, title='Gold:SPX', color=#e06666, linewidth=3)
  28. plot(Cbc, title='BTC:Yuan', color=#6fa8dc, linewidth=3)
  29. plot(Cbd, title='BTC:Dollar', color=#bf9000, linewidth=3)
  30. plot(Cbw, title='BTC:SPX', color=#cc4125, linewidth=3)
  31. plot(Ccd, title='Yuan:Dollar', color=#45818e, linewidth=3)
  32. plot(Ccw, title='Yuan:SPX', color=#ff9800, linewidth=3)
  33. plot(Cdw, title='Dollar:SPX', color=blue, linewidth=3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement