Problem running EA on Oanda MT4 Client

 
Hi, I've tried running an EA on Oanda MT4 Client, but it does not trade. I had enabled live trading and all the other settings, and the smiling face is on the chart. I tried it on a demo account with MetaQuote Client, and it works. I searched the forum and someone mentions about 4 vs 5 digits (Oanda using 5 digits) but isn't MetaQuotes server using 5 digits too? There is no error message
 
RaptorUK:

Read these: How to handle 4 and 5 digit Brokers How to place orders with ECN Brokers

Are you checking return values from your OrderSend() calls and reporting any errors ? What are Function return values ? How do I use them ?

USE 0 AS THE MAGIC NUMBER
 
fkokwai:
Hi, I've tried running an EA on Oanda MT4 Client, but it does not trade. I had enabled live trading and all the other settings, and the smiling face is on the chart. I tried it on a demo account with MetaQuote Client, and it works. I searched the forum and someone mentions about 4 vs 5 digits (Oanda using 5 digits) but isn't MetaQuotes server using 5 digits too? There is no error message


I run EAs on Oanda MT4, I've had problems before where pending orders were involved. As mrmedia suggested, use a magic number of 0. MT4 executes orders thru their fxTrade platform. Because of this, when a pending order triggers, they assign a new ticket number and set the magic number to 0 on the open position. I don't know why they do it, i just know that's how it works.

Of course, running with a magic number of 0 will interfere with any positions you opened manually, you could wind up with hedging/fifo issues.

EA's that open positions at market don't have this problem so they should work. I contacted Oanda about this a while ago and they said their official position is they don't support EAs on their MT4 platform.

Reason: