Using currency in code

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #96822 quote
    SIMONIS
    Participant
    Junior

     

    is it possible to use the currency of the trade  in the code ? To be able to include currency in the calculations.

    thanks

    #96823 quote
    Nicolas
    Keymaster
    Master

    Hmm, i’m not sure to understand, what calculation would you like to be done? The currency used by code is the one of the instrument.

    #96825 quote
    SIMONIS
    Participant
    Junior

    I want have fixed exposure independent of the instrument i apply my automatic trading script to.

    I current use this;

    Exposure = 15000

    NUMBEROFCONTRACTS = (Exposure / MedianPrice) * ( 1 / pointvalue )

    i made different scripts for dollars, SK and euro’s.

    but if i would apply this script to Yen i would get a different exposure.

    so i am searching for code that my exposure is always 15000 euro per instrument independent of the applied instrument (only indexes).

    i hope this helps in defining an answer.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Using currency in code


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
SIMONIS @simonis Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by SIMONIS
6 years, 10 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 04/19/2019
Status: Active
Attachments: No files
Logo Logo
Loading...