Serving Traders Since 2005
|
|
|
|||||||
| MetaTrader Expert Advisors Post and discuss the MetaTrader expert advisors here. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
It is possible that because the 5 digit price change in several brokers, your StopLoss\TakeProfit are too close to price and therefore you cannot enter.
If you post your code here I'll have a look.
__________________
FXCode Inc. MQL Developer Custom Indicators & Expert Advisors Development |
|
||||
|
Hi, sorry I also having OrderSend error 130
Hopefully someone can help Below is my code void oo(string ord) { int error; int limit = 2500; int stop = 500; int lot = 1; int slip = 5; string ea_comment = ""; if (ord=="Buy" ) { ea_comment=ea_name+" Buy Order Number: "+order_count; error=OrderSend(Symbol(),OP_BUY,lot,Bid,slip,Norma lizeDouble(Ask-stop*Point,5),NormalizeDouble(Ask+limit*Point,5),e a_comment,1011); } else if (ord=="Sell") { ea_comment=ea_name+" Sell Order Number: "+order_count; error=OrderSend(Symbol(),OP_SELL,lot,Ask,slip,Norm alizeDouble(Bid+stop*Point,5),NormalizeDouble(Bid-limit*Point,5),ea_comment,1021); } if (error==-1) //operation failed { ShowERROR(error,0,0); } return; } |
|
||||
|
It looks like you are trying to buy at Bid and sell at Ask, while it should be vice versa.
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 3 (0 members and 3 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strategy Testing - Buy Sell from CSV | H0bkwPiZGhZI | MetaTrader Expert Advisors | 1 | 25th September 2009 04:58 |
| Need help in writing ea - Time factor to close order | peterngkl@gmail.com | MetaTrader Expert Advisors | 0 | 26th August 2009 15:49 |
| SECRET METHOD Trade Stocks 15 Min. On The Opening - www.ih8.net/a6c438 | samjackie | Advertisements | 1 | 29th July 2009 12:41 |
| Sell signal on weekly USD/JPY | Lucien | Technical Analysis | 0 | 22nd May 2009 23:26 |