[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 515

 
Morzh09 >>:

Добрый день, друзья.

Прошу прощения, что повторяю вопрос...
очень хочется разобраться...


Подскажите, пожалуйста, как изменить код стандартного Stochаstic следующим образом:

нужно добавить в индикатор внешний параметр: чтобы можно было вручную указать (при "набрасывании" индикатора на график), данные с какого графика (и какого TF) брать.

Заранее большое спасибо.


It is much easier to create a new indicator, enter the required parameters into the user variables and fill the indicator buffers with a command like
iStochastic( string symbol, int timeframe, int %Kperiod, int %Dperiod, int slowing, int method, int price_field, int mode, int shift) 
 
How do I determine the opening date of an order?
 
vlandex >>:
Как определить дату открытия ордера?

OrderOpenTime( ) and more specifically the day, year, week, etc. are separate functions based on the received value

 
drknn >>:


Идём в справку метаэдитора. Читаем.


Just what I needed! Thank you very much!

 
chief2000 >>:
Необходимо получить значение минут текущего времени, т.е. если сейчас 22:34 то интересуют "34".
Можно

После этого провести какие-нибудь манипуляции со стрингом чтобы извлечь минуты
(и кажется без цикла-for не обойтись, что станет дополнительной нагрузкой на проц). Верно ли это или есть что-то попроще?
Спасибо!
There are many functions for working with strings, but in this case extracting the substring is sufficient https://docs.mql4.com/ru/strings/StringSubstr
 
How do I write data to an external file (e.g. notepad) and then read that data into a variable?
 
splxgf >>:
Для работы со строками есть много функций, но в данном случае извлечения подстроки достаточно https://docs.mql4.com/ru/strings/StringSubstr

Great! Thank you!




 
I faced the following problem: the tester does not want to run a looped EA on the history (based on the infinite loop). If we skip looping, it turns out that at every tick the EA starts anew and does not remember previous values of variables. At present, to avoid this nuance, I use global variables, but when there are a lot of variables, it requires a lot of dumb manual work. Perhaps someone knows a simpler way? Please share.
 
vlandex >>:
Как записать данные во внешний файл (например, в блокнот), а потом считать эти данные в переменную?

Notepad is not an external file for writing data, it is an application. If you write any information into notepad.exe, the application will be ruined.

MQL4 provides file operations for reading data from files. See the help of MetaEditor. There are also examples there.

 
Gardenn >>:
Столкнулся с такой проблемой: тестер не хочет гонять по истории зацикленный советник (на базе бесконечного цикла), а если отказаться от зацикленности, то оказывается, что на каждом тике советник стартует заново и не помнит предыдущие значения переменных. Я сейчас, чтобы обойти этот нюанс, использую глобальные переменные, но когда переменных много, это требует изрядной тупой ручной работы. Возможно кто-то знает более простой способ? Поделитесь, пожалуйста.

Declare variables as static before defining functions. These variables are not initialised when functions are called (unless they are forcibly initialised in the function body) and store their values between calls.

Reason: