MQL4 - automated forex trading   /  

Forum

How MANY types of swaps ?

Back to topics list To post a new topic, please log in or register

avatar
92
TheEconomist 2006.11.20 23:11 
I thought I knew about how to apply swap points as it's presented here : http://www.eforex-asia.com/swap_rates.html Now with this new MODE_SWAPTYPE, i'm not so sure... thought it was only one kind of representation for data retrieved with MODE_SWAPLONG and MODE_SWAPSHORT. I'd appreciate to see some formulas and examples for each of them so I could use them properly...
article

One Server Outage

One of the servers, on which the client terminals and Expert Advisors of the Championship Participants are working, failed last Saturday. For this reason 20 Expert Advisors did not work on Monday. All Expert Advisors have become able to continue their competition by 12 a.m. on Tuesday.


avatar
Moderator
4002
stringo 2006.11.21 11:24 
See http://docs.mql4.com/constants/marketinfo

MODE_SWAPTYPE 26 Swap calculation method. 0 - in points; 1 - in the symbol base currency; 2 - by interest.

avatar
92
TheEconomist 2006.11.21 19:10 
Now, perhaps I didn't made myself understood... I read the documentation. I just didn't understood. The problem is distinction between 0 and 1 (in our EAs). I guess both methods return swap points. Normally, if base currency is USD, there should be no difference between results. I guess that in the case base currency would be EUR, the results would be already divided to EURUSD rate (for the 1 case)... Probably when the value is 2 the interest is gained in the currency bought in a trade and converted at paytime in account currency. But these are just my guesses. .. And there shouldn't be place to guess when you're programming an EA and must know exactly what a function returns...

avatar
Moderator
4002
stringo 2006.11.22 11:32 

Calculation method is applied on the server (or tester) side. Calculated swaps are presented in deposit currency


avatar
92
TheEconomist 2006.11.22 19:22 
Ok Stringo, so the server should do the magic and me getting results in "deposit currency". For example InterbankFX MarketInfo("EURUSDm",MODE_SWAPTYPE) returns 2 so these should be interest rates. We have, when applying MarketInfo with MODE_SWAPLONG and MODE_SWAPSHORT. EURUSD -0.8650 0.72 USDJPY 1.30 -1.46 USDCHF 0.99 -1.15 EURCHF 0.55 -0.63 and the list goes on... What they have on website at http://www.interbankfx.com/swap_rates.php is very very different... I just wanted a formula to convert results from what I get out of MarketInfo into what they displayed (or around there, cause swap points are marginally affected by forex rates fluctuations)

avatar
Moderator
4002
stringo 2006.11.23 11:40 

Use OrderSwap() function to get really calculated swaps.

Ask question about swap calculations your broker.


avatar
92
TheEconomist 2006.11.28 22:10 
Just as side topic, on FXDD , MarketInfo("EURUSD",MODE_SWAPTYPE) returns 3...and that's not one of the standard values

avatar
Moderator
4002
stringo 2006.11.29 10:05 

It is non-standard value. They calculate swaps by their own way


avatar
92
TheEconomist 2006.12.14 00:03 
Well, as providers of the platform you should have forbid them to do anything that could damage the MetaTrader's reputation...
Back to topics list  

To add comments, please log in or register