Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Currency conversion thanksgiving present

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Currency conversion thanksgiving present

    Hello to all,

    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

    Discover top crypto trading apps like Binance for secure, low-fee trading. Access crypto, forex, and more with real-time tools. Avoid scams, start small, and grow profits.
    Attached Files

Latest Posts

Collapse

Topics Statistics Last Post
Started by Hwop38, 05-04-2026, 07:02 PM
0 responses
163 views
0 likes
Last Post Hwop38
by Hwop38
 
Started by CaptainJack, 04-24-2026, 11:07 PM
0 responses
313 views
0 likes
Last Post CaptainJack  
Started by Mindset, 04-21-2026, 06:46 AM
0 responses
245 views
0 likes
Last Post Mindset
by Mindset
 
Started by M4ndoo, 04-20-2026, 05:21 PM
0 responses
350 views
0 likes
Last Post M4ndoo
by M4ndoo
 
Started by M4ndoo, 04-19-2026, 05:54 PM
0 responses
179 views
0 likes
Last Post M4ndoo
by M4ndoo
 
Working...
X