EA for each currency pair - what code to open only once per currency pair? - page 2

 
grey.unit:
sure i did. When i have an open trade on say EURJPY and I close it manually then maybe another EA opens a trade on another currencypair.
Maybe you don't have enough margin to open 2 orders ?
 

lotsize is 0.1

and accountsize is >3000$

Also, when I remove all order limiting parts of the code it enters tons of trades

 
grey.unit:

Also, when I remove all order limiting parts of the code it enters tons of trades

Greed Is Good.

Just kidding.

NOT.

 
grey.unit:

lotsize is 0.1

and accountsize is >3000$

Also, when I remove all order limiting parts of the code it enters tons of trades

OK, fair enough . . . the code you showed looked OK though . . . as far as I can see from what you posted it should have the desired result.

Although . . . . is this what is in your code or is this a Copy & Paste error . . .

if (Buy_1_1 > Buy_1_2 && CloseBuy1_1 < CloseBuy1_2 && count < 1)   Order   = SIGNAL_BUY;    // Trigger for Buy


if order  == SIGNAL_BUY)

Order vs order ?

 

This is a copy paste error.

i'm trying to figure out what onewithzachy suggested, but it looks more or less the same what we already did, or not?

Should i give my complete EA?

 
grey.unit:


Should i give my complete EA?

That's up to you but it might help find your issue.
 
grey.unit:

This is a copy paste error.

i'm trying to figure out what onewithzachy suggested, but it looks more or less the same what we already did, or not?

Should i give my complete EA?

No. learn my code first - I said learn - run it then get back here.

We'll be somewhere else when you get back :)

 
onewithzachy:

No. learn my code first - I said learn - run it then get back here.

We'll be somewhere else when you get back :)

You might be . . . I have nowhere else to go :-(
 

I deleted the "exit part" of my EA, and now it works like it should be. Have to figure out what's wrong with the exit part, because it also has orderselect() in it. If I can't solve the problem till the end of the week i'm gonna ask you guys again :)

Thanks for the help!

 
RaptorUK:
You might be . . . I have nowhere else to go :-(

Sorry to hear that ...

Hope you have a good time :)

Reason: