Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 381
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Let it initially be like this.
Next, we need to make a proper fixation that the bar is worked out, but here we need to calculate the whole approach to the TOR.
So far, what I see from your post, we need to do this:
The essence is that if spread is more than normal, then we go out again toOnTick, and on a new tick we check spread, if it is normal - we send an order and remember that there was a trade on this bar.
There is also a second way:
In general, you need to define the logic, when it should record, and do not check again until the "New bar" is formed.
I understand you, thank you!
Gentlemen, can you give me a hint? I have been trying to write the indicator data into a file for the second week in order to read it later and build an indicator based on the data. The indicator is a training one, I calculate volume on each tick of a certain bar. If the tick is positive its volume is added with "+", if it is negative - with "-". I add obtained accumulated volumes and obtain a delta and consider this delta cumulative. This produces a curve. However, this curve is built only in real time. It cannot be plotted in history. For this purpose, I have decided to write the data into a file. I got stuck at this stage. I've managed with a bitterness that the code won't generate compiler errors. However, the resulting product doesn't work. The indicator worked before that. After I've attached the code for writing the file to it the indicator doesn't work anymore. The program creates a file with one incomprehensible record and dies at this point. I've been sitting here all day and can't figure it out. Can anyone help me?
Gentlemen, can you give me a hint? I have been trying to write the indicator data into a file for the second week in order to read it later and build an indicator based on the data. The indicator is a training one, I calculate volume on each tick of a certain bar. If the tick is positive its volume is added with "+", if it is negative - with "-". I add obtained accumulated volumes and obtain a delta and consider this delta cumulative. This produces a curve. However, this curve is built only in real time. It cannot be plotted in history. For this purpose, I have decided to write the data into a file. I got stuck at this stage. I've managed with a bitterness that the code won't generate compiler errors. However, the resulting product doesn't work. The indicator worked before that. After I've attached the code for writing the file to it the indicator doesn't work anymore. The program creates a file with one incomprehensible record and dies at this point. I've been sitting here all day and can't figure it out. Can anyone help me?
It would be a good idea to move the pointer to the end of the file before recording.
It would be good to move the pointer to the end of the file before writing.
What is this for? I've read the link, but I don't understand it.
What is this for? I read the link, but I don't understand it.
What for? When you open a file, the pointer is positioned at the beginning of the file and information is written at the beginning of the file. To write to the right place, you have to move the pointer to the right place.
Gentlemen, can you give me a hint? For the second week I've been trying to write indicator data to a file...
Have you read it?
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 an instructor? 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. May you give me some advice?
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?
1. Working 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, the lessons from Kirill are easier to understand. In Yandex you type in and immediately 2 links to his lesson
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 please.
1. The handling of 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, type on and immediately 2 links to his lesson
Is it feasible to learn with the help of "Kirill's" lessons if you have not engaged in programming before? How long does it take?