EA with custom indicators

 

Hello,

I have an indicator here that detects the intersection between to moving averages and then gives an alert on intersection points.

could anybody PLEASE tell me how to get these signals from this indicator using an EA

i have tried using iCustom, but it return a constant big weird integer!

PLEASE HELP

thanks

p.s. custom indeicator in attachments

Files:
 

maybe u do below for code in ur EA

int FasterEMA=4;               //indicator extern.1 default preset
int SlowerEMA=8;               //indicator extern.2 default preset
bool SoundON=true;             //indicator extern.3 default preset
//
#define UP 0
#define DN 1
int indicatorBufferIndex;      //can be 0/CrossUp[] or 1/CrossDown in iCustom()
int barShift=0;                //can be any value between 0..Bars-1 in iCustom()
double crossU,crossD;          //hold results call iCustom()
//
//here examples wat u maybe do - u must give value barShift wat u like, 0 only give latest index buffer value
//
indicatorBufferIndex = UP;
crossU = iCustom(NULL,0,"EMA-Crossover_Signal",FasterEMA,SlowerEMA,SoundON,indicatorBufferIndex,barShift);
//
indicatorBufferIndex = DN;
crossD = iCustom(NULL,0,"EMA-Crossover_Signal",FasterEMA,SlowerEMA,SoundON,indicatorBufferIndex,barShift);
//
//
//iCustom() HELP:
//Calculates the specified custom indicator and returns its value.
//The custom indicator must be compiled (*.EX4 file) and be in the terminal_directory\experts\indicators directory. 
//
//u indicatorBufferIndex control wat line bufr u take data from and barShift control data element [..]
//play with Print() see wat u get
 

thanks for the advice fbj

i'll try that

 

i have added this code to the EA but it make the whole MT4 crashes.

any suggestions?

thanks

 

i have added this code to the EA but it make the whole MT4 crashes.

yes - it prob would..

is *example* mql4 code syntax - u must learn how use some/all presented 'ideas' - not just 'added this code'

ea dangerous thinngs - btr know wat do by trial error - i give ideas 4 u think get ind data in 'your' code..

u maybe not like ideas so u learn do self and now U master ;)

please to research here

best

Reason: