How to know the value, in euros, of a pip for a leverage of 100 ?

 

Hello,


I would like to know the formula for computing the value of a pip (more specifically the minimum mouvement of a forex pair) for a leverage of 100.


Here is what I have tried:


Let's try to calculate this value for the AUD/USD pair:


1) 1 pip = 0.0001 of the AUD/USD pair

2) we can say that "1 AUD/USD = 0.69", so 1 pip = 0.0001 USD

3) 1 pip = 0.0001 x (value of a USD in euro) = 0.0001 x USDEUR = 0.000098 euros

4) with a leverage of 100: 1 pip = 0.000098 * 100 = 0.0098 euros


I am almost sure there is something wrong with my calculation...


Any idea ?


Thanks!


Aymeric
 

Pips aren't officially defined values (they were dozens of years ago).

For your calculation you have to use Tick_Size and Tick_Value. They are defined by your broker (any broker can and does use different setups for their symbols and the accounts they provide).

E.g look here: https://www.mql5.com/en/forum/425413

Symbol Point Value - Can you tell me how MT5 calculates point value using the SYMBOL_POINTenum?
Symbol Point Value - Can you tell me how MT5 calculates point value using the SYMBOL_POINTenum?
  • 2022.05.18
  • www.mql5.com
There is also tick size and tick value. I will change the code to use tick size and value. In essence, make sure that your price quotes, are properly aligned to the tick size (see following examples). Usdzar where spread is over 500 points), and metals
 
Well, yes.

You are mixing leverage with profit. That's wrong.

Leverage only defines the resulting factor for your margin. The higher the leverage, the less margin you need for the same volume.

Profit is only depending on the volume you trade, and has in so far no relationship with leverage.

It has been discussed on this forum in detailed and manifold ways, you will find all answers here already.
 

Thanks for both replies. I have looked onto other posts.


So, if I understood correctly:


1) investment for a trade: 20 euros


2) leverage: 100


3) => margin: 2000 euros = 2040 dollars


4) 2040 dollars  of the AUD/USD pair = (2040/0.69) = 2956 units


5) value of the pip (in euros) for the AUD/USD pair: 2956 * 0.0001 = 0.2898 euros


So, if I take a long position and I gain 40 pips: I would earn (in euros) : 0.2898 x 40 = 11.59 euros


Is it correct ?


Thank you


Aymeric

 
What?

Margin and leverage have nothing to do with profit or tick value.

Investment, in your case, of 20€ would be 20€.

If you use leverage, and your "investment" is the margin you are willing to put in, will result in following formula:

contract size = 100.000
Leverage = 100

contract size / leverage = 1.000

So your margin for 1.0 standard lot (one contract size) would be 1000 (AUD)

You are willing to give 20 € -> (assuming) this would be 25 AUD

1.0 (standard lot) / (1000 / 25) = 0.025 Standard lot of volume.


AUDUSD current bid quote, let's say 0.75 USD

So a tick value will be 0.75 * 0.00001 (digits for the symbol = 5, Point() = 0.00001)

Multiplied by contract size and by your volume.

So:
0.75 * 0.00001 * 100.000 * 0.025 = 0.01875 USD

Now convert this to EUR to know your account profit, in case your account currency is EUR.

As you can see, there is nothing linked between margin and profit, except for the volume you are trading.

The term "investment" is not right here, it's your security deposit exposure.

You could argue the investment is referring to your stop loss, but then it would be the risk you are willing to put in.


 

Thanks, indeed I got mixed up with the terms.


Just one last detail. I saw on the chart that the minimum price change is indeed 5 digits after 0 (0.00001).


But if I take the measure tool of Tradingview, the difference between the two values on the image (0.67395 and 0.68059) is 0.00664. The measure tools shows the value "66.4" which I interpret it as being 66.4 pips (and I would say I am right..), which means that TD considers a pip here as being 0.0001 (and not 0.00001).


So I guess the minimum movement of a price and a "pip" are two different things..


 
Do yourself a favour and start thinking in ticks. It makes your live a whole lot easier. It is universal for everything and it is the minimal movement in price, also most software just gives you the tick value, you don't even need to calulcate it.
 
Enrique Dangeroux #:
Do yourself a favour and start thinking in ticks. It makes your live a whole lot easier. It is universal for everything and it is the minimal movement in price, also most software just gives you the tick value, you don't even need to calulcate it.

Right. Ticks or Points, depending on the asset.

PiP is per definition Percentage in Points, so it's more a legacy term for when currencies had only two digits.


I would not rely on Tick value given by MT5, if it is not a must. Only certain asset types >require< tick value, and only in these asset classes it is reliable.



 
Dominik Christian Egert #:

Right. Ticks or Points, depending on the asset.

PiP is per definition Percentage in Points, so it's more a legacy term for when currencies had only two digits.


I would not rely on Tick value given by MT5, if it is not a must. Only certain asset types >require< tick value, and only in these asset classes it is reliable.



Just ticks, 1 point on ES is 4 ticks for example. So if you want to calculate your risk, would you use points or ticks?

 
Enrique Dangeroux #:

Just ticks, 1 point on ES is 4 ticks for example. So if you want to calculate your risk, would you use points or ticks?

Ticks are th smallest price and time units on a market.

Bu t when talking about stocks, you say point, since most of them do not have digits right of the comma.

What is ES??

 

Ok, I have created an indicator based on the indications of @Dominik Christian Egert , here is what it looks like:



Even if I wrote it in Pine, I share the code here, you can also check it as I'm still not completely sure  about it (I commented it):

//
// © usefulOatmeal73423

//@version=5
indicator("Invest en pips", overlay=true)

invest = input.float(20, "Invest amount in euros")
leverage = input.int(100, "Leverage", minval=1, maxval=500, step=10)

// for Forex returns 0.0001 (instead of 0.00001)
GetPipSize() =>
    syminfo.mintick * (syminfo.type == "forex" ? 10 : 1)

tr(number, decimals) =>
    factor = math.pow(10, decimals)
    int(number * factor) / factor


print_table(leverage, invest_euros, val_pip) =>

    var tab = table.new(position.middle_center, 2, 8)
    
    euros_basecurrency = request.security(syminfo.basecurrency != 'EUR' ? 'EUR' + syminfo.basecurrency : syminfo.basecurrency, '1', close)

    euros_quotecurrency = request.security(syminfo.currency != 'EUR' ? 'EUR' + syminfo.currency : syminfo.currency, '1', close)

    invest_in_basecurrency = invest_euros*euros_basecurrency

    margin_for_a_lot = 100000/leverage

    investment_in_lots_percentage = invest_in_basecurrency/margin_for_a_lot // % of the invest compared to the margin (if invest 1 AUD / 1000, then = 0.001)
    
    investment_in_lots_percentage := tr(investment_in_lots_percentage, 2) // normalization (e.g 0.195 -> 0.19), because granularity max is 0.01 (micro lot)
    
    profit_loss_value_in_quote = tr(close * val_pip * 100000 * investment_in_lots_percentage, 2) // profit / loss corresponding to the mouvement of one pip
    
    profit_loss_value_in_eur = tr(profit_loss_value_in_quote / euros_quotecurrency, 2) // profit / loss corresponding to the mouvement of one pip in EURO

    // Left column
    table.cell(tab, 0, 0, "leverage", bgcolor = color.yellow)
    table.cell(tab, 0, 3, "margin for 1 lot", bgcolor = color.yellow)
    table.cell(tab, 0, 1, "invest in EUR", bgcolor = color.yellow)
    table.cell(tab, 0, 2, "invest in "+str.tostring(syminfo.basecurrency)+"", bgcolor = color.yellow)
    table.cell(tab, 0, 4, "investment percentage of the lot", bgcolor = color.yellow)
    table.cell(tab, 0, 5, "profit/loss for one pip (in "+str.tostring(syminfo.currency)+")", bgcolor = color.yellow)
    table.cell(tab, 0, 6, "profit/loss for one pip (in EUR)", bgcolor = color.yellow)
    table.cell(tab, 0, 7, "stop_loss max (in pips)", bgcolor = color.yellow) // the max number of pips that our invest amount allows us to lose
    
    // Right column
    table.cell(tab, 1, 0, str.tostring(leverage), bgcolor = color.yellow)
    table.cell(tab, 1, 3, str.tostring(margin_for_a_lot), bgcolor = color.yellow)
    table.cell(tab, 1, 1, str.tostring(invest_euros), bgcolor = color.yellow)
    table.cell(tab, 1, 2, str.tostring(invest_in_basecurrency), bgcolor = color.yellow)
    table.cell(tab, 1, 4, str.tostring(investment_in_lots_percentage), bgcolor = color.yellow)
    table.cell(tab, 1, 5, str.tostring(profit_loss_value_in_quote), bgcolor = color.yellow)
    table.cell(tab, 1, 6, str.tostring(profit_loss_value_in_eur), bgcolor = color.yellow)
    table.cell(tab, 1, 7, str.tostring(int(invest_euros / profit_loss_value_in_eur)), bgcolor = color.yellow)
    
    
print_table(leverage, invest, GetPipSize())
  


Thanks a lot!


Aymeric

Reason: