Can you tell me how to remove objects created by the indicator in the window when the indicator itself is removed from the chart?
using the special function deinit()
and enumerating the names of all objects in the loop, or if there are few of them, prescribing them separately
bool ObjectDelete(
string name)
Deletes an object with specified name. If deleted successfully, the function returns TRUE, otherwise FALSE. To get more information about the error, call GetLastError() function.
Suppose I have 1 open order and then a second pending order opens, how do I make the take profit of the first order equal to the take profit of the second order? and so on, 1,2=3 1,2,3=4 1,2,3,4=5 ?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Can you tell me how to remove objects created by the indicator in the window when the indicator itself is removed from the chart?
using the special function deinit()
and enumerating the names of all objects in the loop, or if there are few of them, prescribing them separately
To get more information about the error, call GetLastError() function.
ObjectDelete("text_object");--with the special function deinit()--
Thank you!
I'm not kidding, my Expert Advisor really does not work!
The only answer is "it should work", but it does not.
The only answer to this question was "it should work", but it does not.
i think that the problem may be something else?
extern double StopLoss=50.0;
extern double TakeProfit=50.0;
extern double Lots=1;
extern int total;
int start()
{
double Price_1, Price_2, min, max;
RefreshRates();
Price_1=Bid;
Price_2=Ask;
min=iLow(NULL,0,2);
max=iHigh(NULL,0,2);
total=OrdersTotal();
if(total<1)
{
if(Price_1>max)
OrderSend(Symbol(),OP_BUY,Lots,Ask,5,Bid-StopLoss*Point,Ask+TakeProfit*Point,"My order#",16384,0,Green);
if(Price_2<min)
OrderSend(Symbol(),OP_SELL,Lots,Bid,5,Ask+StopLoss*Point,Bid-TakeProfit*Point,"My order#",16384,0,Green);
}
}
return(0);
The smiley is smiling all the time but it is not working, positions are not opening.
I'm not kidding, my Expert Advisor really does not work!
The only answer is "it should work", but it does not.
The only answer to this question was "it should work", but it does not.
i think that the problem may be something else?
extern double StopLoss=50.0;
extern double TakeProfit=50.0;
extern double Lots=1;
extern int total;
int start()
{
double Price_1, Price_2, min, max;
RefreshRates();
Price_1=Bid;
Price_2=Ask;
min=iLow(NULL,0,2);
max=iHigh(NULL,0,2);
total=OrdersTotal();
if(total<1)
{
if(Price_1>max)
OrderSend(Symbol(),OP_BUY,Lots,Ask,5,Bid-StopLoss*Point,Ask+TakeProfit*Point,"My order#",16384,0,Green);
if(Price_2<min)
OrderSend(Symbol(),OP_SELL,Lots,Bid,5,Ask+StopLoss*Point,Bid-TakeProfit*Point,"My order#",16384,0,Green);
}
}
return(0);
The smiley is smiling all the time but it is not working, positions are not opening.
it means there are already open positions in the account
I opened a new demo account, i never touched the deposit,
i don't know if it has something to do with the type of DTs?
Why is the sound only repeated once?
Why is the sound only repeated once?
Added. Still only repeats once. :(
There is another way, take your sound, put it into NERO (sound editing software), if available, make one sound
5 of them.
If I'm not mistaken, "i++" works on every tick, i.e. the sound will be pronounced for 5 ticks in a row.
Also, just in case, look here https://book.mql4.com/ru/operators/for