is it possible to use the currency of the trade in the code ? To be able to include currency in the calculations.
thanks
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.
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.