{"id":5216,"date":"2021-03-09T09:10:44","date_gmt":"2021-03-09T09:10:44","guid":{"rendered":"https:\/\/joapen.com\/blog\/?p=5216"},"modified":"2021-03-09T09:21:12","modified_gmt":"2021-03-09T09:21:12","slug":"alternative-currency","status":"publish","type":"post","link":"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/","title":{"rendered":"Alternative currency"},"content":{"rendered":"<p>Some people have their investments in local currency banks and they are affected by eschange rate. The usual case is people buying US stocks in Euros, and they want to understand the impact of currency exchange on their portofolio.<\/p>\n<p>I have not found any code that does it so I created one.<\/p>\n<h1>Configure it<\/h1>\n<p>Pick the original and target currency:<\/p>\n<p><a href=\"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/909e41949d14bc943ecb31e5481fac4e10c4b429\/\" rel=\"attachment wp-att-5217\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-5217\" src=\"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/03\/909e41949d14bc943ecb31e5481fac4e10c4b429.png\" alt=\"\" width=\"562\" height=\"439\" srcset=\"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/03\/909e41949d14bc943ecb31e5481fac4e10c4b429.png 562w, https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/03\/909e41949d14bc943ecb31e5481fac4e10c4b429-300x234.png 300w, https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/03\/909e41949d14bc943ecb31e5481fac4e10c4b429-384x300.png 384w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h1>The code<\/h1>\n<pre>\/\/ This source code is subject to the terms of the Mozilla Public License 2.0 at https:\/\/mozilla.org\/MPL\/2.0\/\r\n\/\/ \u00a9 joapen\r\n\r\n\/\/@version=4\r\nstudy(\"PROD Currency Exchange\",\"Currency-Xchange\",overlay=true)\r\n\r\nOriginalCurrency = input('USD')\r\nTargetCurrency = input ('EUR')\r\n\r\n\/\/currency-exchange\r\nexchange = security(OriginalCurrency + TargetCurrency,timeframe.period,close) \/\/Retrieves last close of the exchange\r\nAlternativeValue = close * exchange \/\/Converts value into the target currency\r\n\/\/output\r\nplot(AlternativeValue)<\/pre>\n<h1>An example<\/h1>\n<p><a href=\"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/a2d0bfa3f0e4812521ca815e8a2602f482e26084_2_1035x465\/\" rel=\"attachment wp-att-5218\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-5218\" src=\"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/03\/a2d0bfa3f0e4812521ca815e8a2602f482e26084_2_1035x465.png\" alt=\"\" width=\"1035\" height=\"465\" srcset=\"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/03\/a2d0bfa3f0e4812521ca815e8a2602f482e26084_2_1035x465.png 1035w, https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/03\/a2d0bfa3f0e4812521ca815e8a2602f482e26084_2_1035x465-300x135.png 300w, https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/03\/a2d0bfa3f0e4812521ca815e8a2602f482e26084_2_1035x465-1024x460.png 1024w, https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/03\/a2d0bfa3f0e4812521ca815e8a2602f482e26084_2_1035x465-768x345.png 768w, https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/03\/a2d0bfa3f0e4812521ca815e8a2602f482e26084_2_1035x465-500x225.png 500w\" sizes=\"auto, (max-width: 1035px) 100vw, 1035px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some people have their investments in local currency banks and they are affected by eschange rate. The usual case is people buying US stocks in Euros, and they want to understand the impact of currency exchange on their portofolio. I have not found any code that does it so I created one. Configure it Pick &#8230; <a title=\"Alternative currency\" class=\"read-more\" href=\"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/\" aria-label=\"Read more about Alternative currency\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[105],"tags":[],"class_list":["post-5216","post","type-post","status-publish","format-standard","hentry","category-trading"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Alternative currency -<\/title>\n<meta name=\"description\" content=\"Some people have their investments in local currency banks and they are affected by eschange rate. The usual case is people buying US stocks in Euros, and - joapen projects\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Alternative currency -\" \/>\n<meta property=\"og:description\" content=\"Some people have their investments in local currency banks and they are affected by eschange rate. The usual case is people buying US stocks in Euros, and - joapen projects\" \/>\n<meta property=\"og:url\" content=\"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/\" \/>\n<meta property=\"og:site_name\" content=\"joapen projects\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-09T09:10:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-03-09T09:21:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/03\/909e41949d14bc943ecb31e5481fac4e10c4b429.png\" \/>\n<meta name=\"author\" content=\"joapen\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"joapen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/03\\\/09\\\/alternative-currency\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/03\\\/09\\\/alternative-currency\\\/\"},\"author\":{\"name\":\"joapen\",\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/#\\\/schema\\\/person\\\/23919df2312175fe9c4609203595b217\"},\"headline\":\"Alternative currency\",\"datePublished\":\"2021-03-09T09:10:44+00:00\",\"dateModified\":\"2021-03-09T09:21:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/03\\\/09\\\/alternative-currency\\\/\"},\"wordCount\":67,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/#\\\/schema\\\/person\\\/23919df2312175fe9c4609203595b217\"},\"image\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/03\\\/09\\\/alternative-currency\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/joapen.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/909e41949d14bc943ecb31e5481fac4e10c4b429.png\",\"articleSection\":[\"Trading\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/03\\\/09\\\/alternative-currency\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/03\\\/09\\\/alternative-currency\\\/\",\"url\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/03\\\/09\\\/alternative-currency\\\/\",\"name\":\"Alternative currency -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/03\\\/09\\\/alternative-currency\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/03\\\/09\\\/alternative-currency\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/joapen.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/909e41949d14bc943ecb31e5481fac4e10c4b429.png\",\"datePublished\":\"2021-03-09T09:10:44+00:00\",\"dateModified\":\"2021-03-09T09:21:12+00:00\",\"description\":\"Some people have their investments in local currency banks and they are affected by eschange rate. The usual case is people buying US stocks in Euros, and - joapen projects\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/03\\\/09\\\/alternative-currency\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/03\\\/09\\\/alternative-currency\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/03\\\/09\\\/alternative-currency\\\/#primaryimage\",\"url\":\"https:\\\/\\\/joapen.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/909e41949d14bc943ecb31e5481fac4e10c4b429.png\",\"contentUrl\":\"https:\\\/\\\/joapen.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/909e41949d14bc943ecb31e5481fac4e10c4b429.png\",\"width\":562,\"height\":439},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/2021\\\/03\\\/09\\\/alternative-currency\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/joapen.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Alternative currency\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/joapen.com\\\/blog\\\/\",\"name\":\"joapen projects\",\"description\":\"Just a place to write\",\"publisher\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/#\\\/schema\\\/person\\\/23919df2312175fe9c4609203595b217\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/joapen.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/#\\\/schema\\\/person\\\/23919df2312175fe9c4609203595b217\",\"name\":\"joapen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/joapen-mini.jpeg\",\"url\":\"https:\\\/\\\/joapen.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/joapen-mini.jpeg\",\"contentUrl\":\"https:\\\/\\\/joapen.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/joapen-mini.jpeg\",\"width\":400,\"height\":400,\"caption\":\"joapen\"},\"logo\":{\"@id\":\"https:\\\/\\\/joapen.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/joapen-mini.jpeg\"},\"sameAs\":[\"http:\\\/\\\/www.joapen.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Alternative currency -","description":"Some people have their investments in local currency banks and they are affected by eschange rate. The usual case is people buying US stocks in Euros, and - joapen projects","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/","og_locale":"en_US","og_type":"article","og_title":"Alternative currency -","og_description":"Some people have their investments in local currency banks and they are affected by eschange rate. The usual case is people buying US stocks in Euros, and - joapen projects","og_url":"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/","og_site_name":"joapen projects","article_published_time":"2021-03-09T09:10:44+00:00","article_modified_time":"2021-03-09T09:21:12+00:00","og_image":[{"url":"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/03\/909e41949d14bc943ecb31e5481fac4e10c4b429.png","type":"","width":"","height":""}],"author":"joapen","twitter_misc":{"Written by":"joapen","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/#article","isPartOf":{"@id":"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/"},"author":{"name":"joapen","@id":"https:\/\/joapen.com\/blog\/#\/schema\/person\/23919df2312175fe9c4609203595b217"},"headline":"Alternative currency","datePublished":"2021-03-09T09:10:44+00:00","dateModified":"2021-03-09T09:21:12+00:00","mainEntityOfPage":{"@id":"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/"},"wordCount":67,"commentCount":0,"publisher":{"@id":"https:\/\/joapen.com\/blog\/#\/schema\/person\/23919df2312175fe9c4609203595b217"},"image":{"@id":"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/#primaryimage"},"thumbnailUrl":"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/03\/909e41949d14bc943ecb31e5481fac4e10c4b429.png","articleSection":["Trading"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/","url":"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/","name":"Alternative currency -","isPartOf":{"@id":"https:\/\/joapen.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/#primaryimage"},"image":{"@id":"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/#primaryimage"},"thumbnailUrl":"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/03\/909e41949d14bc943ecb31e5481fac4e10c4b429.png","datePublished":"2021-03-09T09:10:44+00:00","dateModified":"2021-03-09T09:21:12+00:00","description":"Some people have their investments in local currency banks and they are affected by eschange rate. The usual case is people buying US stocks in Euros, and - joapen projects","breadcrumb":{"@id":"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/#primaryimage","url":"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/03\/909e41949d14bc943ecb31e5481fac4e10c4b429.png","contentUrl":"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/03\/909e41949d14bc943ecb31e5481fac4e10c4b429.png","width":562,"height":439},{"@type":"BreadcrumbList","@id":"https:\/\/joapen.com\/blog\/2021\/03\/09\/alternative-currency\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/joapen.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Alternative currency"}]},{"@type":"WebSite","@id":"https:\/\/joapen.com\/blog\/#website","url":"https:\/\/joapen.com\/blog\/","name":"joapen projects","description":"Just a place to write","publisher":{"@id":"https:\/\/joapen.com\/blog\/#\/schema\/person\/23919df2312175fe9c4609203595b217"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/joapen.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/joapen.com\/blog\/#\/schema\/person\/23919df2312175fe9c4609203595b217","name":"joapen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/04\/joapen-mini.jpeg","url":"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/04\/joapen-mini.jpeg","contentUrl":"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/04\/joapen-mini.jpeg","width":400,"height":400,"caption":"joapen"},"logo":{"@id":"https:\/\/joapen.com\/blog\/wp-content\/uploads\/2021\/04\/joapen-mini.jpeg"},"sameAs":["http:\/\/www.joapen.com"]}]}},"_links":{"self":[{"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/posts\/5216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/comments?post=5216"}],"version-history":[{"count":3,"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/posts\/5216\/revisions"}],"predecessor-version":[{"id":5221,"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/posts\/5216\/revisions\/5221"}],"wp:attachment":[{"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/media?parent=5216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/categories?post=5216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/joapen.com\/blog\/wp-json\/wp\/v2\/tags?post=5216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}