Download MetaTrader 5

How to calcluate Cost per trade? Aren't you feel it actually significant for your trading profit?

To add comments, please log in or register
Order the development and track its status via your mobile phone.
auto9817
55
auto9817 2013.12.31 13:04 

Hi all.

From some backtesting results, I found that knowing cost per trade is really important in boosting your profit with trading strategy.

So I am determined to learn how to calculate cost per trade. I would be really appreciate if someone could double confirm my way of calculation.

 

Let's say we buy EURUSD of 0.1 lot. Then I would calculate:

 

Cost per trade =  spread * lot Size * tick value (pip value) * contract size.

 

So in this example for EURUSD,  Cost per trade = 0.1 * 0.605561 * 100000 * 0.00012 if we assume the spread is 0.00012 and pip value is 0.60551 and contract size is 100000.

 

So we will lose 0.42389 dollar for every trade using 0.1 lot. As the way to calculate is not documented anywhere, I am really anxious if my calculation is correct.

 

It will be really appreciated if any of experienced trader can clarify the calculation. Also some direction on piece of code will be great if someone already have done this before in MQL5.

 

Kind regards, 

Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Symbol Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Symbol Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Symbol Properties - Documentation on MQL5
Dua Yong Rew
5424
Dua Yong Rew 2013.12.31 14:59  

what is the cost per pip with 0.01 lot size

example $0.10 per pip using 0.01 lot size

10 pips is = $1.00 which spread is already factor in if you see it from the terminal. 

Simon Gniadkowski
Moderator
18001
Simon Gniadkowski 2013.12.31 15:37  
doshur:

what is the cost per pip with 0.01 lot size

example $0.10 per pip using 0.01 lot size

10 pips is = $1.00 which spread is already factor in if you see it from the terminal. 

Only for XXXAccountCurrency symbols . . .
auto9817
55
auto9817 2013.12.31 19:00  
doshur:

what is the cost per pip with 0.01 lot size

example $0.10 per pip using 0.01 lot size

10 pips is = $1.00 which spread is already factor in if you see it from the terminal.  

The pip value for EURUSD is 0.605561 when you trade 1.0 lot at the moment from metatrader 5 built in market function. Just curious if this pip value is keep changing each seconds with spread. If that is case, then it would be very difficult to calculate true cost per trade using simple formula for many trades. Then your calculation can be just approximation for past trades. I am concern this a lot as I am trying to mathematically estimate  how much I am losing if I trade ,  let's say, 500 trades per month. Any scalping can be useless if the cost per trade is too high.
Simon Gniadkowski
Moderator
18001
Simon Gniadkowski 2014.01.01 00:21  
auto9817:
The pip value for EURUSD is 0.605561 when you trade 1.0 lot at the moment from metatrader 5 built in market function. Just curious if this pip value is keep changing each seconds with spread. If that is case, then it would be very difficult to calculate true cost per trade using simple formula for many trades. Then your calculation can be just approximation for past trades. I am concern this a lot as I am trying to mathematically estimate  how much I am losing if I trade ,  let's say, 500 trades per month. Any scalping can be useless if the cost per trade is too high.
What is you account currency ?  it isn't USD . . 
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Account Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Account Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Account Properties - Documentation on MQL5
auto9817
55
auto9817 2014.01.01 01:34  
RaptorUK:
What is you account currency ?  it isn't USD . . 
In my strategy tester, the account currency is set to GBP (Great British Pound).
Simon Gniadkowski
Moderator
18001
Simon Gniadkowski 2014.01.01 11:49  
auto9817:
In my strategy tester, the account currency is set to GBP (Great British Pound).

This is why doshur's  solution doesn't work. It only works for XXXAccountCurrency symbols,  so for you it would work on XXXGBP symbols such as EURGBP

I don't think you need the contract size in your calculation,  it helps in the case in your first post because you use the wrong value for spread.  Tick value is given per point so spread must also be specified in points . . . so

 

Cost per trade =  spread(points) * lot Size * tick value (per point)  = 12 * 0.1 * 0.605561  =   0.7266732  Note:  your original calculation does not give 0.42389

Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Symbol Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Symbol Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Symbol Properties - Documentation on MQL5
auto9817
55
auto9817 2014.01.01 20:25  
RaptorUK:

This is why doshur's  solution doesn't work. It only works for XXXAccountCurrency symbols,  so for you it would work on XXXGBP symbols such as EURGBP

I don't think you need the contract size in your calculation,  it helps in the case in your first post because you use the wrong value for spread.  Tick value is given per point so spread must also be specified in points . . . so

 

Cost per trade =  spread(points) * lot Size * tick value (per point)  = 12 * 0.1 * 0.605561  =   0.7266732  Note:  your original calculation does not give 0.42389

Thanks so much for the clarification. Confidence is increasing when someone confirm the calculation.

To complete my question, let's say I go "buy" on EURUSD at open price of 1.37782. Then I close the buy order at price of 1.37878.

Using your formula to calculate cost per trade and for GBP account,  

my profit will be like this: {pip gains (points) * lot size * tick value per point} - {spread(points) * lot Size * tick value per point} = {(1.37878 - 1.37782) /0. 00001  * 0.1 * 0.605561} - { 12 * 0.1 * 0.605561 } = {96 * 0.1 * 0.605561} - { 12 * 0.1 * 0.605561 } = 5.81 - 0.7266732 = 5.08833268.

Also curious if this will hold the same for the CHFJPY or CADJPY pair with 0.001 tick size instead of 0.00001 tick size.

To add comments, please log in or register