SetIndexStyle( 0,DRAW_LINE, indicator_style1, indicator_color1);
this line is your problem
void SetIndexStyle( int index, int type, int style=EMPTY, int width=EMPTY, color clr=CLR_NONE)thats the definition. Obviously you put color onto WIDTH field!
fx1.net:
this line is your problem
doh! *smacks head and starts blaming evil twin for problem*
Thanks for that.
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
A custom indicator I'm writing is giving me some problems.
I've chopped it down to the attached code, and it still turns the entire chart (and only chart BTW) into a blue rectangle.
e.g. EURUSD H1, max zoom in (1 bar per gridline), black-on-white, bars.
I've un-installed MT4 & reinstalled it - just in case! Same result.
A) can anyone else reproduce the problem?
B) any ideas how to fix it?
NB
If I delete setting the buffer value (comment out "MaBuff[ix] = ma;"), then add the indicator, 'nothing extra' shows (as expected).
If I then activate the buffer value & recompile, still 'nothing extra' (should be a MA line)
If I then delete indicator, and add it again, *BAM*, blue rectangle for a chart!
Thanks