
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Here are two examples from AMP Global (Europe):
I’ll set up a demo account and try it out. Thanks.
I've opened up an account and in testing my new code I can see that the DeltaValuePerLot function is not returning in my account currency. A stop loss was hit and the value was approx 1.318 smaller than it should have been which is the GBPUSD exchange rate at the moment.
It looks like I will need to check what currency the following returns. Any ideas how I go about that?Hi Everyone,
On testing my new code which now calculates position size using tick value (thanks Fernando) I had the same experience as some previous posters regarding what currency is returned when the tick value is retrieved using the SymbolInfoDouble(CurrentSymbol,SYMBOL_TRADE_TICK_VALUE). After trying this out myself I have found that the currency is dependent on the symbol and also the broker.
For example, I compared the output using EURUSD and also SPX500 for my account which is in GBP. Going onto the website the pip value for SPX500 is 1USD. Retrieving the value in MQL5 gives a value of 1 which is obviously 1USD – not in my account currency.
For EURUSD the pip value given on the website is 10USD therefore the point value is 1USD per point. 1 point is equal to 1 tick in this case the tick value should be 1. Retrieving the value in MQL5 I get a value of 0.7599 which is the value in GBP, using the exchange rate at the time.
It is crucial to know what currency the tick value is given in (by the broker) in order to calculate position sizes and monetary values etc correctly so I’ve been trying to find where this information is given within MT5/MQL5. Unfortunately I have struggled and cannot find where to get this information. From what I can see this information is not even provided by the broker themselves on their website but maybe I’m just not looking in the right place.
Where can I find this information so that I can develop robust code to handle all situations?
Cheers,
Ed
Dominik, yes this is exactly what I have found. How are you calculating the value? It seems cray that there is no way of knowing what currency the tick_value is given in. It's so crucial.
Cheers,
Ed
Thanks Dominik. I guess the big question is how do you know if the tick value currency is in your account currency or another one? That is the big question here.
Cheers,
Ed
Hmm OK. Sorry I'm struggling to get my head around this. So, let's look at an example. Case 1 - EURUSD and Case 2 - SPX500. The specification from given by my broker is as shown below:
CASE 1
CASE 2

The tick value for Case 1 - EURUSD is given in my Account Currency GBP wheras for Case 2- SPX500 it's given in USD.
So if you're bypassing the tick value data given by the broker how do you actually calculate it? Are you using the tick size provided by the broker?
Seems crazy that this is not rigorously set up by the brokers. Does the calculation type (Forex No leverage and CFD in these cases) hold clues to the way tick value is specified?
Apologies for being a numpty on this one and thanks for the help.