Can someone modify this EA

 

I would like this Ea modified. Only thing that i would like changed is instead of the Fast MA indicator to use the custom indicator DEMA.

extern string MA1Method = "Simple"; Change to ICustom DEMA from standard MA.

extern string MA2Method = "Simple"; (KEEP AS IS)

------------------------------------------------------------------------------

I guess the code below would need to be completely changed as or mode_DEMA can be added and as long as it knows to look for DEMA as a custom indicator.

int MA1MethodSelected = 0;

//------------------ CLOSE -------------------------

if(MA1Method == "Simple") {MA1MethodSelected = MODE_SMMA; } change to call DEMA Icustom

else if(MA1Method == "SIMPLE") {MA1MethodSelected = MODE_SMMA; } change to call DEMA Icustom

else if(MA1Method == "S") {MA1MethodSelected = MODE_SMMA; } change to call DEMA Icustom

else if(MA1Method == "s") {MA1MethodSelected = MODE_SMMA; } change to call DEMA Icustom

else if(MA1Method == "simple") {MA1MethodSelected = MODE_SMMA; } change to call DEMA Icustom

I will attach the EA and the custom indicator if someone can show me how to use the ICUSTOM in this situation or if you can be so kind and modify the code so that MA1 looks at value of DEMA custom indicator instead.

I currently use Prorealtime to alert me when these crosses occur and then i manually enter into a trade.

Thank you in advance.

Files:
 
DEMA indicator attached.
Files:
dema.mq4  2 kb
 
Plenty of people very happy to modify your EA here: We modify MT4 & MT5 EAs
 
RaptorUK:
Plenty of people very happy to modify your EA here: We modify MT4 & MT5 EAs


Its ok i decided to build from scratch no need to modify i just need to add a variable and compile will work.

shortEma = iCustom(NULL, 0, DEMA.mq4, 21, 0); 

If i only knew what to add. =)

ERROR

'DEMA.mq4' - variable not defined C:\Program Files (x86)\MetaTrader - Alpari UK\experts\my_first_ea.mq4 (64, 29)

 
lionixa:


Its ok i decided to build from scratch no need to modify i just need to add a variable and compile will work.

If i only knew what to add. =)

ERROR

'DEMA.mq4' - variable not defined C:\Program Files (x86)\MetaTrader - Alpari UK\experts\my_first_ea.mq4 (64, 29)

Where have you looked for info ? the documentation ? iCustom() the forum search ? or didn't you bother and you just asked here ?

"DEMA" has one extern so you need to pass that in the iCustom call . . . for example (see below) also I suspect you have the wrong buffer number (21) . . .

shortEma = iCustom(NULL,         0,           DEMA,               12,               0,    0); 

//               Symbol, timeframe, Indicator name, Extern variables,   buffer number, shift
 
RaptorUK:

Where have you looked for info ? the documentation ? iCustom() the forum search ? or didn't you bother and you just asked here ?

"DEMA" has one extern so you need to pass that in the iCustom call . . . for example (see below) also I suspect you have the wrong buffer number (21) . . .


I have been looking how to successfully add this indicator into an EA for months now because my charts currently wake me in the middle of the night to make a trade.

All the trades are valid so i follow the signal i just wanted to automate it but looks like my lack of programming knowledge stops me from going forward here.

I have been looking on this website, google search, have joined multiple of forums. Seems none use DEMA out there.

I think you for your attention and help.

Ps. i still get the same error even if i put 12 instead of 21. tried buffer 0-8. none worked.

 
lionixa:


Ps. i still get the same error even if i put 12 instead of 21. tried buffer 0-8. none worked.

12 isn't the buffer number . . . it's the extern variable that DEMA needs . . . you did use DEMA and not DEMA.mq4 ? the buffer number is 0, DEMO only has one buffer . . . you are going to have to read lots and learn a bit if you want to make this happen . . . did you read any of the stuff at the links I gave you ?
 
lionixa: If i only knew what to add. =)

Detailed explanation of iCustom - MQL4 forum


lionixa: I would like this Ea modified.
This is a very different question. You don't know how to code and you don't want to learn, so you must or pay someone.
 
Thank you for your detailed explanation of Icustom. I managed to make it work. At the same time i have requested for a quote from a programmer but i dont think they can add much to this existing EA as it is. Who would of thought i was missing " " to finish my Icustom. I went to school to learn networking admin and some basic HTML wish i had taken interest in C, c++. Thank you again.
Reason: