Here is a function to calculate the average price of a grid of orders and display it on a chart. After the grid is closed, horizontal lines showing the average line are not deleted.
Please help us to write a function that these lines will be deleted after the grid of orders is closed. Thank you!!!
Here is a function to calculate the average price of a grid of orders and display it on a chart. After the grid is closed, horizontal lines showing the average line are not deleted.
Please help us to write a function that these lines will be deleted after the grid of orders is closed. Thank you!!!
This is not the place to do it.
voidOnTick()
{
//---if(ObjectFind(0,"AveragePriceLine"+0)==0&&CountTrade(0)<1)//для бай
{ObjectDelete(0,"AveragePriceLine"+0);}
if(ObjectFind(0,"AveragePriceLine"+1)==0&&CountTrade(1)<1)//для селл
{ObjectDelete(0,"AveragePriceLine"+1);}
.....
}
The Expert Advisor sets the start and end time of opening orders. I would like to have this time displayed on the chart. I have not been able to do it yet. Here is the code. I would like to ask you for help!
//-------------------------------------------------------------------+ Команда на открытие первых ордеров в сеткеif((UseHour==1&&Hour()>=StartTime&&Hour()<=StopTime)||UseHour==0)
ObjectCreate(0, "Начало торговли", OBJ_VLINE,0,0, StartTime);
ObjectSetInteger(0, "Начало торговли",OBJPROP_COLOR, clrBlue);
ObjectCreate(0,"Окончание торговли", OBJ_VLINE, 0, 0, StopTime);
ObjectSetInteger(0, "Окончание торговли", OBJPROP_COLOR, clrBlue);
{
if(CountTrade(0)==0 && CountTrade(1)==0 && TradeSignal()==0)
SendFirsOrder(0);
if(CountTrade(1)==0 && CountTrade(0)==0 && TradeSignal()==1)
SendFirsOrder(1);
}
The Expert Advisor sets the start and end time of opening orders. I would like to have this time displayed on the chart. I have not been able to do it yet. Here is the code. I would like to ask you for help!
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.
I don't know why it's done that way, it's essentially a boolean function.
It goes something like this:
In enum, the elements start with zero, so Ok=0 , AllocError=1
i.e. GetRepeat returns either 0 or 1
respectively ! GetRepeat is a negation of the return value
0 is false, 1 is true.
It is easy to break your head
Exactly!)) Thanks, Alexey!
Good day!!!
Here is a function to calculate the average price of a grid of orders and display it on a chart. After the grid is closed, horizontal lines showing the average line are not deleted.
Please help us to write a function that these lines will be deleted after the grid of orders is closed. Thank you!!!
Good day!!!
Here is a function to calculate the average price of a grid of orders and display it on a chart. After the grid is closed, horizontal lines showing the average line are not deleted.
Please help us to write a function that these lines will be deleted after the grid of orders is closed. Thank you!!!
This is not the place to do it.
This is not the place to do it.
Makar, how do you bind this in void OnTick()
This is not the place to do it.
Thank you, Makar, a little file work and it's fine.
Please advise.
The Expert Advisor sets the start and end time of opening orders. I would like to have this time displayed on the chart. I have not been able to do it yet. Here is the code. I would like to ask you for help!
Please advise.
The Expert Advisor sets the start and end time of opening orders. I would like to have this time displayed on the chart. I have not been able to do it yet. Here is the code. I would like to ask you for help!
Show the StartTime and StopTime variables