Why does not Buy/Sell this EA?

 

Dear My friends,

Why does not Buy/Sell this EA?

Files:
123.mq4  2 kb
 
rezame:

Dear My friends,

Why does not Buy/Sell this EA?

Please change code.


res=OrderSend(Symbol(),OP_BUY,0.05,Ask,3,Ask-30*Point,Ask+5*Point,"MyEABuy",0,0,Green);
// res=OrderSend(Symbol(),OP_BUY,0.05,Ask,3,Ask-30*Point,Ask+5*Point);
res=OrderSend(Symbol(),OP_BUY,0.05,Bid,3,Bid+30*Point,Bid-5*Point,"MyEASell",0,0,Green);
// res=OrderSend(Symbol(),OP_SELL,0.05,Ask,3,Ask+30*Point,Ask-5*Point);

i have a tested. but not profitable your EA.

 
rezame:

Dear My friends,

Why does not Buy/Sell this EA?

i am change your code and tested :2002.02.20 - today result is very good. timeframe is D1 .


//+------------------------------------------------------------------+
//| 3.mq4 |
//| Copyright © 2008, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+


/// double MATrendPeriod=26;
double WPR, Mom, CCI,MA;
int prevtime;
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
//----
if (Time[0] == prevtime) return(0);
prevtime = Time[0];
int res;
Mom=(iMomentum(NULL,0,12,PRICE_CLOSE,0)-iMomentum(NULL,0,12,PRICE_CLOSE,1));
WPR=(iWPR(NULL,PERIOD_M15,12,0)-iWPR(NULL,0,12,1));
CCI= (iCCI(NULL,0,12,PRICE_CLOSE,0)-iCCI(NULL,0,12,PRICE_CLOSE,1));
MA =iMA(NULL,0,13,8,MODE_SMMA,PRICE_MEDIAN,0)-iMA(NULL,0,13,8,MODE_SMMA,PRICE_MEDIAN,1);
Print("Mom=",Mom);
Alert("WPR=",WPR);
Alert("CCI=",CCI);
Alert("MA=",MA);
// if( CCI>0 && Mom>0)
if( CCI<0 && Mom<0)

{
res=OrderSend(Symbol(),OP_BUY,0.40,Ask,3,Ask-125*Point,Ask+125*Point,"HaskayaFxZigzagBuy",0,0,Green);
// res=OrderSend(Symbol(),OP_BUY,0.05,Ask,3,Ask-30*Point,Ask+5*Point);
Print("Mom=",Mom);
Alert("WPR=",WPR);
Alert("CCI=",CCI);
Alert("MA=",MA);
}
if( CCI>0 && Mom>0)

// if( CCI<0 && Mom<0)
{
res=OrderSend(Symbol(),OP_BUY,0.40,Bid,3,Bid+125*Point,Bid-125*Point,"HaskayaFxZigzagSell",0,0,Green);
// res=OrderSend(Symbol(),OP_SELL,0.05,Ask,3,Ask+30*Point,Ask-5*Point);
}
RefreshRates();
return(0);
}



//+------------------------------------------------------------------+

 

Hello,

nice results :-)

but I see that system is playing/earning only with up-trend and opens only 0.4 lots.

Are you thinking about join to it sell options and some money management? compound percentage (<-- sorry, i don't know is this phfrase is correct in english :)) for example?

 
https://www.mql5.com/en/articles/1526
Reason: