Hello,
i tried to calculate costs in account currency for a XAGUSD move.
My formula for this
points is the number of basis points of this price move. The move was from 22.68 to 20.06.
As a point is 0.01, resulting points = -262.
The volume was 0.03. Now, the important thing here is point_value:
A dump of all XAGUSD properties shows this:
According to calculation above, the long costs for this move (from 22.68 to 20.06) = -262 * 0.03 * 0.01 ~ - 0.08
But the real balance drawdown (balance after closed - balance before) was about -380.
Can anyone explain this. What do i wrong ? I use the formula for forex as well and in this cases it seems to work correctly -> Calculated costs pretty close to balance difference.
Thank you for help
The problem is your point value, your calculation is wrong. You have to take into account what is a lot. The formula to use is :
point value = contract size (1 lot) * point size.
- For XAGUSD, usually contract size is 5000 (troy ounce), point size is here 0.01, that gives you a point value of 5000 * 0.01 = 50 USD.
- For EURUSD, 100 000 * 0.00001 = 1 USD (5 digits point).
- For GBPJPY, 100 000 * 0.001 = 100 JPY (3 digits point), if your account is in USD, you have to convert JPY to USD, so : 100 / 98.55 (quote when I write) = 1.015 USD
In your example the result is : 262 * 0.03 * 50 = 393 USD
EDIT : The value returned for SYMBOL_TRADE_TICK_VALUE seems incorrect in your case.
The problem is your point value, your calculation is wrong. You have to take into account what is a lot. The formula to use is :
point value = contract size (1 lot) * point size.
- For XAGUSD, usually contract size is 5000 (troy ounce), point size is here 0.01, that gives you a point value of 5000 * 0.01 = 50 USD.
- For EURUSD, 100 000 * 0.00001 = 1 USD (5 digits point).
- For GBPJPY, 100 000 * 0.001 = 100 JPY (3 digits point), if your account is in USD, you have to convert JPY to USD, so : 100 / 98.55 (quote when I write) = 1.015 USD
In your example the result is : 262 * 0.03 * 50 = 393 USD
EDIT : The value returned for SYMBOL_TRADE_TICK_VALUE seems incorrect in your case.
So 0.01 returned by SymbolInfoDouble("XAGUSD",SYMBOL_TRADE_TICK_VALUE) is wrong, is this correct ?
So 0.01 returned by SymbolInfoDouble("XAGUSD",SYMBOL_TRADE_TICK_VALUE) is wrong, is this correct ?
Yes? here is what I get for an account in EURUSD :
2013.08.26 13:17:14 testChartEvent (EURUSD,H1) SYMBOL_TRADE_TICK_VALUE for XAGUSD(SILVER) = 3.738122116973317
2013.08.26 13:17:14 testChartEvent (EURUSD,H1) SYMBOL_TRADE_TICK_SIZE for XAGUSD(SILVER) = 0.001
Yes? here is what I get for an account in EURUSD :
2013.08.26 13:17:14 testChartEvent (EURUSD,H1) SYMBOL_TRADE_TICK_VALUE for XAGUSD(SILVER) = 3.738122116973317
2013.08.26 13:17:14 testChartEvent (EURUSD,H1) SYMBOL_TRADE_TICK_SIZE for XAGUSD(SILVER) = 0.001
Hello,
not so with my MT5 (metaquotes demo).
It returns 0.01
double _SYMBOL_TRADE_TICK_VALUE=SymbolInfoDouble("XAGUSD",SYMBOL_TRADE_TICK_VALUE);
Hello,
not so with my MT5 (metaquotes demo).
It returns 0.01
Your are right, you can report this as a bug to ServiceDesk.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
i tried to calculate costs in account currency for a XAGUSD move.
My formula for this
points is the number of basis points of this price move. The move was from 22.68 to 20.06.
As a point is 0.01, resulting points = -262.
The volume was 0.03. Now, the important thing here is point_value:
A dump of all XAGUSD properties shows this:
According to calculation above, the long costs for this move (from 22.68 to 20.06) = -262 * 0.03 * 0.01 ~ - 0.08
But the real balance drawdown (balance after closed - balance before) was about -380.
Can anyone explain this. What do i wrong ? I use the formula for forex as well and in this cases it seems to work correctly -> Calculated costs pretty close to balance difference.
Thank you for help