DislikedYou are posting decompiled code.
Anyway, to answer your question: as far as I know, the MQL4 instructions Alert() and SendMail() work the same way in EAs as they do in indicators. You place the instruction in your code at the point where you want the alert to occur.Ignored
So here is my code, I think I didn't have to know the indicator code because it's all about understanding "buffers"
Inserted Code
datetime start_time; bool buy = false, sell = false; int indiSignal() { double BuyArrow = iCustom(NULL, 0,"custom indi",/*indi parameters*/, 0, 1); //0=buffer0 for buy signal double SellArrow= iCustom(NULL, 0,"custom indi",/*indi parameters*/, 1, 1); //1=buffer1 for sell signal if (Time[0] != start_time) { // each new candle start_time = Time[0]; if (BuyArrow < EMPTY_VALUE && BuyArrow > -1 && SellArrow == -1 && sell) { Print ("Signal BUYArrow = ", BuyArrow, " SellArrow = ", SellArrow); sell = false; return (1); } if (SellArrow < EMPTY_VALUE && SellArrow > -1 && BuyArrow == -1 && buy) { Print ("Signal SELLArrow = ", SellArrow, " BuyArrow = ", BuyArrow); buy = false; return (-1); } } else { if (BuyArrow < EMPTY_VALUE && BuyArrow > -1 && SellArrow == -1) buy = true; if (SellArrow < EMPTY_VALUE && SellArrow > -1 && BuyArrow == -1 ) sell = true; } return (0); }
You can find a more detailled explanation here:
http://forum.mql4.com/47490/page2
Hope it helps!