Having a brain fart on figuring out margin used based on stop?

Discussion in 'Forex' started by Pelt, Jun 9, 2022.

  1. Pelt

    Pelt

    Hello.

    I am trying to figure out, before a trade is placed, how much margin I will use up as the trade runs to its stop. I.e., I'd like to figure out how much margin will be used so that I can stay above the brokers 50% margin requirement at all times.

    Is it as simple as figuring out how much a trade will lose in your account(positionSize *stopSize), and assuming a 1:1 correlation between used margin, and how much the stop loss costs you?

    E.g. below of various variables. Account is in USD, assume pairs with Usd as quote pair(Aud/Usd, Eur/Usd). The below is just an example for simple math.

    *Pair: Long Eur/Usd
    *Account Balance: $1,000.00
    *Margin/Leverage: 2% or 50:1
    *Stop Size: 0.0030
    *Units traded: 10,000 units

    Is the idea to take the cost of the unrealized: StopSize *UnitsTraded =0.0030*10,000 = $30.00
    Then multiply the unrealized by the leverage to get the leveraged dollar value of the stop = $30.00*50 = 1500.00
    So your account value would be: Account Balance * leverage = $1,000.00 * 50 = $50,000.00
    SO the total margin used as this trade approaches the stop would be: leverage Dollar Val of Stop ÷ Accnt Val = 1,500 ÷ 50,000 = 3%

    The above is essentially the same as taking the COST of the stop($30) divided by the initial account balance($1000).

    However, I am not sure any of this is correct?

    I'm not smart, can someone simplify this?

    THanks,
    FP
     
  2. cesfx

    cesfx

    The margin is calculated on the position, not on your max risk.
    Stop loss won't have an effect on your margin.

    On EURUSD or other USD based pair, 1k account, 10k units (1mini or 0.1 lot), you are using 10k of the 50k buying power available with leverage. Whatever your stop.
     
  3. Pelt

    Pelt

    Thanks. I know its not about the stop... but what I am after, is how to calculate how much margin you are using at any given time.

    So lemme try to rephrase this better. What I am trying to figure out... is how to calculate the margin used as price moves WHILE IN a position.

    I.e.,... you can OPEN a position... but at some point... price will move far enough AWAY from your entry AGAINST your position, where you will eat into your margin, and you will no longer be able to maintain that position.

    I am trying to figure out how to calculate what that POINT is?

    Does that question make sense?
     
  4. Millionaire

    Millionaire

    If you started with $10,000 and say you are down $3000 on your open positions. Your account balance is now at $7000. And if that is not enough to meet your maintenance margin requirements for your open positions then you risk getting a margin call or your positions getting reduced in size/auto liquidated.

    You need to check with you broker how much maintenance margin you need to maintain.

    In general always trade small enough relative to your account size to avoid running out of margin before your stop gets hit. Don't even let things come close.
     
    Last edited: Jun 9, 2022
  5. cesfx

    cesfx

    Oh sorry, misunderstood. You mentioned leverage of 50:1, and that reminds me of brokers like Oanda. With Oanda for example, you position will be liquidated if.it gets to -50% of your initial balance.
    In the example, -500$ will automatically close the position.
    Some other broker will let your account blow up, that would be as soon as you touch the 1k. And if it goes negative, you might lose more than you first intended to risk. It's all in the terms.
     
  6. Pelt

    Pelt

    Both of you gentlemen are correct.

    I actually do use Oanda, and yep, they will liquidate your positions once you use up 50% of your margin.

    But, what I am after is how to actually calculate at any time, how much margin you are using up with your open positions, as price moves. You can see this value in your trading platform change as your position moves with/against your position.

    So there is a formula to figure this out, it should be simple, and I'm struggling to get it? I'd like to know exactly how much margin I am using at any point, and be able to calculate it BEFORE placing a trade so that I know how much I can buy/sell.


    Examples of other formulas for others interested:
    Position Size(xxx/USD) = (DollarRisk/PipsRisked)*(1 / 0.0001)
    Position Size(USD/xxx) = (unitPrice*PipsRisked)*(1 / 0.0001)

    For pairs, AN, EA, EG, EN, GA, GN
    Position Size(xxx/xxx) =((DollarRisk/unitPrice) /PipsRisked) *(1/0.0001)

    For Pairs, ACAD, ACHF, AJ, CADCHF, CADJ, CHFJ, ECAD, ECHF, EJ, GCAD, GCHF, GJ, NCAD, NCHF,NJ
    Position Size(xxx/xxx) =((DollarRisk*unitPrice)/PipsRisked) * (1/0.0001)

    The above are formulas for calculating positions size, based on the Stop size and Dollar amount you want to risk. I have built indicators in NT to calculate position size, so that's why I have the above formulas.

    Obviously, if using a JPY pair, the 0.0001 would need to be 0.01. Unit price refers to the cross pair you would need to use. E.g., if you need to calculate position size for GBP/JPY, u'd use formula 3 above, and unitPrice would be the current price of GBP/USD.


    //--------------------------
    Other stuff:
    Margin = 1/Leverage
    Leverage = 1/Margin
    Margin Used when opening a trade =UnitsTraded*Margin*UnitPrice
    Buying Power = DollarsRisked*Leverage
    Amount of currency you can purchase =BuyingPower/UnitPrice

    A pip =0.01% of quote currency
    10,000 pips = 1 unit of currency
    in USD, 10,000 pips = $1.00

    //--------------------------
    So I've found some other resources in various places, but I am either not smart enough to figure it out, or the explanation is confusing?
    here
    here
    here
     
  7. Margin requirements change depending on the authority that runs in the country.

    In the US you can check the SEC:

    https://www.sec.gov/reportspubs/investor-publications/investorpubsmarginhtm.html

    Your broker must have a detailed explanation of the margin required to trade, they all have it available.
    If you can find your broker's margin agreements we can go through it.
    Stops don't matter for the margin required to trade, as said already.
     
    Last edited: Jun 9, 2022
  8. https://www1.oanda.com/resources/legal/europe/legal/margin-rules

    "The margin needed to open each trade is derived from the leverage limit associated with the asset class that you wish to trade. For example, if you were trading with leverage set at 30:1, you would be asked to deposit margin of 3.3% of the full value of the trade that you wished to enter into (1 over 30 is 0.03 or 3.3%). In other words, when trading with leverage of 30:1 you can open a £30 trade for each pound of available funds to cover margin on your account."
     
  9. Millionaire

    Millionaire

    Does your broker not show the margin required for an order before it is placed?

    And also the PnL for each pip, so you can calculate the risk to your stop.
     
    Last edited: Jun 9, 2022
  10. Pelt

    Pelt

    I might be doing a terrible job at explaining the information I am looking for?

    I'm not looking for the margin required to OPEN a trade. I am looking for the formula to figure out how much margin you are using, based on your position size, and your CURRENT pnl of your open positions.

    This formula should be the same irrespective of your broker agreement.

    I.e., if I open a position with n-units, at y-price... this will use a certain margin.

    What happens if price moves 10pips against the entry... how much margin have I used up?

    What happens if price moves an ADDITIONAL 10pips against the entry... how much margin have I used up? etc...

    There must be a formula to figure this out?

    I appreciate you gentlemen humoring me on my question, let me know if my question makes no sense.
     
    #10     Jun 9, 2022