帖子
作者
回复/查看
最后发表
哦
天天向上 10:35:47
/| MACD Sample.mq4 |
//| Copyright ?2005, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
extern double TakeProfit = 50;
extern double Lots = 0.1;
extern double TrailingStop = 30;
extern double MACDOpenLevel=3;
extern double MACDCloseLevel=2;DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
红面积:SUM(MACD,BARSLAST(MACD<0))*(MACD>0),COLOR0000FF,NODRAW;
绿面积:SUM(MACD,BARSLAST(MACD>0))*(MACD<0),COLORFFFF00,NODRAW;
AA:=ROUND(REF(绿面积,1)*100);
BB:=ROUND(REF(红面积,1)*100);
DRAWNUMBER(CROSS(0,MACD),HHV(REF(MACD,1),5)+0.03,ABS(BB)),COLORMAGENTA;
DRAWNUMBER(CROSS(MACD,0),LLV(REF(MACD,1),5)-0.03,ABS(AA)),COLORGREEN;
extern double MATrendPeriod=26;
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start()
{
double MacdCurrent, MacdPrevious, SignalCurrent;
double SignalPrevious, MaCurrent, MaPrevious;
int cnt, ticket, total;
// initial data checks
// it is important to make sure that the expert works with a normal
// chart and the user did not make any mistakes setting external
// variables (Lots, StopLoss, TakeProfit,
// TrailingStop) in our case, we check TakeProfit
天天向上 10:36:07
2013-02-22 02:55
2012-09-02 05:18
2012-08-31 12:44
2012-07-14 14:09
2012-07-13 15:16
2012-06-03 11:12
2012-05-04 09:19
2012-05-03 14:34
2012-05-03 11:33
2012-04-22 12:02
2012-04-18 04:48
2012-04-16 12:46
2012-04-13 01:11
2012-04-12 04:47
2012-04-08 05:08
2012-04-07 12:54