Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Incorrect currency calculation

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

    Incorrect currency calculation

    Hello,

    I am having troubles with some code in NT8. When I try to do some calculations with the Big Point Value (or similar commands) for the forex market the calculation is done with the number in the base currency of the pair, not the currency in which the account is setup.

    For example Big Point Value of EURGBP will give as 1, instead of the value in USD in which the account is settled, which I believe should be the normal and expected behaviour

    Here is a similar post from NT7 that describes the situation from some users in the past, which I believe is very similar to what happens in NT8 right now.



    Originally posted by NinjaTrader_Matthew View Post
    The currency that is returned should always be in $USD, even if the base currency is not USD.

    Using CalculationMode.Currency set to $100, it should always be set to $100 from entry price or every instrument.

    However, for Non-usd pairs, you need to ensure that you have the use equivalent running for the currency conversion to run correctly. For example when running EURJPY, USDJPY needs to be streaming in another chart or from the market analyzer.


    I also tried to create a market analyzer with the symbols streaming against USD, but this seems to work inconsistently.

    Any help would be appreciated,
    Jesús

    #2
    Hello martingjesus,

    Thank you for your note.

    This would be expected. I believe Matthew was saying that CalculationMode.Currency would give you the correct stop price for $100 risk on the EURJPY pair, which I can confirm by opening a EUR/JPY chart, selecting an ATM with a stop risk of $100 and placing an order. So internally a calculation is made when that call is made, and having a stream of USD/JPY ensures the stop price is calculated correctly based off the real time rate.

    The EURGBP point value of 1 seems more of a temp value rather than the actual value, as the actual value is dependent on the market rate between GBP/USD.

    When doing calculations you should expect to have to convert the USD point value of EURGBP based off the rate between GBP/USD. I would suggest a web search for topics related to Calculating Cross Rates for Non-Symmetrical Pairings for formulas to calculate the point value in USD.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by drewski1980, Today, 08:24 AM
    0 responses
    3 views
    0 likes
    Last Post drewski1980  
    Started by rdtdale, Yesterday, 01:02 PM
    2 responses
    16 views
    0 likes
    Last Post rdtdale
    by rdtdale
     
    Started by TradeSaber, Today, 07:18 AM
    0 responses
    7 views
    0 likes
    Last Post TradeSaber  
    Started by PaulMohn, Today, 05:00 AM
    0 responses
    10 views
    0 likes
    Last Post PaulMohn  
    Started by ZenCortexAuCost, Today, 04:24 AM
    0 responses
    6 views
    0 likes
    Last Post ZenCortexAuCost  
    Working...
    X