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

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
There is a need to output the indicator in segments.
It is desirable to clear the buffer, so as not to display old data on the chart.
The problem is:
1. You can't clear the array, an error will appear (out of range).
2. When zeroing the data accordingly the graph crawls to zero.
Advice on which direction to dig. Thank you.
Hi. The indicator in ex4 puts a lot of load on the processor, if I make an indicator that pulls its buffers not on every tick but (in one, two) and put it instead of ex4 will it help the processor?
- Either work with the buffer on a new bar;
- or update the buffer on a limited time period.
I would take two approaches:
- Either work with the buffer on a new bar;
- or update the buffer on a limited time period.
Comrades!
There is a need to display the indicator in segments.
It is desirable to clear the buffer, so as not to display old data on the chart.
The problem is:
1. you can't clear the array, an error comes out (out of range).
2. When the data is zeroed, accordingly the graph crawls to zero.
Advice on what direction to dig. Thank you.
I put in indicators and advisers
int init()
{
if(Digits==5){if(Close[0]>1)plus=0.00003; else plus=0.00002;}
if(Digits==3){if(Close[0]>100)plus=0.003; else plus=0.002;}
}
void start()
{
if(time0!=Time[0]){ time0=Time[0]; hig=0; loww=1000;}
if((High[0]>hig)||(Low[0]<loww)) {hig=High[0]+plus; loww=Low[0]-plus;
код здесь, поскольку интересуют пиковые моменты индикаторов
хочу так
буфер_0=iCustom(NULL,0,"1rd",1,0);
}
Try putting EMPTY_VALUE instead of zero
how to do it:
let's say I have an account balance of 5800
if (5800)\2000= (in this case it should come out 2, all fractions are discarded, we need the functions themselves for such processing)
just like 1800\2000=1
No. It will be 0.