Modifications for 5 Decimal Broker

 

Hello All:

I have a successful EA running on an FXDD MT4 (which is a 4 decimal broker), and have recently imported the EA into the PFG MT4 (a 5 decimal broker), and for the life of me can't get a backtest out of the platform.

One thing I notice is that in the FXDD platform you can import the data from metaquotes in the history center but with the PFG platform, the only way to get additional data is to import the Alpari data ( I get several mismatched chart errors and no trades with the data).

My question is are there any predefined variables or functions that need to be converted (using point function)?

Any insight into this issue would be much appreciated.

Thanks all,

Happy Trading

Pat

 
FXpipclash:

Hello All:

I have a successful EA running on an FXDD MT4 (which is a 4 decimal broker), and have recently imported the EA into the PFG MT4 (a 5 decimal broker), and for the life of me can't get a backtest out of the platform.

One thing I notice is that in the FXDD platform you can import the data from metaquotes in the history center but with the PFG platform, the only way to get additional data is to import the Alpari data ( I get several mismatched chart errors and no trades with the data).

My question is are there any predefined variables or functions that need to be converted (using point function)?

Any insight into this issue would be much appreciated.

Thanks all,

Happy Trading

Pat

1. If you do not wish to change any source code of your EA, just make sure you add an extra zero to all references to pips for a 5 decimal place broker. eg if yr take profit was 40 pips, u need to put in 400 in a 5 decimal place system. If you EA has not hardcoded any other values, you are fine just doing this. (Some EAs hardcode values like Slippage=3 or Spread=2 -> these have to be chaned to 30 and 20 respectively.)


2. If you wish to remain the same ie not wanting to add an extra zero and you have access to the source code of your EA, then you can do something like this


double mypoint()

{

if (Point ==0.001 return (0.01)

if (Point ==0.00001 return (0.0001)

}

and dont use Point anymore but use yr new function mypoint eg Ask+Takeprofit*mypoint

note: codes are not exact mql4 codes

Reason: