OrderCloseBy and Error #7 - Not Enough Rights

 

I keep getting this error code with my Expert's. What does it mean? I tried several brokers and it happens in all of them. 

 

The curious thing is that after a few dozens of trials/iterations, the orders are finally matched. From this I can say there is nothing wrong with the code. Besides, I tried the script available here and I keep getting the same error. Any ideas? 

 

Hi,

Make sure that your EA code matches either 4 or 5 digit MT4, and also check the minimum Stop level for each pair because they maybe vary from one to another depending on the broker. also, take in account adding the spreads so it fits the minimum limit.

I hope this helps,

Best of luck,

SF

 
scarface:

Hi,

Make sure that your EA code matches either 4 or 5 digit MT4, and also check the minimum Stop level for each pair because they maybe vary from one to another depending on the broker. also, take in account adding the spreads so it fits the minimum limit.

I hope this helps,

Best of luck,

SF



Thanks for your reply. I think those are not the issue. I use the EA in question for several months without problems. A few weeks ago I added the ordercloseby function to make partial closes of open orders in loss. The sequence of procedures is the following: 

-An order is closed with profit (this can be in EURUSD for example)

- It checks if there is any order in loss for more than x periods. Let's assume there is one in USDJPY

- It uses a part of the profit in the first order to close part of the order in loss. For instance, if the profit was 200 and I'm lossing 400 in the second order with 1.0 lots, it opens 0.5 lots in the contrarian direction and the tries to close the second position with newly opened order. This is where I get the error for several dozens of iterations.

 Let me say that doing it manually, I have no problems. It's not a question of digits because the EA was built on this account and works well in every other aspects. It's not a question of stops because I don't use them in any order. I don't believe to be a question of minimum limits because I can do it manually. 

 

Any more ideas?  

 

Edit: Can it have anything to do with having the EA on EURUSD, while he is trying to close partial orders of other pair, being that it is also running parallel in the cart of that second pair? 

 
i suspect u may have used an investor password to log in instead of a main pass word