Error Open Buy Order 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 MT4 EA error- when placing trade getting error 0 rate on ask 3 replies
Ordersend Error 130 Mql4
ATR indicator needs fixing 2 replies Platform Tech / Reply to Thread Subscribe Fixing Error 130 ordermodify error 1 - MT4 Post #1 Quote First Post: Feb 19, 2013 11:47am Feb 19, 2013 11:47am trumpjr | Joined Feb 2010 | Status: Member
Mql4 Ordermodify Error 130
| 15 Posts I am receiving error 130 when 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 order modify error 130 : ",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 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 ordersend error 4107 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 | Status: Member | 1,163 Posts Quoting trumpjr Disliked 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? Ign
log in or register Find and download Code Base apps via MetaTrader. It is fast! 114332 Forex Trader 2008.11.09 19:38 I am receiving an error when attempting to open a
Mql4 Error Codes
Long position: OrderSend Error 130 Error Opening Long Order: 130 Here ordersend error 134 is the code, which was modified from a expert advisor that can open trades without error.
Ordersend Error 138
So I'm not sure why I'm receiving this error. if(BarClose
Bitcoin FX Brokers PAMM Forex Brokers Brokers for US Traders Brokers for Scalping Low Spreads Brokers Zero Spread Brokers Micro-Forex Brokers With Cent Aunts cTrader Forex Brokers UK Forex Brokers Swiss FX Brokers Brokers from Canada Spread Betting Brokers New Forex Brokers Forums Search Forums Recent Posts Members Notable Members http://www.earnforex.com/forum/threads/error-opening-sell-order-130.816/ Current Visitors Recent Activity New Profile Posts Search Log in or Sign up Forex Forum - EarnForex EarnForex.com Forums > Trading Platforms > MetaTrader Expert Advisors > Error opening SELL order:130 Discussion in 'MetaTrader Expert Advisors' started by pepe, Apr 28, 2009. http://ameblo.jp/oregano-blog/entry-11277689977.html Apr 28, 2009 #1 pepe Active Trader 3 0 32 hello chaps, I was just testing MACD EA scripts, but I'm getting error 130 all the time, is it becuase Im on demo version of LConnection MT4 platform ? thanks in error 1 advance. pepe pepe, Apr 28, 2009 #1 Apr 28, 2009 #2 Enivid Administrator Staff Member 3,532 74 79 It's because your takeprofit or stoploss are to close to the open or current market prices. Please respect the Forum Rules and the Signature Rules. Enivid, Apr 28, 2009 #2 Apr 28, 2009 #3 pepe Active Trader 3 0 32 Thanks Enivid, But whats the nominal value to be used for takeprofit/stoploss if we executing the EA. pepe, Apr 28, 2009 ordermodify error 1 #3 Apr 28, 2009 #4 Enivid Administrator Staff Member 3,532 74 79 pepe said: ↑ Thanks Enivid, But whats the nominal value to be used for takeprofit/stoploss if we executing the EA.Click to expand... That depends on the EA, broker and the currency pair. I wouldn't recommend setting stop-loss or take-profit lower than 10 pips for EUR/USD. On the other hand if you trade with a broker with 6-digit quotes (like 1.30023 instead of 1.3002) you need to multiply your SL and TP by 10. Please respect the Forum Rules and the Signature Rules. Enivid, Apr 28, 2009 #4 Apr 28, 2009 #5 pepe Active Trader 3 0 32 Thanks Enivid, I check that and would revert. pepe, Apr 28, 2009 #5 May 21, 2009 #6 FXCode Active Trader 5 0 32 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 FXCode, May 21, 2009 #6 Jan 18, 2011 #7 ethanlim Trader 1 0 12 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; er
記事一覧 画像一覧 スプレッドを取得す・・・ meta edit・・・ OrderSend()実行時にリミットやストップを設定するとエラー(130)が発生する。mt4 2012-06-14 23:02:44 テーマ: mt4 fx mt4のEAでポジション取得関数のOrderSend()を使って、成行や指値注文のテストを色々やっていたのですが、リミットやストップを設定したときにエラーが発生して注文が通らない事がありました。GetLastError()でエラーを拾ってみると、130 Invalid stops。(自分の場合、環境はサイバーエージェントのmt4です) これについて検索してみたら、同じような事を書いてる人をちらほら発見。 ・待望のMetaTrader4 Proactiveが稼動したのですが・・ ・ ・OrderSend error 130 というエラーが発生しました また、OrderSend()のリファレンスにも書いてありました。 StopLoss and TakeProfit levels cannot be too close to the market. The minimal distance of stop levels in points can be obtained using the MarketInfo() function with MODE_STOPLEVEL parameter. In the case of erroneous or unnormalized stop levels, the error 130 (ERR_INVALID_STOPS) will be generated. At placing of a pending order, the open price cannot be too close to the market. The minimal distance of the pending price from the current market one in points can be obtained using the MarketInfo() function with the MODE_STOPLEVEL parameter. In case of false open price of a pending order, the error 130 (ERR_INVALID_STOPS) will be generated. 対策としては、最初はリミットとストップを設定しないでOrderSend()を実行し、その後、OrderModify()でリミットとストップを設定して注文を更新する。 ・MetaTrader4 Proactiveへの対応 プログラミング、MT4初心者のためのおすすめ本の紹介。 ・mt4の入門、使い方、eaプログラミングのさわりなら(サイバーエージェントのmt4について詳しく説明) めちゃくちゃ売れてるマネー誌