EA between computers - page 2

 
dukeb:

 I closed the previous trade.  At your request I have opened two new trades. Is this what you need?  

Yes,  thank you . . .  I guess I'll have to eat my virtual hat after all . . .  and say sorry.

One possible thing that might explain it,  can you give the Build numbers of the MT4 terminals from the PC that works and from the PC that doesn't work . . .  my suspicion is that the one that works is the latest build and the one that doesn't is an older build.  

 
RaptorUK:

Yes,  thank you . . .  I guess I'll have to eat my virtual hat after all . . .  and say sorry.

One possible thing that might explain it,  can you give the Build numbers of the MT4 terminals from the PC that works and from the PC that doesn't work . . .  my suspicion is that the one that works is the latest build and the one that doesn't is an older build.  

 

The build is the same --

Meta Trader Alpari (US)

Version 4.00 Build 482

(8 Mar 2013)

Can there be some setting that I am forgetting?  I just can't believe that I am the only person experiencing this.  However, I do feel fortunate that opens both orders on one of my computers.  If you can think of anything or recommend as resource, I would be very grateful. 

 
dukeb:

 

The build is the same --

Meta Trader Alpari (US)

Version 4.00 Build 482

(8 Mar 2013)

Can there be some setting that I am forgetting?  I just can't believe that I am the only person experiencing this.  However, I do feel fortunate that opens both orders on one of my computers.  If you can think of anything or recommend as resource, I would be very grateful. 

Your code as posted in this thread cannot work as you are finding it does . . .  but it does,  it's not something you have done,  it just shouldn't work.  There was a big change made for Build 482 and I assumed it was due to that change that it was working,  but if its working on  one PC and not the other and they have the same Build . . .  well then I am stumped.

Instead of using Bid for the trade on the symbol that is not the same as the chart that the EA is on you should use the following . . .

MarketInfo(Symbolx, MODE_BID)

  . . .  and that will get the correct current Bid price for that symbol whatever chart the EA is running on.

 
RaptorUK:

Your code as posted in this thread cannot work as you are finding it does . . .  but it does,  it's not something you have done,  it just shouldn't work.  There was a big change made for Build 482 and I assumed it was due to that change that it was working,  but if its working on  one PC and not the other and they have the same Build . . .  well them I am stumped.

Instead of using Bid for the trade on the symbol that is not the same as the chart that the EA is on you should use the following . . .

  . . .  and that will get the correct current Bid price for that symbol whatever chart the EA is running on.

 

 

Reply:

This works perfectly.  Thank you very much.  I am very grateful... 

 
RaptorUK:


It's not possible.  Perhaps you had an existing order open on the other symbol.

If you want to know if it happened or not look through the log file and find the entry that shows where the EURUSD and USDCHF orders were placed,  post it here and I will eat a virtual hat and apologise. 

Well it seems that build 482 now makes this possible,  it also makes it possible to have an EA on GBPUSD and place Sell trades at Bid on EURUSD and USDCHF . . .  I can also do this . . . 

      intTicket=OrderSend(Symbol1,OP_SELL,Lots,   10000,    MaxSpread,0,0,0,0,0);
      if (intTicket<0)
      {
        Print("Order Open failed." + Symbol1 + " order number: ", OrderTicket(), " Error: ", GetLastError() );  // <-- if the Order Open failed print some helpful information 
          return;
      
      }
      intTicket=OrderSend(Symbol2,OP_SELL,Lots,  10000 MaxSpread,0,0,0,0,0);

 an I get 2 orders placed and no errors returned . . .

 
RaptorUK:

Your code as posted in this thread cannot work as you are finding it does . . .  but it does,  it's not something you have done,  it just shouldn't work.  There was a big change made for Build 482 and I assumed it was due to that change that it was working,  but if its working on  one PC and not the other and they have the same Build . . .  well then I am stumped.

Perhaps the change in Build 482 that is causing this issue is not in the client side but the server side . . .  and the Server that the PC was connecting to, where one of the trades failed,  was a Server running an older build of the Server software  ? 
 
RaptorUK:

Well it seems that build 482 now makes this possible,  it also makes it possible to have an EA on GBPUSD and place Sell trades at Bid on EURUSD and USDCHF . . .  I can also do this . . . 

 an I get 2 orders placed and no errors returned . . .

 

My test code is attached.

Files:
Reason: