[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 536

 

Please help, advisor can't close an order, it says error 138

The code to close the order below, the idea is to close the order if

1) if in a buy order the price went up and did not reach TP but went down (by 15 pips)

2) During a sell order, the price went down, but did not reach TP (by 15 points)

if (OrdersTotal()>0)
{
OrderSelect(OrdersTotal()-1,SELECT_BY_POS);
if ((OrderType()==OP_BUY)&&(Close[0]>BUY_HIGH))
{
BUY_HIGH=Close[0];
}
if ((OrderType()==OP_SELL)&&(Close[0]<SELL_LOW))
{
SELL_LOW=Close[0];
}
if (((OrderType()==OP_BUY)&&(BUY_HIGH-Close[0]>15*Point))||((OrderType()==OP_BUY)&&(Open[0]>Close[0]+15*Point)))
{
OrderClose(OrderTicket(),OrderLots(),OrderOpenPrice(),5);
}
if (((OrderType()==OP_SELL)&&(Close[0]-SELL_LOW>15*Point))||((OrderType()==OP_SELL)&&(Open[0]<Close[0]-15*Point)))
{
OrderClose(OrderTicket(),OrderLots(),OrderOpenPrice(),5);
}
}

 
Hi all, does anyone happen to have a deal copier from MT4 to MT5 or a link, you can even use a file(execution time up to 10 seconds is not critical). I've got only from MT4 to MT4 or from MT5 to MT4...
 
LazarevDenis:

Please help, advisor cannot close order, error 138


1. use the SRC button to enter the code

2. what does this error mean

3. At what price do you want to close the order?

 
Vinin:


Can't you do it yourself?

And we will support!!!


What a radish :)

Done :) https://www.mql5.com/ru/forum/134688 and https://www.mql5.com/ru/forum/134689

 

Zdravstvuete !

Vopros takoj, Kak v sovetnike zapisatj, shto bi otkritij order zakrivalsja cherez 5 minut, nevazno pljusom on ili minusom.?

Zaranie blogadaren.

 

You're the rascal, because you didn't finish what you started. You should also write in both old threads to write in the new ones. You can do it in red. In doing so, write the addresses of the new branches in the old ones, and in the new ones - the addresses of the old ones, for your reference.

 

All further posts will be deleted!!!

Write in a new thread

 

Good afternoon, dear forum members. Please don't get hurt, I'm just writing my thesis and want to do some sociological research. For sure there are people who have bought EAs once or several times. Please tell us, what criteria were important and crucial for you when buying? For example, it may be:

-type of Expert Advisor (trend, sesh, martingale, scalper...)

-History in the strategy tester

-some specific functions of the Expert Advisor

-detailed description of how the EA works and how it is set up

-seller rating

- EA price

-campaigns and discounts

Or maybe something else.

And were you happy with your purchase?

Thank you very much for your understanding and answers

 
Good afternoon
need a hint


if(Send_Notification&&TimeCurrent()>=time+10) {time=TimeCurrent();SendNotification('BUY');} this is what I wrote
I need the notifications to go no more than 10 seconds
and then just stop until the next signal
what is wrong with notifications not stopping?
can you suggest?
is it just about the sign more less?

 

Hello, I have a couple thousand $ free I think to try investing in the Forex market can someone to help, advise where to start, I would consider an option to give an account or money in management with a very good percentage, I do not have much time to give it, so I wanted to give my money in good hands!