Download MetaTrader 5

Different Symbol(Specification), different lot size, same potential profit/loss by pip

To add comments, please log in or register
Icham Aidibe
10305
Icham Aidibe  
Trying to write a function that homogenise my deals :

Symbol 1 :
Lot size : 0.01 (x)
Tick size : 0.5
Tick value : 12.5 euros
Potential profit for z pips : 10 euros

Symbol 2 :
Lot size : y
Tick size : 0.5
Tick value : 5 euros
Potential profit for z pips : 10 euros

How to calculate y ? (edit : tick size may be different)
Alain Verleyen
Moderator
32808
Alain Verleyen  
What have you tried ?
Icham Aidibe
10305
Icham Aidibe  
angevoyageur:
What have you tried ?
Google. Trying to find the math relation between Lot, tick size, tick value, profit. But no luck for now :/
Alain Verleyen
Moderator
32808
Alain Verleyen  
blouf:
Google. Trying to find the math relation between Lot, tick size, tick value, profit. But no luck for now :/

Really ?

Profit/Loss = [Number of pips] * [pip value]

Icham Aidibe
10305
Icham Aidibe  
angevoyageur:

Really ?

Profit/Loss = [Number of pips] * [pip value]

Ok, where's Pip value = tick value.

edit : what about Lots ?  Profit = pips * pip value * lot size ?

If the symbol currency is usd, I have to convert it & the best rate is the current price of eurusd  ... right til' here ?

Alain Verleyen
Moderator
32808
Alain Verleyen  
blouf:

Ok, where's Pip value = tick value.

edit : what about Lots ?  Profit = pips * pip value * lot size ?

If the symbol currency is usd, I have to convert it & the best rate is the current price of eurusd  ... right til' here ?

Not.

A pip is not a tick.

And you can't change the formula, I gave you the right one.

So the question is how to calculate the value of a pip ?

Icham Aidibe
10305
Icham Aidibe  
angevoyageur:

Not.

A pip is not a tick.

And you can't change the formula, I gave you the right one.

So the question is how to calculate the value of a pip ?

:) The formula to calculate the pip value is easy to find but only for forex/pairs & different for each. But what if I'm talking of something else, like oil ?
Icham Aidibe
10305
Icham Aidibe  

Here it is : 

Lotsize = (Profit(or Loss)/Tick value) * (Tick size / Pip)

A question remains : I can't see TICK SIZE & TICK VALUE on forex symbol's spec - is that mean that using it with SymbolInfoDouble is useless ?

Rodrigo Malacarne
Moderator
10253
Rodrigo Malacarne  
blouf:

Here it is : 

Lotsize = (Profit(or Loss)/Tick value) * (Tick size / Pip)

A question remains : I can't see TICK SIZE & TICK VALUE on forex symbol's spec - is that mean that using it with SymbolInfoDouble is useless ?

For tick size and tick value please take a look at the Symbol Properties, specifically the SymbolInfoDouble() function and the ENUM_SYMBOL_INFO_DOUBLE options (specifically SYMBOL_TRADE_TICK_SIZE and SYMBOL_TRADE_TICK_VALUE).

Icham Aidibe
10305
Icham Aidibe  
Malacarne:

For tick size and tick value please take a look at the Symbol Properties, specifically the SymbolInfoDouble() function and the ENUM_SYMBOL_INFO_DOUBLE options (specifically SYMBOL_TRADE_TICK_SIZE and SYMBOL_TRADE_TICK_VALUE).

@Malacarne : I did, but doubt when didn't find these value in forex' symbols specifications on MT5 platform.
Rodrigo Malacarne
Moderator
10253
Rodrigo Malacarne  
blouf:
@Malacarne : I did, but doubt when didn't find these value in forex' symbols specifications on MT5 platform.

I'm not sure if I understood your point... can you explain it better?

You can try to make screenshots or post parts of your code here. It would help us to find a solution for your problem.

12
To add comments, please log in or register