Giovanni:
What is wrong in calling the Empty indicator using CIndicator class:
The output is the following:
handle=-1
The caller:
The called:
Thank in advance
The problem is in the class:
protected: //--- methods of tuning bool CreateBuffers(const string symbol,const ENUM_TIMEFRAMES period,const int buffers); virtual bool Initialize(const string symbol,const ENUM_TIMEFRAMES period, const int num_params,const MqlParam ¶ms[]) {return(false);}
Rather call the CiCustom class.
CiCustom IDiv; //--- int h_Div; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- indicator buffers mapping MqlParam params[3]; params[0].type =TYPE_STRING; params[0].string_value="Empty"; params[1].type =TYPE_INT; params[1].integer_value=20; params[2].type =TYPE_BOOL; params[2].integer_value=false; bool res =IDiv.Create(Symbol(),PERIOD_M5,IND_CUSTOM,3,params); h_Div = IDiv.Handle(); Print("handle =",h_Div);

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
What is wrong in calling the Empty indicator using CIndicator class:
The output is the following:
handle=-1
The caller:
The called:
Thank in advance