Set the
#property indicator_type1 DRAW_HISTOGRAM
to
#property indicator_type1 DRAW_COLOR_HISTOGRAM
😊 here is an indicator with all draw types , it may be a helpflu reference
Files:
AllDrawTypes.mq5
23 kb
another question to that,
why i get here
DiffBuffer[i] = MA1[i] - MA2[i];
sometimes an array out of range?
The problem on that Error, if I print the DiffBuffer first the Error moves from pos 13 to pos 18
Check the indices with the debugger
or look at ...\MQL5\Indicators\Examples\MACD.mq5
There you find the same:
... int start; if(prev_calculated==0) start=0; else start=prev_calculated-1; //--- calculate MACD for(int i=start; i<rates_total && !IsStopped(); i++) ExtMacdBuffer[i]=ExtFastMaBuffer[i]-ExtSlowMaBuffer[i];
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
Hello,
i tried to get a Histogram with 2 colors but i dont find out, how to became the second color.
everthing works, beside of the second color, can someone give me a hint?
regards