- in the CiCustom Class
virtual
bool Initialize(const string symbol,const ENUM_TIMEFRAMES
period,const int num_params,const MqlParam ¶ms[]);
The indicator name must be the first parameter. See IndicatorCreate.
If the indicator handle of IND_CUSTOM type is created, the type field of the first element of the array of input parameters parameters_array must have the TYPE_STRING value of the ENUM_DATATYPE enumeration, and the string_value field of the first element must contain the name of the custom indicator. The custom indicator must be compiled (file with EX5 extension) and located in the directory MQL5/Indicators of the client terminal or in a subdirectory.
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 found that Make the EA with MQL5 is a good to have a complex and fast trading EA. So I am starting to code however I have a problem in custom indicators.
It is necessary to pass some heavy calculation into the OnCalculation Functions for fast operation. So to use custom indicators is the thing that is a must.
I look to the two CiCustom and CIndicator class because in the Class CiCustom have this code:
class CiCustom : public CIndicator
I am trying to create the custom indicator from the iCustom Class however in the code have not a point to give the program for Custom Indicator files name.
So I would like to know, what is the tick to play this.
And this my code!!
CiCustom m_hw;
MqlParam m_hw_param[];
//
m_hw_param[0].integer_value=m_number;
//--- initialize object
if(!m_hw.Create(m_symbol.Name(),0,IND_CUSTOM,1,m_hw_param)) <--- where to set file name of custom indicators
{
printf(__FUNCTION__+": error initializing object");
return(false);
}
In normal we use this it have!
int iCustom(
string symbol, // symbol name
ENUM_TIMEFRAMES period, // period
string name // folder/custom_indicator_name <--- set file name here!!
... // list of indicator input parameters
);
If you are know, so please advise me.
Chaiya