[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 550

 
artmedia70 >>:
Думаю, что магик задавать для всех позиций и по нему отслеживать...
I think you just need to put returns after each modification rather than all modifications in one cycle with one return...
 
drknn >>:

artmedia70, я хочу показать Вам простой пример, к чему могут привести подобные попытки делать код самостоятельно.

Сидим с другом в скайпе, общаемся. Возникла идея проверить как будет работать советник на сигнале поглощения. Сигнал поглощения - это когда тело первой свечи больше половины тела предыдущей свечи и при этом они имеют разный цвет. Получается, что последующая свеча своей тенденцией как бы поглощает тенденцию прошлой свечи - такое вот определение мы с ним ввели для этой ситуации. Код советника, который бы работал по этим сигналам, я сделал минут за пять. Ещё пару минут тестировал и через 7-10 минут перекинул эксперта другу. Полученный советник умел не только открывать ордера по сигналу, но и тралить, перемещать стоп в безубыток, сбрасывать лоты на указанных пользователем уровнях (причём число этих уровней можно ставить сколько угодно) и имел систему управления лотами.

Почему, за счёт чего я сделал своетника в столь сжатый срок? Понять не сложно - за годы программирования на MQL4 у меня накопилось довольно много готовых функций. Я собираю советника как домик из кубиков. И так работает любой программист - чтоб не делать каждый раз код некой функции заново, он объединяет такие функции в библиотеки и далее пользуется уже готовым кодом.

Зачем я Вам это рассказываю? Я хочу, чтоб Вы поняли, что сейчас для Вас попытка заточки чужого кода под себя, приведёт к меньшей результативности. А попытка сделать советника самому закончится примерно тем же, чем и у всех (при дложном усердии) - Вы накопите кучу своих функций и сделать относительно-простого советника для Вас будет не проблема.

Very grateful for your participation in my life as a novice programmer. I had some objections to you after the first post, but after reading this one, I realized that you yourself answered for me...
I will tell you how I learned to drive. Twenty-two years ago, I had absolutely no idea how to drive a car, but seeing how others did it, I just got into an old Moskvich and drove. But I drove it backwards... :) Then I figured out the gears and drove it properly. It was in the gardens. The car was left in one piece and I got confidence in my abilities... Now I drive about 4,000 kilometres in a week. And being behind the wheel, I'm fully confident for myself and my passengers. And I have my own car. And it's not an old Moskvitch... If I did as you suggest (let's make an analogy), I would read a bunch of books on driving, learned traffic regulations by heart, passed my exams at traffic police, then saved up for a long time for my own car and only then sat behind a wheel of my new car... with no confidence. I drove my father-in-law's car without license for five years and had not a single violation. Later, when I owned my own car, I took my driving test and drove my own car without fear of destroying it at the first crossroads...
Similarly, now you're asking me to start from scratch and take a long time to get to my own councillor...

No way. I will take an example, gut it, completely understand it, and having some kind of Expert Advisor, I will build my own potential and my own codes. This Expert Advisor from the tutorial will gradually fill up with my functions, which will completely replace someone else's code from the template...
How do you suggest me to understand the work of a function without the possibility to try it in the tester? I don't have my own code yet. And in this case, collecting the knowledge I won't get to even a slightly functional Expert Advisor. You have written yourself that people are reluctant to share knowledge here. Do you think I ask questions here for no reason, out of idle curiosity? Then I need it! I'm studying programming at the same time I'm testing different strategies in the tester. I can easily connect any indicator (s) and test the TS. For me it's more visual. I'm the kind of person who takes things apart not to break them, but to build them and make them better...
My advice to you, don't measure everyone by the same yardstick. We are all different and each one, going toward the same goal, chooses his own route.
Thanks again for your participation and - good luck to you!

 
Dear old-timers! I'm bowing to you again... Can you tell me if it is possible when I start an EA that it would output the indicator window in the chart by itself? If yes, how?
 
artmedia70 >>:
Уважаемые старожилы! Я опять к вам с поклоном... Подскажите возможно ли при запуске советника чтобы он сам выводил окно индикатора в чарт? И если да, то как?
It seems that the window is opened automatically by the indicator itself when attached to the chart. The Expert Advisor cannot open the window itself, but only write into it.
 
Question if anyone knows. Is it possible for the offline chart not to pull quotes? I tried to turn off the Internet via incorrect proxy data, but then the indicator in which I'm debugging the code stopped working.
 
Andrei01 >>:
Вроде как окно открывает сам индикатор автоматически при подцепке на график. Советник сам окна открывать не может, а только в них писать.
Thank you. Pity...
Another question: when an order can be reopened. I do not mean the end of the day or the beginning of the next day. Open positions in the tester are constantly reopened bar after bar.... It's a miracle...
????????????????????????????
 
artmedia70 >>:
Ещё вопросик: в каких случаях ордер может быть переоткрыт. Я не имею ввиду конец и начало след. дня. Открытые позиции в тестере постоянно бар за баром переоткрываются.... Чудеса да и только...
????????????????????????????
Nothing happens by itself. You have to look for the cause in the code.
 
artmedia70 >>:
Спасибо. Жаль...
By the way, the opening of the sub-window can be done by hovering an empty indicator on the chart.
 
Andrei01 >>:
Кстати открытие подокна можно сделать подвесив на график пустой индикатор.
Yes, thank you, that's exactly what I need: for the Expert Advisor to do it itself - to display an empty window on the chart, and then to write messages in it...
 
artmedia70 >>:
Да, спасибо, именно это мне и нужно: чтобы эксперт сам это делал - выводил пустое окно на график, а далее уже в него сообщения писал...

There is an example with such a message subwindow in the textbook.

Reason: