Download MetaTrader 5
To add comments, please log in or register
Interested in MQL5 features? Find them in documentation!
Juan Carlos Alcalde
872
Juan Carlos Alcalde 2016.06.09 17:37 

Hi, I have a few questions, hope someone can help me!

1) How to add max spread to the EA?

2) How to lock the EA into one trading account number, and can use only for that account?

Regards and thanks for the help! 

Osama Shaban
1415
Osama Shaban 2016.06.10 11:51  

1)

input int MaxSpread = 30;
...
...
...

int start(){
...
...
...
   int spread = MarketInfo(Symbol(),MODE_SPREAD);  
   if(spread > MaxSpread){
      Comment("Spread is ",IntergetToStr(spread));
      return(0);
   }
...
...
...

 2)

/
To add comments, please log in or register