Mt4 Error Code 130
Contents |
Page Last Post Printable Version Similar Threads EA error message (0) no error 6 replies Fixing CCI histogram in my EA 6 replies Need help fixing this indicator 1 reply
Ordersend Error 130 Mql4
MT4 EA error- when placing trade getting error 0 rate on ask ordermodify error 1 3 replies ATR indicator needs fixing 2 replies Platform Tech / Reply to Thread Subscribe Fixing Error 130 - mql4 ordermodify error 130 MT4 Post #1 Quote First Post: Feb 19, 2013 11:47am Feb 19, 2013 11:47am trumpjr | Joined Feb 2010 | Status: Member | 15 Posts I am receiving error 130 when
Order Modify Error 130
I run my EA. Below is the code for buying: Inserted Code ticket=OrderSend(Symbol(),OP_BUYSTOP,Lots,HighBar1+BuySellBuffer*PointFive,3,0,0,"My EA",12345,0,Green); if(ticket>0) { if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice()); OrderModify(OrderTicket(),OrderOpenPrice(),HighBar1-HighMinusLow-(StopBuffer*PointFive),HighBar1+TakeProfit2,0,Green); } else Print("Error opening SELL order : ",GetLastError()); return(0); The reason I am getting error 130 is that this places a buy stop two pips above the previous bar. When a candle closes near the high is when I
Mql4 Error Codes
get this error and sometimes the order never fills. Any ideas on how I could make this work when this happens? Post #2 Quote Feb 19, 2013 12:34pm Feb 19, 2013 12:34pm fxtr51 Joined Jan 2010 | Status: Member | 1,163 Posts If you insert "error 130 mt4" into google, you will get more than 60.000 hits. I picked 2 : http://thetrademachine.com/blog/2010...d-stops-error/ http://www.earnforex.com/blog/2008/1...30-what-to-do/ Post #3 Quote Feb 19, 2013 12:39pm Feb 19, 2013 12:39pm trumpjr | Joined Feb 2010 | Status: Member | 15 Posts These are not solutions to the problem. I understand what the problem is, I don't know how to code it to resolve it. I get error 130 because of the fact that my open price on my buy stop is to close to my current price. If the price continues to go up will never get filled. What I'm wondering is there a way to increase the open price by X amount when this happens until it gets filled? Post #4 Quote Edited at 3:08pm Feb 19, 2013 2:17pm | Edited at 3:08pm fxtr51 Joined Jan 2010 | Stat
and Regulations (1) Setup (6) Trading Education (8) Ordersend Error 130 - Invalid Stops Error If you are getting the Metatrader error: Ordersend Error 130, it could mean a few different things are going wrong. First, it might mean your stop loss is too close to the market price. Second, it might mean your take profit is too close to the market price. And Third, if you are placing a pending order, you might be trying to place it too close to the market price. What should you do? Because there are many different forex brokers with different account types out there, you have to check the current account's market info within your expert advisor to find out the minimum stop level distance you have. Some accounts are 3 pips, while others might be 15 pips. The function you will use is called MarketInfo(). It requires two parameters, SYMBOL & TYPE. SYMBOL is the currency pair or security you want to access and TYPE is the request identifier to specify the account info you wish to return. Since we are looking for the minimum stop level, we will use the type, MODE_STOPLEVEL. double MarketInfo (string symbol, int type) EXAMPLE: int MinStopDist = MarketInfo("EURUSD",MODE_STOPLEVEL); Once you have this data, you want to make sure you do not try to place stop losses or take profits closer than this minimum distance from the market price. Additionally, you do not want to try to place pending orders closer than this distance from the current market price. If you are using an expert advisor that you do not have the source code for, you will want to look in the input value settings and see if there is a stop loss or minimum stop loss setting that you can change. This entry was posted on Wednesday, January 6th, 2010 at 9:34 am and is filed under Metatrader. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed. Next Post: Breakout and Fade Trading Applications – Follow up to