Questions about EA

 

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! 

 

1)

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

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

 2)