What is wrong, with 2 parameters VLine in the tester gives error 2022.03.24 18:24:27.615 TestGenerator: unmatched data error (volume limit 263 at 2022.03.18 14:30 exceeded)
If the first parameter time1 is removed, everything is fine.
bool FlagOpOr=false;
bool FlagClOr=false;
bool Work=true;
//+------------------------------------------------------------------+//| Custom indicator initialization function |//+------------------------------------------------------------------+intOnInit()
{
//--- indicator buffers mapping//---return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+//| Custom indicator iteration function |//+------------------------------------------------------------------+intOnCalculate(constint rates_total,
constint prev_calculated,
constdatetime &time[],
constdouble &open[],
constdouble &high[],
constdouble &low[],
constdouble &close[],
constlong &tick_volume[],
constlong &volume[],
constint &spread[])
{
//---staticbool FlagNDay=true, FlagVLRed=false,FlagVLBlue=false;
staticdatetime Data = 0, NData=0;
Data = Day();
if(NData!=Data){FlagVLRed=true; FlagVLBlue=true;NData=Data;}
if(FlagVLRed==true && Hour()==0){ VLine(1,clrRed); FlagVLRed=false;}
if(FlagVLBlue==true && Hour()==1){ VLine(1,clrBlue); FlagVLBlue=false; }
//--- return value of prev_calculated for next callreturn(rates_total);
}
//+------------------------------------------------------------------+//| Timer function |//+------------------------------------------------------------------+voidOnDeinit(constint reason)//int deinit(void)void
{
int i;
int obj_total=ObjectsTotal();
for(i=obj_total-1;i>=0;i--)
{
string sn=ObjectName(i);
string Head=StringSubstr(sn,0,4);// Извлекаем первые 4 симif(Head == "VLin")
{
ObjectDelete(sn);
}
}
Comment("");
return;
}
//+------------------------------------------------------------------+bool VLine( int time1=0, color clr = clrRed ){
string var1=TimeToStr(TimeCurrent(),TIME_DATE|TIME_SECONDS);
string NameLine="VLine_" + "_"+var1;
bool created=ObjectCreate(0,NameLine,OBJ_VLINE,0,TimeCurrent(),0);
if(created)// если создался - сделаем ему тюнинг
{
//--- точка привязки сверху, чтобы не наезжать на барObjectSetInteger(0,NameLine,OBJPROP_STYLE,STYLE_SOLID);
//--- последний штрих - покрасимObjectSetInteger(0,NameLine,OBJPROP_COLOR,clr);
//--- установим толщину линии ObjectSetInteger(0,NameLine,OBJPROP_WIDTH,2);
}
elsereturn(false );time1=0;
return(true);
}
Good afternoon to all. I have 20-40 charts open during trading. I have to spend a lot of time to find the right one at the bottom of all the instruments or in the top menu item "window". If I could use a script to accelerate it, I put a script in the input parameters, type the necessary symbol and it will open as if it was found with my eyes and clicked. How to implement such a thing?
Good afternoon to all. I have 20-40 charts open during trading. I have to spend a lot of time to find the right one at the bottom of all the instruments or in the top menu item "window". If I could use a script to accelerate it, I put a script in the input parameters, type the necessary symbol and it will open as if it was found with my eyes and clicked. How can this be done?
As logic, the script should find out how many charts/windows are open and for which instruments, remember them (symbols and chart_idies) and then, according to the number of instruments, draw a panel with buttons with the instrument name written on them. On pressing the button, the chart with the required instrument changes its property to expanded (it can be collapsed) and over all, and the script closes.
Logically, the script should find out how many charts/windows are open and for which instruments, remember them (symbols and chart_idies), then, according to the number of instruments, draw a panel with buttons with the instrument name written on them. On pressing the button, the chart with the desired instrument changes its property to expanded (it can be collapsed) and over all, and the script closes.
Bad logic - what difference does it make - in which buttons to look - at the bottom, in the menu window or in the buttons drawn by the script? Must somehow be done so that when you enter the desired symbol in the input parameters, and the script has opened this window for you - so it would be easier and faster. Does anyone have such a miracle, please share?
DanilaMactep #: Bad logic - what difference does it make in which buttons to look - at the bottom, in the menu window or in the buttons drawn by the script? Must somehow be done so, that entered the desired symbol in the input parameters, and the script has opened this window for you - so easier and faster would be. Does anyone have such a miracle, please share?
Open a new window (opens without EA and with default template) or raise or expand an already open window.
I can't figure out what's wrong. There is a while loop in the indicator, but it seems to work fine. At first during testing everything works, but in one and the same place the program hangs, the terminal, too, I have to delete the source code from the terminal. On other currencies it hangs too. I put comments all around the program and it eventually reachesComment(rates_total+"\n "+prev_calculated); before return and stops. And the comment shows we got numbers like 3247 and 3247, which means that the condition to work (rates_total>prev_calculated) is not fulfilled and the program must not do anything. Why does it hang?
Aleksandr Kononov Comment(rates_total+"\n "+prev_calculated); before return and stops. And the comment shows we got numbers like 3247 and 3247, which means that the condition to work (rates_total>prev_calculated) is not fulfilled and the program must not do anything. Why does it hang?
What are these variables in loop condition? And if the initial condition is true, when does it become false to exit the loop?
The loops are just for understanding what they are. You will get a lot of code there if you write them. The question is why the work stops before return, although nothing even happens on this tick. In the comment rates total equals prev calculated, so we do nothing at all.
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.
What is wrong, with 2 parameters VLine in the tester gives error 2022.03.24 18:24:27.615 TestGenerator: unmatched data error (volume limit 263 at 2022.03.18 14:30 exceeded)
If the first parameter time1 is removed, everything is fine.
Good afternoon to all. I have 20-40 charts open during trading. I have to spend a lot of time to find the right one at the bottom of all the instruments or in the top menu item "window". If I could use a script to accelerate it, I put a script in the input parameters, type the necessary symbol and it will open as if it was found with my eyes and clicked. How to implement such a thing?
Good afternoon to all. I have 20-40 charts open during trading. I have to spend a lot of time to find the right one at the bottom of all the instruments or in the top menu item "window". If I could use a script to accelerate it, I put a script in the input parameters, type the necessary symbol and it will open as if it was found with my eyes and clicked. How can this be done?
As logic, the script should find out how many charts/windows are open and for which instruments, remember them (symbols and chart_idies) and then, according to the number of instruments, draw a panel with buttons with the instrument name written on them. On pressing the button, the chart with the required instrument changes its property to expanded (it can be collapsed) and over all, and the script closes.
Logically, the script should find out how many charts/windows are open and for which instruments, remember them (symbols and chart_idies), then, according to the number of instruments, draw a panel with buttons with the instrument name written on them. On pressing the button, the chart with the desired instrument changes its property to expanded (it can be collapsed) and over all, and the script closes.
Hello!
I am looking for an EA, a grid operator.
Opens market orders in a grid.
Closes the orders when the grid reaches a certain (%) profit.
I have seen such an Expert Advisor, and now I can not find it.
I have seen such an Expert Advisor, and now I cannot find it.
Bad logic - what difference does it make in which buttons to look - at the bottom, in the menu window or in the buttons drawn by the script? Must somehow be done so, that entered the desired symbol in the input parameters, and the script has opened this window for you - so easier and faster would be. Does anyone have such a miracle, please share?
Read the documentation carefully.
Read the documentation carefully.
What are these variables in loop condition? And if the initial condition is true, when does it become false to exit the loop?The loops are just for understanding what they are. You will get a lot of code there if you write them. The question is why the work stops before return, although nothing even happens on this tick. In the comment rates total equals prev calculated, so we do nothing at all.