Oh, I'm foolish. Thanks.
Still empty line, must have another error. Any idea?
double Ext3Buffer[]; // not a buffer - no SetIndexBuffer
WHRoeder:
Thanks for the help.
Yes, but Ext3Buffer[] is just a variable, not a line to draw.
your chartperiod is not the period you calculate ext3buffer
you're not using ibarshift to calculate the right value on each bar
there are more bars on chartperiod then you can calculate on tfup
joshatt: Yes, but Ext3Buffer[] is just a variable, not a line to draw.
Ext3Buffer[i]=iMACD(NULL, tfup, fast_ema_period, slow_ema_period, signal_period, PRICE_CLOSE,MODE_MAIN,i);
- "[]" means it's a zero length array - no elements. It is not a auto sizing buffer and you don't give it a size with ArrayResize. You can NOT store anything in it. Make it a buffer. "#property indicator_buffers" tells how many buffers are drawn. IndicatorBuffers - MQL4 Documentation tells mql4 how many total you have.
- Like deVries said "i" is the index of your buffers of your charts timeframe. You can't use it in the iMACD call when tfup is NOT Period() or zero. Apples and Oranges
WHRoeder:
- "[]" means it's a zero length array - no elements. It is not a auto sizing buffer and you don't give it a size with ArrayResize. You can NOT store anything in it. Make it a buffer. "#property indicator_buffers" tells how many buffers are drawn. IndicatorBuffers - MQL4 Documentation tells mql4 how many total you have.
- Like deVries said "i" is the index of your buffers of your charts timeframe. You can't use it in the iMACD call when tfup is NOT Period() or zero. Apples and Oranges
Wow, this corrects my several wrong thoughts in years.... I never really understood.
Many thanks, WHRoeder and deVries. I really appreciate it.
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
Hi,
I'm trying to write this indicator with 2 colors: up red, down white. But why the result is total empty?