Mt4 Ordermodify Error 1
Contents |
OrderModify Modification of characteristics of the previously opened or pending orders. boolOrderModify( intticket,//ticket doubleprice,//price doublestoploss,//stoploss doubletakeprofit,//takeprofit datetimeexpiration,//expiration colorarrow_color//color ordermodify error 130 ); Parameters ticket [in] Unique number of the
Mql4 Ordermodify Error 130
order ticket. price [in] New open price of the pending order. stoploss
Mql4 Error 130
[in] New StopLoss level. takeprofit [in] New TakeProfit level. expiration [in] Pending order expiration time. arrow_color [in] Arrow color for
Mql4 Ordersend Error 130
StopLoss/TakeProfit modifications in the chart. If the parameter is missing or has CLR_NONE value, the arrows will not be shown in the chart. Returned value If the function succeeds, it returns true, otherwise false. To get the detailed error information, call mt4 ordersend error 130 the GetLastError() function. Note Open price and expiration time can be changed only for pending orders. If unchanged values are passed as the function parameters, the error 1 (ERR_NO_RESULT) will be generated. Pending order expiration time can be disabled in some trade servers. In this case, when a non-zero value is specified in the expiration parameter, the error 147 (ERR_TRADE_EXPIRATION_DENIED) will be generated. Example: voidOnStart() { intTrailingStop=50; //---modifiesStopLosspriceforbuyorder№12345 if(TrailingStop>0) { OrderSelect(12345,SELECT_BY_TICKET); if(Bid-OrderOpenPrice()>Point*TrailingStop) { if(OrderStopLoss() Starter AwardsBlack Frame TalentGuess Forex TrendEuro Genius Blog MT5 Portal MT5 Monitoring of traders` accounts Forex news Forex TV Market insideForex chartsForex GamesForex Hunting TraderCatch Money Invite friends From contact list Advanced Search Forum Trading Software MQL Programming OrderModify error orderselect 1 If this is your first visit, be sure to check out the FAQ by mql4 error codes clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing ordersend error 138 messages, select the forum that you want to visit from the selection below. Results 1 to 5 of 5 Thread: OrderModify error 1 Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear https://docs.mql4.com/trading/ordermodify Mode Switch to Hybrid Mode Switch to Threaded Mode 11-19-201409:57 AM #1 TayyabZERO View Profile View Forum Posts Private Message MT5 Rookie I am: ---- Please select a category to choose from: - Cancel Default Category Posts 29 Accumulated bonus 4.00 USD (What is this?) Thanks 2 Thanked 0 Times in 0 Posts OrderModify error 1 I get this "OrderModify error 1" while backtesting an EA I made. It's still in development so http://forum.mt5.com/showthread.php?103675-OrderModify-error-1 there are bound to be some errors. But can someone tell me what the error code means? Reply With Quote 11-20-201405:13 PM #2 mkabira View Profile View Forum Posts Private Message Forex in the blood I am: ---- Please select a category to choose from: - Cancel Default Category Location PAK SIR ZAMEEN Posts 371 Accumulated bonus 82.80 USD (What is this?) Thanks 2 Thanked 20 Times in 16 Posts i think this might be happening because of closed order and any expert advisor can not modify closed order as it is non-realistic. in your order modify condition to use something like this "if(OrdersTotal!=0)" etc... i hope it helps and will resolve your problem. Reply With Quote The Following User Says Thank You to mkabira For This Useful Post: TayyabZERO(01-12-2015) 12-16-201404:11 PM #3 Bao Long View Profile View Forum Posts Private Message It's time to retire! I am: ---- Please select a category to choose from: - Cancel Default Category Location Bandung, Indonesia Posts 23,214 Accumulated bonus 4825.10 USD (What is this?) Thanks 8,947 Thanked 8,023 Times in 5,421 Posts I read from the documentation that error code 1 means the result is unknown. Are you sure you get that error ? Perhaps you can show us the problem in the part of the code. Make sure you use functi here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and http://stackoverflow.com/questions/27240934/modifying-order-returns-error-130 policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags http://www.stevehopwoodforex.com/phpBB3/viewtopic.php?f=15&t=1425 Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only error 1 takes a minute: Sign up Modifying order returns error 130 up vote 1 down vote favorite I'm trying to modify an order, but I keep Error modifying order!, error#130. I'm using an ECN broker, so I need to modify the order to set a stoploss/takeprofit. What I am doing wrong? int digits = MarketInfo( Symbol(), MODE_DIGITS ); if ( digits == ordermodify error 1 2 || digits == 3 ) pipdigits = 0.01; else if ( digits == 4 || digits == 5 ) pipdigits = 0.0001; selltakeprofit = Ask + ( takeprofit * pipdigits ); sellstoploss = Ask - ( stoploss * pipdigits ); ticket = OrderSend( Symbol(), OP_SELL, lotsize, Ask, 100, 0, 0, 0, 0, 0, CLR_NONE ); if ( ticket < 0 ) { Print( "venda Order send failed with error #", GetLastError() ); Print( "stop loss = ", sellstoploss ); } else { Print( "Order send sucesso!!" ); Print( "Balance = ", AccountBalance() ); Print( "Equity = ", AccountEquity() ); bool res = OrderModify( ticket, 0, sellstoploss, selltakeprofit, 0 ); if ( res == false ) { Print( "Error modifying order!, error#", GetLastError() ); Print( "sellstoploss ", sellstoploss ); Print( "selltakeprofit ", selltakeprofit ); Print( "StopLevel ", StopLevel ); Print( "Ask ", Ask ); } else { Print( "Order modified successfully" ); } } mql mql4 share|improve this question edited Dec 13 '14 at 18:39 user3666197 7,85721330 asked Dec 2 '14 at 2:33 Filipe Ferminiano 1,14722046 add a comment| 2 Ans phpBB Group SHF design and coding by milanese based on prosilverSE by subBlue