SymbolInfoDouble(_Symbol, SYMBOL_SWAP_LONG)
I am not sure in your case. However there is a possibility that swap value changed from yesterday to today. Also note that the values shown on your terminal(or returned by MQL code) could be wrong. Not always brokers provide correct data.
To access swap value for a open position:
PositionGetDouble(POSITION_SWAP);
Similarly when it comes to accessing historical deals:
HistoryDealGetDouble(deal_ticket, DEAL_SWAP);
Yashar Seyyedin #:
No. I am trying to calculate swap BEFORE opening the position. I have the position size of 23 lots. How do I know what will be the swap from the pairs swap information I have in symbols screenshot.
To access swap value for a open position:
Similarly when it comes to accessing historical deals:
JForex #:
No. I am trying to calculate swap BEFORE opening the position. I have the position size of 23 lots. How do I know what will be the swap from the pairs swap information I have in symbols screenshot.
You can't really know what the swap will be before opening the position. Most brokers change the swap rate every 24 hours, some brokers add the inventory fees(fees for staying in a position for a long time) to the swap fees, too. Generally the longer you stay in a position, the more swap fees there will be. In terms of calculation from your screenshots, I think you should contact your broker assistant and ask about it because different brokers give different meanings to swap fees. My broker even adds commissions to swap fees You can refer to this discussion I found:https://www.quora.com/Do-you-pay-swap-fees-in-forex-every-time-you-hold-overnight-or-do-you-pay-only-once-and-then-you-can-hold-on-to-it-forever
No. I am trying to calculate swap BEFORE opening the position. I have the position size of 23 lots. How do I know what will be the swap from the pairs swap information I have in symbols screenshot.

Do you pay swap fees in forex every time you hold overnight or do you pay only once and then you can hold on to it forever?
- www.quora.com
Answer (1 of 3): All Forex exchanges adjust for swap (also referred to as rollover) every 24 hours. In addition, the weekend gap is accounted through a triple swap adjusted almost always on Wednesday’s, which accounts for position’s held on Wednesday, Saturday and Sunday. The position balance on...
Cody Outcast #:
You can't really know what the swap will be before opening the position. Most brokers change the swap rate every 24 hours, some brokers add the inventory fees(fees for staying in a position for a long time) to the swap fees, too. Generally the longer you stay in a position, the more swap fees there will be. In terms of calculation from your screenshots, I think you should contact your broker assistant and ask about it because different brokers give different meanings to swap fees. My broker even adds commissions to swap fees You can refer to this discussion I found:https://www.quora.com/Do-you-pay-swap-fees-in-forex-every-time-you-hold-overnight-or-do-you-pay-only-once-and-then-you-can-hold-on-to-it-forever
Nope. I can calculate exact swap for a USD symbol using its lot size and the swap information available on symbol. You can't really know what the swap will be before opening the position. Most brokers change the swap rate every 24 hours, some brokers add the inventory fees(fees for staying in a position for a long time) to the swap fees, too. Generally the longer you stay in a position, the more swap fees there will be. In terms of calculation from your screenshots, I think you should contact your broker assistant and ask about it because different brokers give different meanings to swap fees. My broker even adds commissions to swap fees You can refer to this discussion I found:https://www.quora.com/Do-you-pay-swap-fees-in-forex-every-time-you-hold-overnight-or-do-you-pay-only-once-and-then-you-can-hold-on-to-it-forever
The formula is simple see below.
For cross currencies it does not work because I am missing the conversion.
Swap = (Pip Value) * (Swap Rate) * (Number of Nights) / 10
JForex #:
Nope. I can calculate exact swap for a USD symbol using its lot size and the swap information available on symbol.
The swap rate doesn't change every day for your broker? I was really convinced that you can't calculate that because I once tried to develop a swap arbitrage EA but the calculation was way off in live testing.
Nope. I can calculate exact swap for a USD symbol using its lot size and the swap information available on symbol.
The formula is simple see below.
For cross currencies it does not work because I am missing the conversion.
Swap = (Pip Value) * (Swap Rate) * (Number of Nights) / 10
Cody Outcast #:
The swap rate doesn't change every day for your broker? I was really convinced that you can't calculate that because I once tried to develop a swap arbitrage EA but the calculation was way off in live testing.
You’re misunderstanding. Swap is a daily calculation so rate changes every day. The formula calculates the swap for this day. You simply plug in the daily rate and get swap value for this day. There’s no confusion there.The swap rate doesn't change every day for your broker? I was really convinced that you can't calculate that because I once tried to develop a swap arbitrage EA but the calculation was way off in live testing.
Quesiron is how do I calculate for a cross currency that does not have USD in it. It’s a matter of conversion that I need help with. Like the pair I show.

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
Hello guys
My Terminal shows this pair incurred a short swap of $ -636.00
How would you calculate it in code from the Swap info of this pair, as shown ?
Thank you.