Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 695
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
For some reason I can't catch a bar in the loop, which starts at 15 o'clock.
If I write if(i<24) as a condition, the log displays the time of each bar for the day, but the required condition is not met:
And what timeframe do you run the indicator on?
Forum on trading, automated trading systems & strategy testing
Any questions for newbies on MQL4, help and discussion on algorithms and codes
Artyom Trishkin, 2018.11.17 20:33
And what timeframe do you run the indicator on?
Clockwise in both cases.
Sentinel in both cases.
It works:
Thank you, but it's so complicated for someone who is not burdened with experience and knowledge, it's a mess :-)
BufferHour[i]=(hour==hour_req ? (hour>0 ? hour : 0.1) : 0);
Why make a checkhour>0 when transferring data to the buffer? And if it doesn't, why assign 0.1?
I wanted to do highlighting on main chart, but not by a line, but by ordinal day of week Mon, Wed, Wed... via SetIndexArrow(0, 140); (maybe there is a simpler way, but so far nothing else came up), but for some reason I cannot make your code work in main window in four, and in five no such property already.
Thank you, but it's so complicated for someone who is not burdened with experience and knowledge, it's a mess :-)
Why make a checkhour>0when transferring data to the buffer? And if it doesn't, why assign 0.1?
I wanted to do highlighting on main chart, but not by a line, but by ordinal day of week Mon, Wed, Wed... via SetIndexArrow(0, 140); (maybe there is a simpler way, but so far nothing else came up), but for some reason I cannot make your code work in main window in four, and in five no such property.
The buffer is filled with the hour value. And if the hour is zero, the histogram will not be drawn. So, we must check whether the hour is zero (we have set it to search for zero hour in the settings), and if it is zero, we must enter 0.1 in the buffer, not the hour value (zero), to display the histogram column. This will show a value of 0 instead of 0.1 in the data window, as the indicator Digits is set to zero.
Thank you, but it's so complicated for someone who is not burdened with experience and knowledge, it's a mess :-)
Why make a checkhour>0 when transferring data to the buffer? And if it doesn't, why assign 0.1?
I wanted to do highlighting on main chart, but not by a line, but by ordinal day of week Mon, Wed, Wed... via SetIndexArrow(0, 140); (maybe there is a simpler way, but so far nothing else came up), but for some reason I cannot make your code work in main window in four, and in five no such property already.
PlotIndexSetInteger(0,PLOT_ARROW,140);
But you need to create a number of buffers equal to the number of weeks. And each buffer is given an arrow code from 140 to 149 - 1,2,3,4,5,6,7,8,9,10 - ten weeks is enough for a year? That's only 70 days. Or how did you want it?
I have to restart it.
I can't be sure what to do with it.
I can ask who can suggest how to calculate the slowest locations in the programs?
Thanks in advance for the tips!
This is the original. And below is the same with my changes.
//================
I have to restart it.
I can't be sure what to do with it.
I can ask who can suggest how to calculate the slowest locations in the programs?
Thanks in advance for the tips!
This is the original. And below is the same with my changes.
//================
Give it all back, don't torture the computer
iBandsOnArray, iStdDevOnArray calculated for data stored in an array
The array, on the other hand, is filled in 1 loop
Put everything back, don't torture the computer
iBandsOnArray, iStdDevOnArray calculated for data stored in an array
An array, on the other hand, is filled in 1 cycle
1. Put everything back, do not torture your computer .
Sorry, but you won't get it back. You have to make the indicator count from left to right.
I'm not bothering him, I'm using him for his intended purpose.
2.iBandsOnArray, iStdDevOnArray calculated using data stored in the array
Yes, they are calculated using data from bbMacd[] array, so what next?
3.The array is filled in one loop.
In one or in the first one?
Are you saying that in order to fill one array, you need a personal loop, in which this array is filled
array is filled and no other operations may be performed?
It is important for me to find out why the indicator slows down and how to calculate those places where it happens.
I have more questions but no answers.
Unfortunately, you haven't offered any clues.
How do I disable re-initialisation when EA timeframe changes?
There is some information here:
https://www.mql5.com/ru/forum/170952/page61#comment_6132824
Is it also correct for mql4?