EA Coding Help, Please!!

 

Dear fellow trader

I got this EA somewhere on the Internet. It closes to my trading condition but not exactly what I want. So, I've to modified it for almost a month and not success. I'm not a programmer. Now, the EA was compiled OK but it doesnot close any position. I have no idea how to fix it. I change the closing rule to my trading condition. Now, could anyone kindly look what is wrong inside? why it doesn't close position? and how do I fix it? Thank you so much.

Files:
 
Bluefriday:

Dear fellow trader

I got this EA somewhere on the Internet. It closes to my trading condition but not exactly what I want. So, I've to modified it for almost a month and not success. I'm not a programmer. Now, the EA was compiled OK but it doesnot close any position. I have no idea how to fix it. I change the closing rule to my trading condition. Now, could anyone kindly look what is wrong inside? why it doesn't close position? and how do I fix it? Thank you so much.

Why are you using these lines :

      if(OrderSelect(j,SELECT_BY_POS,MODE_TRADES)==true) break;
That means "if there is no error, quit" and none of the code in the blocks after that is executed
 
mladen:

Why are you using these lines :

      if(OrderSelect(j,SELECT_BY_POS,MODE_TRADES)==true) break;
That means "if there is no error, quit" and none of the code in the blocks after that is executed

Thank mladen

The original was set as 'false'. I have no idea because I try both 'true' and 'false'. It's still not working.

 
pls can you help me make an EA of this indicator ple i beg you
 

Dear Mladen


Please help to code EA for this indicator

after pair cross ex EURUSD

(EUR cross to USD upper) then first Divergence green dot appear = BUY
(EUR cross to USD Lower) then first Divergence red dot appear = SELL

Thank a lot and best regard

Reason: