Thanks, but they are trend lines, and I need a muwings with adjustable periods, but not by close for example, but by fractal extremums, better if separately by highs and lows, maybe someone met similar
int start(){if(OrdersTotal()==0&&TimeHour(TimeCurrent())>= FinishWorkHour &&TimeHour(TimeCurrent())< StartWorkHour && WorkOnTime ==true){if( AlertOnFinish){Alert("Советнег завершил торговлю");
AlertOnFinish=false;}if( SendMailOnFinish){string AZ="Отчет о работе за день отправлен "+TimeToStr( CurTime());ObjectCreate( AZ,OBJ_ARROW,0,Time[1],Low[1]-6*Point,0,0,0,0);ObjectSet( AZ, OBJPROP_ARROWCODE,42);ObjectSet( AZ, OBJPROP_COLOR ,DarkOliveGreen);SendMail("BP Finished ","Balanse "+DoubleToStr(AccountBalance(),2)+", Total Orders "+OrdersHistoryTotal()+", Open Orders "+OrdersTotal());
SendMailOnFinish=false;}return(0);}
Gentlemen, why this time-out construction does not work as it should, everything seems to be correct, OrdersTotal==0 as a condition, but it is ignored and EA is disabled when FinishWorkHour is reached, even if there are open orders, and since I have an EA closing when it reaches the required profit and not take the profit, this closing does not happen, because the EA is no longer working and the deal hangs.
Dimoncheg писал(а)>> Gentlemen, why this timed termination does not work as it should, I think everything is correct, OrdersTotal==0 as a condition, but it is ignored and EA is disabled when FinishWorkHour is reached, even if I have open orders and since I have an EA closing when it reaches the required profit and not take the profit, the closing does not happen, because the EA is no longer working and the trade hangs.
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.
Is the question general or about a specific Indicator?
In general, I think of it this way:
1. Set up several buffers - as always. But with different colours
Thanks, but they are trend lines, and I need a muwings with adjustable periods, but not by close for example, but by fractal extremums, better if separately by highs and lows, maybe someone met similar
Help! I need to control the number of positions on an instrument.
if(total<1)
{
This classic variant is not suitable.
I need to open one position for one instrument.
That is, if there is an open position GBP/JPU, then the second position for the instrument will not open.
Do not offer multi-currency strategies.
Many thanks in advance!
I couldn't find anything in the documentation...
I couldn't find anything in the documentation...
OrderSelect
then check OrderMagicNumber and/or OrderSymbol
Try
Gentlemen, why this timed termination does not work as it should, I think everything is correct, OrdersTotal == 0 as a condition, but it is ignored and EA is disabled when FinishWorkHour is reached, even if I have open orders and since I have an EA closing when it reaches the required profit and not take the profit, the closing does not happen, because the EA is no longer working and the trade hangs.
I would write to be sure.