| / | Forum |
|
Pain
2011.11.16 09:49
void start() { string sym="EURUSD"; OrderSend(sym,OP_BUY,1,Ask,3,0,0,""); } when I attach this code to "GBPUSD" chart, it said Ordersend error 4016, Unknown symbol name EURUSD for Ordersend function. But when I run this code on "EURUSD" Chart, it is fine. WHY? How can I use a diiferent symbol from the one attached for OrderSend function? Thanks |
|
Transferring an Indicator Code into an Expert Advisor Code. Conclusion This is the final article, devoted to transferring an indicator code into an Expert Advisor code. Here the author transforms on a certain example a code of an Expert Advisor so, that this EA is presented in a single file without calling custom indicators. |
|
RaptorUK
2011.11.16 10:04
Two possibilities . . . How can you place a Buy order for EURUSD at the Ask price of GBPUSD ? you need to use MarketInfo and MODE_ASK Are you 100% sure that "EURUSD" is the correct symbol name ? |
|
Pain
2011.11.16 10:21
RaptorUK: Two possibilities . . . How can you place a Buy order for EURUSD at the Ask price of GBPUSD ? you need to use MarketInfo and MODE_ASK Are you 100% sure that "EURUSD" is the correct symbol name ? thanks for reply, I did use MarketInfo() for my code. And I quite sure that is correct symbol name, becaue it can be used in MarketInfo(). |
|
Pain
2011.11.16 10:26
Pain: thanks for reply, I did use MarketInfo() for my code. And I quite sure that is correct symbol name, becaue it can be used in MarketInfo(). |
|
WHRoeder
2011.11.16 14:24
Print out the error code so you find out WHY!
int ticket = OrderSend(...) if (ticket < 0) Alert("OrderSend Failed: ", GetLastError()); |