Using currency in code

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #96822 quote
    SIMONISSIMONIS
    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
    NicolasNicolas
    Keymaster
    Legend

    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
    SIMONISSIMONIS
    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 SIMONISSIMONIS
7 years, 6 months ago.

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