How to optimize EA for 5 Digit Brokers?

 

Hi,

Firstly apologies if this seems a "Newbie" question, but I have googled the hell out of this and cant find anything substantial to go on.

I have created a basic EA using the build on the URL below - http://sufx.core.t3-ism.net

I got it up and running last night and it made a couple of trades, however it seemed that when it opened the positions the spreads were huge (26 Pips), i.e it instantly went 26 pips in to the red.

I am using a 5 digit broker and I would have expected the spread to have been possibly 2.6 pips - Could this be something to do with the fact that the EA is calculating the number of digits incorrectly?

Any advice/help would be appreciated,

Regards

Mitch

 
//~~~~~~~~~~~~~
extern int My_MaxSpread=5;
//~~~~~~~~~~~~~
int     Bkr_Spread;
int     Point_Int;
//~~~~~~~~~~~~~
void start(){
    Bkr_Spread=     MarketInfo(Symbol(),MODE_SPREAD);
    Point_Int=1;    if(Digits==3 || Digits==5){Point_Int=10;}
    if(Bkr_Spread>My_MaxSpread*Point_Int){
        Print("Refuse to trade at such High-Spreads"); return(0);
}   }
//~~~~~~~~~~~~~
 
mdawson:

Hi,

Firstly apologies if this seems a "Newbie" question, but I have googled the hell out of this and cant find anything substantial to go on.

Learn how to use Google better . . .

4/5 digits

 
ubzen:


Hi Ubzen,

Thank you very much for taking the time to respond, can i place the code you have provided anywhere within my EA? Does it need to go in at any particular position?

Regards

Mitch

 
RaptorUK:

Learn how to use Google better . . .

4/5 digits


Thanks for the info RaptorUK, duly noted :-)
Reason: