| / | Forum |
|
behrouz2007
2007.10.25 22:49
I write herein script to open two buy and sell position ,simultaneously. But just
first position trigered and second position did not opened. Please help me
#property link "http://www.metaquotes.net" int g,m=10; int start() { OrderSend(Symbol(),OP_BUY,0.1,Ask,0,Bid-m*Point,0,NULL,0,0,CLR_NONE); OrderSend(Symbol(),OP_SELL,0.1,Bid,0,Ask+m*Point,0,NULL,0,0,CLR_NONE); return(0); } |
|
Error 146 ("Trade context busy") and How to Deal with It The article deals with conflict-free trading of several experts on one МТ 4 Client Terminal. It will be useful for those who have basic command of working with the terminal and programming in MQL 4. |
|
phy
2007.10.25 22:59
What error do you get? int start() |
|
irey2k
2007.10.26 15:08
hi,
this is the error , i am having the same problem "2007.10.26 12:07:44 trade USDCHF,M1: Error on sell = 4109" thanks Michael |
|
phy
2007.10.26 18:00
Uh.... Does your Dealer allow long and short positions at the same time? It opens the long, but not the short? Close the trades manually, try making the SELL before the BUY, see what happens Try making the trades manually, see what happens |
|
behrouz2007
2007.10.26 19:41
I try your script for 20 times. In majority of times the script work with no error
and two hedge positions opened. In two cases ,SELL position opened, but error
number 130 reported with terminal and BUY position did not opened. Thanks
|