Questions from Beginners MQL5 MT5 MetaTrader 5 - page 176

 
forexman77:

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.

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.

 
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?

Or maybe I misunderstood something.

See help:Example: indicator showing bar numberhttps://www.mql5.com/ru/docs/array/arraysetasseries
Документация по MQL5: Операции с массивами / ArraySetAsSeries
Документация по MQL5: Операции с массивами / ArraySetAsSeries
  • www.mql5.com
Операции с массивами / ArraySetAsSeries - Документация по MQL5
 

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.

 
akmk:

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?

...

You can write about the Signals here.
 
barabashkakvn:
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.

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);
//время максимального бара найдено начинаем с этого момента поиск минимума в последующих пяти барах
//НИЖЕ БЛОК ПОЛУЧЕНИЯ ИНДЕКСА БАРА ДО ЗАДАННОГО КОЛИЧЕСТВА ПЯТИ БАРОВ
static datetime 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];}
//ВЫШЕ БЛОК ПОЛУЧЕНИЯ ИНДЕКСА БАРА ДО ЗАДАННОГО КОЛИЧЕСТВА ПЯТИ БАРОВ,НА КАЖДОМ НОВОМ БАРЕ ПОЛУЧАЕМ ИНДЕКС СТАРОГО БАРА+1
int 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?
Service Desk in your profile.
 
zfs:
Servicedesk is in your profile.
Didn't see it coming. Thank you, nice man!
 
Good afternoon, please explain:
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?

Many thanks in advance for the help.

Reason: