Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 382

 
Андрей:

Hello! The tutorial from the website was enough for me, after a few years of beating about the baffles I learned to write my own indicators. But the questions remain. Now I do not understand why indicators get confused. On M1 after about 12 hours some of them start drawing incorrectly but signal correctly. Some draw and signal incorrectly. On M5 they keep drawing five times longer. Can you give me a hint?

Here are the answers to the questions.
 
Alexey Viktorov:

1. The work with files in mql4 is the same as in mql5.

2. With all due respect to Sergei Kovalev, he also answered my questions in his time, but in my opinion, Kirill's lesson is easier to understand. In Yandex you type in and immediately 2 links to his lesson



Kirill provides the lessons. I would like to have a kind of "teacher" to explain step by step the issues I encounter in practical programming. Reading a textbook again will give you a lot, but it won't add practice. For example, I have studied the subject of how to average values in the MCL reference book a hundred times. I understood everything. I try to average values in my own training indicator but nothing works. Will Brill's lessons help in this case? It is better to have a teacher who will take apart your practical examples, point out errors of logic and so on...

 
YarTrade:

Is it realistic to learn from Kirill's lessons if you haven't done programming before? And how long would it take, from your point of view?


If you want to make money on forex, with good indicators you will earn faster than you learn to write Expert Advisors. Solve the problems of today, do what is interesting. Well, if you want to become an MQL programmer, then sorry for the flood.

 
YarTrade:

Is it realistic to learn from Kirill's lessons if you haven't done programming before? And how long would it take, from your point of view?

These questions are unrealistic to answer. When I started studying mql, I was familiar with VBA and had some idea of variable types, loops and operators, so I did not start reading Kirill's lesson from the first page. And I learned about custom functions only when studying mql and was pleasantly surprised with how convenient it is.

Well, how much time it will take... My whole life. No matter how much you know, you will always learn something new. Or, if it is done more than once, suddenly it will be done in a different way, less resource-intensive, more readable, or some other reasons may be...

 

I was not familiar with programming, only with the hardware. I started by changing the hidden settings in the indicators. When I read the tutorial from the website for a week, my head swelled, then it settled down and I started to use new tricks. There must be a purpose, a specific task, and then, after reading the tutorial, my hand will reach for the keys. In the year following the tutorial I wrote an EA indicator, AutoChartist rests.

 

Hi all!

Please advise: how to allow the take profit, when modifying, to only approach the current price but not to move away.

 
YarTrade:

I'm still learning MQL4. I haven't read.

Is there an online training service where you can learn MQL4 for free/paid by examples with a tutor? I have almost read an MQL4 tutorial, but I cannot program at all. I am not familiar with programming before. I am trying to learn something in this thread, but I haven't made any progress. Can you give me some suggestions?

The process is not easy and fast. It is better not to start with indicators (IMHO), because they have their own jokes. With expert advisors, it is easier. I myself started with Kovalev's textbook, but now... I don't know if it is more useful or not.

I would start now with a couple of articles like"indicator/advisor writing for beginners" + if something is not clear, there is a chance that it will be answered here or in article discussion thread. Next - the task definition (interesting) and practice, practice, practice. Yes, the documentation must be handy, it is better to read it once to have at least a rough idea of the possibilities of the language.

 
Andrei Bucur:

Hi all!

Please advise: how to allow the take profit, when modifying, to only approach the current price but not to move away.

Calculate a new TP value and check before modification that it is neither less nor equal to the previous value.
 
How do I detect the end of testing in an indicator tester? I use OnDeinit in Expert Advisors, but for an indicator tester it is not very good. I need to process all collected data once at the end of the indicator test.
 
Good afternoon everyone. Tracking the values of the parabolic at the opening of each hourly candle.
When I run it through the history, the iSAR of the zero bar coincides with the point on the chart, except when the parabolic changes position from top to bottom and vice versa.
if (newbarall!=(iTime(Symbol(),60,0))
{
newbarall=iTime(Symbol(),60,0);
Print (iTime(Symbol(),60,0));
Print ("SAR = ",NormalizeDouble(iSAR(Symbol(),60,0.02,0.2,0),Digits);
};
Hence the following questions:
Why is the zero bar parabolic counted incorrectly precisely at these moments?
And, actually, how to avoid it, because when the bar opens, the point appears and is static without recalculation during the formation of the candle.
Please help). Thank you!
Reason: