Thanks. Do you have any idea with these crazy Arrow thing?
Sorry I don't have time to check your code, maybe someone else.
Just a quick overview, I think maybe you missed the point the array indexing is not "as timeseries" by default on mql5. You may have to use ArraySetAseries().
Sorry I don't have time to check your code, maybe someone else.
Just a quick overview, I think maybe you missed the point the array indexing is not "as timeseries" by default on mql5. You may have to use ArraySetAseries().
ArraySetAseries() I tried it but still not work.
I tried to solve this bug by several way only three can make it btter but not solve it totally.
1. not just set the point I want show the arrow. I also set NULL to all the poit I don't want to show the arrow.It not work.
for(int i=limit+1;i<rates_total;i++) { if(ExtMacdBuffer[i]>0) { if(ExtMacdBuffer[i-1]<ExtMacdBuffer[i] && close[i-1]>close[i]) UPBuffer[rates_total-i]=-0.005; else UPBuffer[i]=NULL; } if(ExtMacdBuffer[i]<0) { if(ExtMacdBuffer[i-1]>ExtMacdBuffer[i] && close[i-1]<close[i]) DWBuffer[rates_total-i]=0.005; else DWBuffer[i]=NULL; } }
2.use the line below in init. to set the arrow buffer with empty value. It works if i just got one arrow buffer. By two arrow buffer it not work.
PlotIndexSetDouble(0,PLOT_EMPTY_VALUE,0);
3. Change ArrowsBuffer type from Indicator_data to INDICATOR_CALCULATIONS it do make it looks better.But the Buffer value still jumped to some other number randomly.
SetIndexBuffer(0,ArrowsBuffer,INDICATOR_DATA);
I had test it for about 20 times. and I am sure it's a bug in mql5. If I set a arrow buffer, without set any data to it , the arrow will stick to the nearest line.
It is convenient if you just want see some arrow on the screen, but it is stupit to lose accuracy for conveniece.
I hope some one could tell me "you are wrong" and show me the right way or just tell me "you are right" .So that I will not wast time on it.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
This is My favorate MACD colored and with point Arrow.
It works well on the first load,buy it went crazy if you change it's time frame.
the code is blow. The arrow I set shoud be 0.01 or -0.01 or be null
but after the change of timeframe It's start to be random num from nowhere.
Like a ghost in my computer.Help me tell me why. I am new if MT5.
I start to use MT4 since last week, I learnd a lot of code, function and start to make Indicator for my own.
This K_MACD is first first coded on mql4, it work well.
Yesterday I know the exitence of MT5. Since there is a new one why use the old.
But new one is not always the best. The flexibility and complecity of MT5 almost make me crazy.
I want to know why the buffer could take data randomlly.