Only one trade open at once code

 

Hello friends,

Was wondering if anyone could help me adding some code to my expert advisor.

What im looking for is adding a code in my ea which will limit on how many open position.

So if there is an open position, no new trade will be executed before the old position is closed

Would really appreciate if anyone could help me out on this one

Thanks :)

 
Riuzk :

Hello friends,

Was wondering if anyone could help me adding some code to my expert advisor.

What im looking for is adding a code in my ea which will limit on how many open  position.

So if there is an open position, no new trade will be executed before the old position is closed

Would really appreciate if anyone could help me out on this one

Thanks :)

And where is your MQL5 code?

 
Help you with what? You haven't stated a problem, you stated a want.

Show us your attempt (using the CODE button) and state the nature of your problem.
          No free help
          urgent help.

Or pay someone. Top of every page is the link Freelance.
          Hiring to write script - General - MQL5 programming forum

 

Hello Vladimir Karputov, i have attached my EA code in this post.

The EA has 10 different strategy it can open when criteria is right, but my strategy involves only to have 1 trade open at a time. That is why i wanted to add a trade limit into the EA.


And to William Roeder:

Correct i dont have a problem but looking for someone to help me adding code to my existing EA, apologize if my previous comment sounds very demanding.


Thanks, and good weekend everybody :)

Files:
Portfolio_.mq4  47 kb
 
Riuzk :


Sorry, but you are posting on the MQL5 forum. You write in the main section of the MQL5 forum - which is why I asked, "Do you have MQL5 code?"

Please, if you have a question about the old terminal - indicate this in the title of the topic and write in a special section for the old terminal:  MQL4 and MetaTrader 4

 
Ohh, apologize for posting in the wrong section.
 
Riuzk:
Ohh, apologize for posting in the wrong section.
I would love to help write the MQL5 code.  But this time nothing will work.  Sorry.
Reason: