Download MetaTrader 5

Scripts: Spread and Pip Cost Checker

To add comments, please log in or register
Automated-Trading
Admin
110993
Automated-Trading  

Spread and Pip Cost Checker:

This script show you current currency pairs spread, pip value in your account currency and the total cost of the spread to open a position.

Fig. 3. Script output

Author: Mobarak Ali

chris4207
5
chris4207  
I think the spread cost is off by 1 decimal place, along with the spread. In the example above, the spread is 8.4 pips, not 84 pips. and the cost should be 6.972 USD, not 69.72 USD. Not that big a deal though. Thanks for the script
Stuart Browne
6921
Stuart Browne  

The pip value calculation is also not quite correct. It should be:

double PipValue=(((MarketInfo(Symbol(),MODE_TICKVALUE)*point)/MarketInfo(Symbol(),MODE_TICKSIZE))*LotSize);

point is calculated based on 4 or 5 digit broker:

   point=Point;
   if((Digits==3) || (Digits==5))
     {
      point*=10;
     }

 

Which will also stop the problem Chris had above.

Besides that, thanks for the script mate :) 

Mobarak Ali
6412
Mobarak Ali  
chris4207:
I think the spread cost is off by 1 decimal place, along with the spread. In the example above, the spread is 8.4 pips, not 84 pips. and the cost should be 6.972 USD, not 69.72 USD. Not that big a deal though. Thanks for the script

Hi Chris,

I take that screenshot when market was close. That's why spread was high.

I think now you get it.

Mobarak Ali
6412
Mobarak Ali  
Filter:

The pip value calculation is also not quite correct. It should be:

point is calculated based on 4 or 5 digit broker:

 

Which will also stop the problem Chris had above.

Besides that, thanks for the script mate :) 

Hi Filter,

It's open source script. Why you don't check the script.

I am sure in this script you can't find out any wrong.

Stuart Browne
6921
Stuart Browne  
No problem, just trying to help you out. Up to you if you want to fix it or not

Cheers
mansk
10
mansk  

To the next version, I think if you add the volume to the chart, can help to remember for wich volume is the cost information.

 Thanks for this script. 

Alain Verleyen
Moderator
29859
Alain Verleyen  
Mobarak:

Hi Filter,

It's open source script. Why you don't check the script.

I am sure in this script you can't find out any wrong.

Of course it's buggy, it only works on some trading environments, not all.

I suggest you to read and understand constructive remarks from Filter.

Mobarak Ali
6412
Mobarak Ali  

Thanks for your support. Bug fixed!

Eddy Cronen
7
Eddy Cronen  

Hello, 

 

Thanks for this Indicator, but...it's possible isn't working now?

Best Regards. 

Pierre
61
Pierre  

I have nothing showing on screen, won't even load. 

Any Ideas?

Regards. 

To add comments, please log in or register