It's because when u give default values for passed parameters there cannot be gaps from the right. So for example u need to have:
void CreateVlineObject(int Window_,datetime time1, color linecolor,int linewidth,int linestyle, string LabelPrefix="", string sObjectName="", bool ray=false,bool background=false)
Instead of:
void CreateVlineObject(int Window_,string LabelPrefix="",string sObjectName="",datetime time1, color linecolor,int linewidth,int linestyle, bool ray=false,bool background=false)So that all params with default values are rightmost... Hope my explanation is clear.
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
I am writing some utility functions that I can add to any experts/indicators I create via an include file. For example:
Why is it the compiler demands that I initialize all the parameters in the first function (I haven't yet), but doesn't mind in the second?