Metatrader Forum | Forex Expert-Advisor | Broker & Forex Tools

Metatrader Forum | Forex Expert-Advisor | Broker & Forex Tools (http://www.expert-advisor.com/forum/index.php)
-   Codeschnipsel (http://www.expert-advisor.com/forum/forumdisplay.php?f=292)
-   -   Code Snippets - CurrencySymbol() (http://www.expert-advisor.com/forum/showthread.php?t=5238)

Kronenchakra 24.10.16 22:05

Code Snippets - CurrencySymbol()
 
Code:

//+------------------------------------------------------------------+
//| Translate currency to the currency-symbol                        |
//+------------------------------------------------------------------+
string CurrencySymbol(string aCurrency)
  {
  if(aCurrency=="EUR") return("€"); else
  if(aCurrency=="USD") return("$"); else
  if(aCurrency=="GBP") return("£"); else
  if(aCurrency=="JPY") return("¥"); else
  return("?");
  }

//+------------------------------------------------------------------+
//| Return the currency-symbol                                                                |
//+------------------------------------------------------------------+
string CurrencySymbol()
  {
  return(CurrencySymbol(AccountInfoString(ACCOUNT_CURRENCY)));
  }

Ja, ist ziemlich trivial, aber ich find's praktisch.


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:51 Uhr.

Powered by vBulletin® Version 3.8.5 (Deutsch)
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.1
Powered by vBCMS® 2.7.0 ©2002 - 2024 vbdesigns.de
Copyright ©2009 - 2023 by Expert-Advisor.com - Das Metatrader Forum