Download MetaTrader 5
To add comments, please log in or register
Let your idle PCs do something useful. Join MQL5 Cloud Network!
Paul
529
Paul 2014.11.05 15:30 

Is there code or command for finding how much interest is earned per day on trades and balance?


Thanks!

Carl Schreiber
5953
Carl Schreiber 2014.11.05 16:02  
You have to code it yourself  - I would use myFxBook.
Paul
529
Paul 2014.11.05 17:13  
Would I use SYMBOL_SWAP_MODE_INTEREST_CURRENT?
Carl Schreiber
5953
Carl Schreiber 2014.11.05 17:59  
Yellowbeard:
Would I use SYMBOL_SWAP_MODE_INTEREST_CURRENT?
I don't know SYMBOL_SWAP_MODE_INTEREST_CURRENT and I can't find it in the reference but I guess not, as this won't give you the interest per day of your system
Paul
529
Paul 2014.11.05 18:04  

https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants


At bottom of page.



SYMBOL_SWAP_MODE_INTEREST_CURRENT

Swaps are charged as the specified annual interest from the instrument price at calculation of swap (standard bank year is 360 days)

Carl Schreiber
5953
Carl Schreiber 2014.11.05 19:51  

1) Ah, that is for mql5, this is the forum for mql4.

2) This is valid only for some symbols (e.g. bonds?)

3) I thought your question was about how much you earn from your working EA and not how much you have to pay fro holding a symbol.

Paul
529
Paul 2014.11.05 19:59  
Sorry.  I'm talking about the interest that you either earn or are charged when you close or hold a position.
Carl Schreiber
5953
Carl Schreiber 2014.11.05 20:07  
Yellowbeard:
Sorry.  I'm talking about the interest that you either earn or are charged when you close or hold a position.
That is very symbol specific and you better ask your broker, but may be you mean swap?
Paul
529
Paul 2014.11.05 20:25  

Yes.  Some call it swap.  Some rollover.  My broker has a web page that I can go to, to figure out the interest.  It's a pain in the neck.  I was hoping that there was code where I bring these rates into my EA.  I would like to make trades based on the side of the currency pair that pays interest.


Thanks! 

Carl Schreiber
5953
Carl Schreiber 2014.11.05 23:01  
Yellowbeard:

Yes.  Some call it swap.  Some rollover.  My broker has a web page that I can go to, to figure out the interest.  It's a pain in the neck.  I was hoping that there was code where I bring these rates into my EA.  I would like to make trades based on the side of the currency pair that pays interest.


Thanks! 

If you would have kept conttinuing reading yu would have detected: MarketInfo() where you have the opetions MODE_SWAPLONG and MODE_SWAPSHORT
/
To add comments, please log in or register