[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 1042
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello, guys,
Please tell me why the pending order does not work, all parameters are correct, writes wrong stops, if I put a stop, it opens, if I write it down gives out an error 130, but no error in the writing, what is the problem?????? thank you all!!!
int OrdSen_1;
int start()
{
OrdSen_1=OrderSend(Symbol(), OP_BUYSTOP, 0.01, Ask+25, 3, Bid+(25-40)*Point, Ask+(25+40)*Point);
}
Dear guys, can you explain why in this code (closing orders) the order is first selected by SELECT_BY_POS,
and then the same order is SELECT_BY_TICKET ? how does it work?
Print (Symbol(), " START CLOSING BUY LINE");
string symbol = Symbol();int cnt;
for(cnt = OrdersTotal(); cnt >= 0; cnt--){
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if(OrderSymbol() == symbol && OrderMagicNumber()==Magicbuy) {
ticketbuy=OrderTicket();OrderSelect(ticketbuy, SELECT_BY_TICKET, MODE_TRADES);lotsbuy2=OrderLots() ;
double bid = MarketInfo(symbol,MODE_BID);
RefreshRates();
OrderClose(ticketbuy,lotsbuy2,bid,3,Magenta);
}
You look through the open and pending orders in order of position number in the list, select the one you are interested in and fetch its ticket
and continue working with the ticket.
Hello, guys,
advise why the pending order does not work, all parameters are correct, writes not correct stops, if I put stops, it opens, if I write it down gives out an error 130, but no error in the writing, what is the problem?????? thank you all!!!
int OrdSen_1;
int start()
{
OrdSen_1=OrderSend(Symbol(), OP_BUYSTOP, 0.01, Ask+25, 3, Bid+(25-40)*Point, Ask+(25+40)*Point);
}
Ask+25
StopLoss and TakeProfit prices cannot be too close to the market. The minimum stop distance in pips can be obtained using the MarketInfo() function with the MODE_STOPLEVEL parameter. Error 130 (ERR_INVALID_STOPS) is generated in case of erroneous or non-normalized stops.
When placing a pending order, the opening price cannot be too close to the market. The minimum distance of the pending price from the current market price in points can also be obtained by using the MarketInfo() function with the MODE_STOPLEVEL parameter. If the pending order opens at an incorrect price, error 130 (ERR_INVALID_STOPS) will be generated.
Ask+25
StopLoss and TakeProfit cannot be too close to the market. The minimum stop distance in pips can be obtained using the MarketInfo() function with the MODE_STOPLEVEL parameter. Error 130 (ERR_INVALID_STOPS) is generated in case of erroneous or non-normalized stops.
When setting a pending order, the opening price cannot be too close to the market. The minimum distance of the pending price from the current market price in points can also be obtained using the MarketInfo() function with the MODE_STOPLEVEL parameter. If the pending order opens at an incorrect price, error 130 (ERR_INVALID_STOPS) will be generated.
When I open an OP_BUYSTOP . OP_BUYLIMIT, etc. All is normal even when close to the market, but when OP_BUY wrong stops, although all is correct, have tried all combinations and values are all valid, also read on another forum that "there are different demos:-demo, -ndd-demo, -ecn-demo. If 2 or 3, then there is market execution, i.e., first you open an order without any stops, and the following command (OrderModify) sets the stops." I have a regular demo created via MT4 and always gives the same server, so there are no options. how do i check whether i have the right account and what the error is in the end?????
And on the other computer order triggered, if my memory does not change, does it work with you or also error 130.?!!!
Thank you.
Hello! I can't understand why the indicator draws arrows before crossing the wands. The indicator is not mine, trying to "read" the code. I think there is a bug. I think there is a bug. If you have time and it's not too much trouble, please comment)))
Who knows how to draw a straight line (a ray from zero) between points so that the sum of the distances from the points to the line on one side equals the sum on the other side?) So that you get a vector.
I used to find the vertical mean and the horizontal mean (of these points) and draw a line through the coordinate, but I think I was told it was wrong
When I open an order OP_BUYSTOP . OP_BUYLIMIT, etc. Everything is normal even when the value is close to the market, but when OP_BUY, the stops are not right, although all is correct, I have tried all combinations and values are all valid. I also read on another forum that "there are different demos:-demo, -ndd-demo, -ecn-demo. If the 2nd or 3rd option is a market execution, i.e. first you open an order without any stops, and the following command (OrderModify) sets the stops." I have a regular demo created via MT4 and always gives out one server, so no options. how do i check if i have the right account and what the error is in the end?????
And on the other computer order triggered, if my memory does not change, does it work with you or also error 130.?!!!!
Thanks.
Open the "New Order" window in MT4, if during "market execution" the SL and TP windows are not active, then your assumption is correct, error 130 will appear.
Hello! I can't understand why the indicator draws arrows before crossing the wands. The indicator is not mine, trying to "read" the code. I think there is a bug. I think there is a bug. Who has time to read it and I don't mind if I do, please comment on it)))
Yes there is a bug. Here is a modification, check it.
Also new version http://forexsystems.ru/indikatory/12345-pomogite-glyuchit-sidus-v-2-a.html
Who knows how to draw a straight line (a ray from zero) between points so that the sum of the distances from the points to the line on one side equals the sum on the other side?) So that you get a vector.
I used to find the vertical mean and the horizontal mean (of these points) and draw a line through the coordinate, but I think I was told it was wrong