Jump to content

insignificant

Community Member
  • Posts

    3
  • Joined

  • Last visited

Posts posted by insignificant

  1. Hello,

    I'm trying to figure out the Margin Required to create a BUY position on EUR/USD with my base currency in AUD.

    However - I really don't know how to get the calculation right, can you please help?

    Please see the attached screenshot EURUSD_1.png and EURUSD_2.png:

    • Size: 5
    • Contract Size: EUR 10,000
    • Price: 1.12208 (EUR/USD)
    • Value of one point: USD 1
    • Margin: 0.5%
    • Margin Required (USD): US$108.01

    My calculation:

    Quote

    Margin Required = Size * Contract * Price * Margin

    = 5 * 10,000 * 1.12208 * 0.5%

    = 280.52 (far from US$108.01)

    I understand to get the Margin Required in AUD - it would require currency conversion from USD to AUD.

    However - I cannot even get the calculation right for the Margin Required (USD) : USD108.01.

    Can anyone help me how to get that figure (ie. USD108.01)?

    Below is more information about EURUSD mini pair. (if it helps).

     

    Please let me know

     

    Thank you

    Quote
    
    {
        "instrument": {
            "epic": "CS.D.EURUSD.MINI.IP",
            "expiry": "-",
            "name": "EUR/USD Mini",
            "forceOpenAllowed": true,
            "stopsLimitsAllowed": true,
            "lotSize": 1.0,
            "unit": "CONTRACTS",
            "type": "CURRENCIES",
            "controlledRiskAllowed": true,
            "streamingPricesAvailable": true,
            "marketId": "EURUSD",
            "currencies": [{
                "code": "USD",
                "symbol": "$",
                "baseExchangeRate": 0.68841,
                "exchangeRate": 0.66,
                "isDefault": false
            }],
            "sprintMarketsMinimumExpiryTime": null,
            "sprintMarketsMaximumExpiryTime": null,
            "marginDepositBands": [{
                "min": 0,
                "max": 115,
                "margin": 0.5,
                "currency": "USD"
            }, {
                "min": 115,
                "max": 1150,
                "margin": 1,
                "currency": "USD"
            }, {
                "min": 1150,
                "max": 1725,
                "margin": 3,
                "currency": "USD"
            }, {
                "min": 1725,
                "max": null,
                "margin": 15,
                "currency": "USD"
            }],
            "marginFactor": 0.5,
            "marginFactorUnit": "PERCENTAGE",
            "slippageFactor": {
                "unit": "pct",
                "value": 50.0
            },
            "limitedRiskPremium": {
                "value": 1.08,
                "unit": "POINTS"
            },
            "openingHours": null,
            "expiryDetails": null,
            "rolloverDetails": null,
            "newsCode": "EUR=",
            "chartCode": "EURUSD",
            "country": null,
            "valueOfOnePip": "1.00",
            "onePipMeans": "0.0001 USD/EUR",
            "contractSize": "10000",
            "specialInfo": ["DEFAULT KNOCK OUT LEVEL DISTANCE", "MIN KNOCK OUT LEVEL DISTANCE", "MAX KNOCK OUT LEVEL DISTANCE"]
        },
        "dealingRules": {
            "minStepDistance": {
                "unit": "POINTS",
                "value": 5.0
            },
            "minDealSize": {
                "unit": "POINTS",
                "value": 1.0
            },
            "minControlledRiskStopDistance": {
                "unit": "POINTS",
                "value": 5.0
            },
            "minNormalStopOrLimitDistance": {
                "unit": "POINTS",
                "value": 2.0
            },
            "maxStopOrLimitDistance": {
                "unit": "PERCENTAGE",
                "value": 75.0
            },
            "marketOrderPreference": "AVAILABLE_DEFAULT_OFF",
            "trailingStopsPreference": "AVAILABLE"
        },
        "snapshot": {
            "marketStatus": "TRADEABLE",
            "netChange": 0.00034,
            "percentageChange": 0.03,
            "updateTime": "03:06:40",
            "delayTime": 0,
            "bid": 1.12205,
            "offer": 1.12211,
            "high": 1.12247,
            "low": 1.12079,
            "binaryOdds": null,
            "decimalPlacesFactor": 5,
            "scalingFactor": 10000,
            "controlledRiskExtraSpread": 2
        }
    }

     

    EURUSD_1.PNG

    EURUSD_2.PNG

    • Like 1
  2. Hi IG Support,

    I'm currently developing a monitoring tools for the price using REST API. 

    I have couple of questions that really confused me in constructing the formula/algorithm:

    1. I have been comparing price in the IG Web Platform and Android Platform versus the REST API Companion. I found some inconsistencies, for example at some points in Web/Android platform to calculate the Mid HIGHEST price, the formula is as follow: ROUND_DOWN((Bid + Ask)/2); However, on the same timeframe at some points the Mid LOWEST price formula is as follow: ROUND_UP((Bid + Ask)/2). Please see my attached screenshot for more details. This brought me to a question as how to calculate the Mid value of a candle in the Web/Android Platform, let's say (Bid + Ask)/2 = 107.01235, so should it get rounded up becoming 107.013 or rounded down becoming 107.012?
    2. Issue number 1 somehow screws my Stochastic Oscillator calculation due to inconsistencies and differences in couple of N candles. Does IG have an API to call the Stoch value at some point of time?
    3. Did I calculate point 1 above incorrectly? What's the correct formula to get the accurate price at certain point? I was using the GET/prices - is that correct? Is my method correct?

    Please see my screenshot for more detailed information 🙏

    Thank you!

    IG_mismatched.png

×
×
  • Create New...
us