Recording the formation time of the maximum is not a problem. It is not clear how to tell the program to search in the next 8 bars for the minimum. That is, the bars before the maximum are not counted, the search is made in the bars after the maximum. The counting by time from and to is not suitable because it is impossible to specify the number of bars. The last bar to search in the chart is zero, let's assume there are no bars after the last arrow yet.
We have found the maximum -> remember the bar number. We subtract 8 from the bar number -> now we have the number of the limiting bar. If you have bar numbers, it is not a problem to know all characteristics of these bars (Open, Close, ..., Time).
barabashkakvn: Found the max -> remember the bar number. We subtract 8 from the bar number -> now we have the limiting bar number. If you have bar numbers, it is not a problem to know all characteristics of these bars (Open, Close, ..., Time).
If the bar is maximal with number 1 , we get -7. After zero the search will be done anyway.
In addition. If I learned correctly the maximum bar index increases with each bar, we subtract 8 and this number is linear (constant).
If we started with the maximum with number 1, we will only get the search, when the maximum becomes number 8? So the function does not calculate minus values?
forexman77: If the maxima bar is number 1, then we get -7. And after zero, the search will still be done.
Checked it out, everything seems to be correct.
In addition. If I learned correctly the maximum bar index increases with each bar, we subtract 8 and this number is linear (constant).
If we started with the maximum with number 1, we will only get the search, when the maximum becomes number 8? So the function does not calculate minus values?
Good afternoon, I can't find where to write a question about subscribing to signals. Can you please tell me the right place to write?
I have subscribed to A 20 Pip Per Day Strategy signal:
I subscribed to A 20 Pip Per Day Strategy signal. Provider of this signal trades with 600 (initial) $900 lot 0.10-0.15.
I have a deposit of $320 (real). (Real) and 95% of depo use, traded lot all the time comes out only 0.01. Very small. I would like to have at least 0.05 - 0.1.
I understand that it is determined automatically, but maybe you can still do something?
I solved the problem by adding a new bar checkbox. At each new bar I add one bar to the bar index and subtract this amount from the maximum bar index.
This construction does not work in the script, but it works in the Expert Advisor.
int i;//индекс минимального бара(РАЗМЕЩАЕМ НА ГЛОБАЛЬНОМ УРОВНЕ)double High[];
double Low[];
datetime Time_High[];
datetime Time_Low[];
ArraySetAsSeries(High,true); // индексация элементов массива будет производиться как в таймсерияхArraySetAsSeries(Low,true); // индексация элементов массива будет производиться как в таймсерияхArraySetAsSeries(Time_High,true); // индексация элементов массива будет производиться как в таймсерияхArraySetAsSeries(Time_Low,true); // индексация элементов массива будет производиться как в таймсерияхint start=0;
int kol_vo=14;
CopyHigh(_Symbol,_Period,start,kol_vo,High);
int maxbar=ArrayMaximum(High); // индекс бара с максимальным значениемdouble Maximum=High[ArrayMaximum(High)]; // найдено значение High максимального бараCopyTime(_Symbol,_Period,start,kol_vo,Time_High);
datetime timemax=Time_High[maxbar];//получили время максимального бараAlert("maxbar=",maxbar,"Maximum=",Maximum);
//время максимального бара найдено начинаем с этого момента поиск минимума в последующих пяти барах//НИЖЕ БЛОК ПОЛУЧЕНИЯ ИНДЕКСА БАРА ДО ЗАДАННОГО КОЛИЧЕСТВА ПЯТИ БАРОВstaticdatetime t;//записываем старое времяdatetime New_Time[];//буффер для проверки нового бараArraySetAsSeries(New_Time,true);//направление индексацииCopyTime(_Symbol,_Period,0,1,New_Time);//копируем время нового бараif(New_Time[0]>t && i < 5){i=i+1; t=New_Time[0];}
//ВЫШЕ БЛОК ПОЛУЧЕНИЯ ИНДЕКСА БАРА ДО ЗАДАННОГО КОЛИЧЕСТВА ПЯТИ БАРОВ,НА КАЖДОМ НОВОМ БАРЕ ПОЛУЧАЕМ ИНДЕКС СТАРОГО БАРА+1int bar=maxbar-i;//бар с которого начнем поиск минимумаCopyLow(_Symbol,_Period,bar,i,Low);//копируем массив минимумов после максимумаint minbar=ArrayMinimum(Low);//получаем индекс бара минимума после максимума double Minimum=Low[ArrayMinimum(Low)];//получаем минимумAlert("minbar=",minbar,"Minimum=",Minimum);
Can you tell me why I can't buy a product in the market when there are more credits in my account than the cost of the product? It says: You have insufficient funds in your wallet, please refill your account. ?? Where do I write with this problem? To whom?
TestUnit: Can you tell me why I can't buy a product in the market when there are more credits in my account than the cost of the product? It says: You have insufficient funds in your wallet, please refill your account. ?? Where do I write with this problem? To whom?
I have Windows XP on my computer - all MT4 terminals (5-6-7) work fine, no complaints or issues.
A couple of months ago I installed another computer, a new one with Windows 8. I downloaded on it MT4 platforms from the same brokers, and it seems that EAs are trading normally on them.
But at the same time in MT4 neither Journals nor Expert Advisors are writable. There is only the first one folder on the day of loading the terminal.
When I try to copy from MT4 terminal files (like experts-presets) sets with my settings to my desktop or another file, my comp says that it cannot find paths to these files.
!!! Moreover, on the MT4 terminal itself these files are visible and they work, but when you open the same folder on (C:) - they are as if not there, the folder is empty....
In general, total poltergeist.
Help, please, I'm already going crazy :( Is it a compatibility problem between MT4 and Windows 8 or something else?
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.
Recording the formation time of the maximum is not a problem. It is not clear how to tell the program to search in the next 8 bars for the minimum. That is, the bars before the maximum are not counted, the search is made in the bars after the maximum. The counting by time from and to is not suitable because it is impossible to specify the number of bars. The last bar to search in the chart is zero, let's assume there are no bars after the last arrow yet.
Found the max -> remember the bar number. We subtract 8 from the bar number -> now we have the limiting bar number. If you have bar numbers, it is not a problem to know all characteristics of these bars (Open, Close, ..., Time).
Checked, everything seems to be correct.
In addition. If I learned correctly the maximum bar index increases with each bar, we subtract 8 and this number is linear (constant).
If we started with the maximum with number 1, we will only get the search, when the maximum becomes number 8? So the function does not calculate minus values?
Or something I don't understand.
If the maxima bar is number 1, then we get -7. And after zero, the search will still be done.
Checked it out, everything seems to be correct.
In addition. If I learned correctly the maximum bar index increases with each bar, we subtract 8 and this number is linear (constant).
If we started with the maximum with number 1, we will only get the search, when the maximum becomes number 8? So the function does not calculate minus values?
Or maybe I misunderstood something.
Good afternoon, I can't find where to write a question about subscribing to signals. Can you please tell me the right place to write?
I have subscribed to A 20 Pip Per Day Strategy signal:
I subscribed to A 20 Pip Per Day Strategy signal. Provider of this signal trades with 600 (initial) $900 lot 0.10-0.15.
I have a deposit of $320 (real). (Real) and 95% of depo use, traded lot all the time comes out only 0.01. Very small. I would like to have at least 0.05 - 0.1.
I understand that it is determined automatically, but maybe you can still do something?
Thanks in advance for the tip.
Good afternoon, I can't find where to write a question about subscribing to signals. Can you please tell me the right place to write?
...
See Help:Example: Indicator showing bar numberhttps://www.mql5.com/ru/docs/array/arraysetasseries
I solved the problem by adding a new bar checkbox. At each new bar I add one bar to the bar index and subtract this amount from the maximum bar index.
This construction does not work in the script, but it works in the Expert Advisor.
Can you tell me why I can't buy a product in the market when there are more credits in my account than the cost of the product? It says: You have insufficient funds in your wallet, please refill your account. ?? Where do I write with this problem? To whom?
Servicedesk is in your profile.
When I try to copy from MT4 terminal files (like experts-presets) sets with my settings to my desktop or another file, my comp says that it cannot find paths to these files.
Help, please, I'm already going crazy :( Is it a compatibility problem between MT4 and Windows 8 or something else?
Many thanks in advance for the help.