Expert Advisor Script Manual/Userguide ?

 
Hi, everybody, I interest to learn more on expert script, where can I get the manual or userguide, by the way, i have use metatrader to trader forex since 2 years ago, i am tired with continuing monitoring the market, my eyes get red, i wonder if i can learn to write an expert advisor program that can alert me with sound or anyway, so that i can only need to look at the chart at these moments. Thanks for anyone who willing to advice me.
 
Try this link it may help
"how can i setup a alert when closeprice come to my aim?"

You can use this as a starting code and modify it to suit your system.
The help files are contianed in the MetaEditor which is where you compile your code and more help here on this website..
 
Hi, everybody, I interest to learn more on expert script, where can I get the manual or userguide, by the way, i have use metatrader to trader forex since 2 years ago, i am tired with continuing monitoring the market, my eyes get red, i wonder if i can learn to write an expert advisor program that can alert me with sound or anyway, so that i can only need to look at the chart at these moments. Thanks for anyone who willing to advice me.


Thanks for the guideline, i will look into it... Cheers
 
I have try the program, it works.... finally i see the power of advisor programs. Thanks.

Anyway, l would like to learn to put a simple strategy , let say, two SMA(10) & (20) lines are crossing, then using "alert sound" features to inform me the chance of entering a trade, how would i do that ?
 
Try this as a start, I have not tested it properly as I dont know if the flag set up is correct.
The way I hope I have set it up is the flag is set to zero when the code starts so it will only start working when a BUY signal is given, from there the flag is set to 1 so the next alert will be a SELL signal, then BUY and so on.
I am self taught so there could be a far better way than this but it may help you..............

//| MA Crossing Alert.mq4 |

extern double MA1 = 10;
extern double MA2 = 20;
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
static int flag ;
double sma1,sma2;

sma1 = iMA(NULL,0,MA1,0,MODE_SMA,PRICE_CLOSE,0);
sma2 = iMA(NULL,0,MA2,0,MODE_SMA,PRICE_CLOSE,0);

if (flag ==0)
if ( sma1 > sma2)

{
Alert(" MA Crossed UP. ! BUY ! ");

Print(" MA Crossed UP. ! BUY ! ");

flag = 1 ;
}

if (flag ==1)
if ( sma1 < sma2)

{
Alert(" MA Crossed DOWN. ! SELL ! ");

Print(" MA Crossed DOWN. ! SELL ! ");

flag = 0;
}

}
//+------------------------------------------------------------------+
 
Thanks for your advice, mpfx, i will compile and let you know the result. On my next step, i will insert the autotrade functions to test in real time. It is a great help for u.
Reason: