Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 305
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
Thank you, but it returns zero for me. What could be the reason?
It can't be any other reason. No computer knows a year less than 1970. Start with the year that appears in the broker's quotes.
It couldn't be any other year. No computer knows a year less than 1970. Start with the year that appears in the broker's quotes.
It's a good job, the first year of our era.)
What's up, it's good, the first year of our era)
Use CopyXXX()
Thank you.
In MT5 you can shift the chart this way:
PlotIndexSetInteger(0,PLOT_SHIFT,InpChannelPeriod);
Thank you.
In MT5 it is possible to shift the chart this way:
PlotIndexSetInteger(0,PLOT_SHIFT,InpChannelPeriod);
I chose there.
SetIndexShift(0,InpChannelPeriod);
Maybe someone can help. The essence of the indicator is to draw the Doncian channel as usual and then shift the lines of the last channel value behind the minus bar.
In MT5 everything seems to work, but in MT4 I do not understand what is wrong - I have redrawn it here and there, but it still draws nonsense - it shifts the channel itself, although I separately make calculation for values that will be shifted....
Maybe someone can help. The essence of the indicator is to draw the Doncian channel as usual and then shift the lines of the last channel value behind the minus bar.
In MT5 everything seems to work, but in MT4 I do not understand what is wrong - I have redrawn it here and there, but it still draws nonsense - it shifts the channel itself, although I separately make calculation for values that will go to shift....
Well look at the alligator code, the shift works there. Although, maybe the logic is different.
Well, look at the alligator code, that's where the shift works. The logic may be different, though.
Yes the shift works for me too.
I fill the array with a shift, but it appears as if it is filled without a shift, but the shift itself happens visually.
The first part of the code leaves the buffer unfilled to the depth ofInpChannelPeriod from the last bar:
The second part should fill this area:
But in reality it turns out like this:
Code in MT5
Result:
ZS: Changed the code - the wrong ME was.