Scripts: Spread and Pip Cost Checker

 

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

 
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
 

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 :) 

 
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.

 
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.

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

Cheers
 

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. 

 
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.

 

Thanks for your support. Bug fixed!

 

Hello, 

 

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

Best Regards. 

 

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

Any Ideas?

Regards. 

Reason: