
05-15-2006, 12:14 PM
|
 |
Senior Member
|
|
Join Date: Oct 2005
Posts: 987
|
|
Quote:
|
Originally Posted by timbo
Hi guys,
Wondering if anyone can help me out - I'm trying to write an EA that will be attached to the EURUSD chart, but want it occasionally to place a USDCHF trade as well as the EURUSD ones. Is this possible? I tried the following code:
OrderSend("USDCHF",OP_BUY,Lots,Ask,3,StopLoss*Poin t,TakeProfit*Point,"UC",55555,0,Green)
But I kept getting the message "unknown symbol name USDCHF for OrderSend function". Is this because the EA is attached to the EURUSD chart? And is there any way to tell the EA to buy a different currency (and then later to close it)?
Any suggestions would be very appreciated! (Oh, and does anyone know of an EA that does this? I find it helpful to look at the code of working EA's when I'm struggling with a problem.)
Tim
|
Tim,
I'm writing right now an article about this issue, please check it at:
http://www.metatrader.info/node/124
|