Can this custom indicator ( iTrend.mq4 ) be programmed into an existing EA ...of so how would it be coded ???
- Dose it posible to creat any function of "mql code" posting in this forum?
- KG FIMOM System ... (A Simple System)
- Check if custom indicators exist's
??
if you are asking how to use, or call, a custom indicator, it's very simple... use the "iCustom" to define the function like this
double MyTrend=iCustom(NULL,0,"iTrend",0,0);
place the indicator in the "expert/indicator/" directory... then there is no need to specify either the path, or use the .mq4 file extension.
everything you need to know about the other values is in the MetaEditor Library. Other than that, my understanding is that trying to build the indicator into your EA like a function is a waste of time and computer resources. you do not really gain anything, terminal handles indicators and EA's differently and the processing of the indicator would chew up availability of the EA to Terminal thread. As separate files they would not conflict with each other.
if you are asking how to use, or call, a custom indicator, it's very simple... use the "iCustom" to define the function like this
place the indicator in the "expert/indicator/" directory... then there is no need to specify either the path, or use the .mq4 file extension.
everything you need to know about the other values is in the MetaEditor Library. Other than that, my understanding is that trying to build the indicator into your EA like a function is a waste of time and computer resources. you do not really gain anything, terminal handles indicators and EA's differently and the processing of the indicator would chew up availability of the EA to Terminal thread. As separate files they would not conflict with each other.
Yes, it's possible (see article Transferring an Indicator Code into an Expert Advisor Code. General Structural Schemes of an Expert Advisor and Indicator Functions), but why?
I did what you suggest and now I get this message when I compile...............'iCustom' - initialization expected C:\Program Files\Interbank FX Trader 4Demo\experts\PTTrend_201].1.mq4 (15, 16)
There are 7 ...So its P1 through to P7 as follows double MyTrend=iCustom(NULL,0,"iTrend",P1, P2, P3, P4, P5, P6,P7, 0,0);
This is what I have now double MyTrend=iCustom(NULL,0,"iTrend",0,0,0,40,8,25,200,0,0)....and I stil get the same error message 'iCustom' - initialization expected C:\Program Files\Interbank FX Trader 4Demo\experts\PTTrend_201].1.mq4 (15, 16)
Is the name iTrend or i_Trend ?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use