//~~~~~~~~~~~~~ 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 . . .
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
Thanks for the info RaptorUK, duly noted :-)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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