as a tool for multi currency portfoglio management I worte a tool to get the current exchange rate for currencies. The tool consists of a C# source file and can be included in your NinjaTrader script.
You can also use the code outside NinjaTrader, but in this case you need to uncomment the Currency enum definition.
Here an example:
{
string from="EUR";
string to = "USD";
// also possible: from=Zweistein.CurrencyConversion.ISO(NinjaTrader. Cbi.Currency.Euro);
decimal eurusd=Zweistein.CurrencyConversion.Cube.Convert(1 .0, from, to);
// converts 1.0 EUR into USD using the daily ECB fixing price.
decimal eurusd2=Zweistein.CurrencyConversion.Convert(1.0, from, to);
// converts 1.0 EUR to USD using the current exchange rate supplied by google.
}
have a nice weekend
Andreas