FREE EA: The Forbidden Fruit EA - page 4

To add comments, please log in or register
Cuong Truong
5138
Cuong Truong  

Here's the MQL4 source code for The Forbidden Fruit EA

Files:
Carl Schreiber
Moderator
7424
Carl Schreiber  
Alain Verleyen:
Why is the source code not available publicly ?
May be Metatrader needs a lot of time to approve. I have sent in an article for a review Nov. 22, 2015 and haven't got any answer yet except we'll look at it :(
ffoorr
1161
ffoorr  

Hello,

If you add a "property strict, you can correct some error :

extern int BarsToLookBack = 100; // This variable is for iHighest and iLowest values.

// The sliipage is an int : 
extern int slip = 3;


string CurrentBalance = DoubleToStr(AccountBalance(), 0); // (?) to be checked  
string CurrentEquity  = DoubleToStr(AccountEquity(), 0);


And some other little error.

for the close all :

void CloseAllOrders() {
   for (int trade = OrdersTotal() - 1; trade >= 0; trade--) {
      if(!OrderSelect(trade, SELECT_BY_POS, MODE_TRADES))continue;
      if (OrderSymbol() == Symbol()) {
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber) {
            if ( (OrderType() == OP_BUY) || (OrderType()== OP_SELL) ) 
            if(!OrderClose(OrderTicket(), OrderLots(),OrderClosePrice(), slip, Blue)) GetLastError();
         }
         Sleep(1000);
      }
   }
}
ffoorr
1161
ffoorr  

Your entry's condition are too restrictive, they are never fullfilled :

cci do not show up in strategy tester, because this condition is never fullfilled :

 

 Bid < iMA(NULL,0,1,0,0,PRICE_MEDIAN,0) 


try this

  if( (MaxBuyTrades < MaxOrders)
             && Bid < iLowest(NULL,0,MODE_OPEN,BarsToLookBack,0)  
             && iMACD(NULL,0,1,2,2,0,0,0) < 0  
             && iDeMarker(NULL,0,14,0) < 0.3   
             && Bid < iMA(NULL,0,1,0,0,PRICE_MEDIAN,0) 
             && iCCI(NULL,0,4,0,0) <= -100 
              ) //buy rule


and then this :

  if( (MaxBuyTrades < MaxOrders)
             && Bid < iLowest(NULL,0,MODE_OPEN,BarsToLookBack,0)  
             && iMACD(NULL,0,1,2,2,0,0,0) < 0  
             && iDeMarker(NULL,0,14,0) < 0.3   
            // && Bid < iMA(NULL,0,1,0,0,PRICE_MEDIAN,0) 
             && iCCI(NULL,0,4,0,0) <= -100 
              ) //buy rule
ffoorr
1161
ffoorr  

With some error corrected :

Cuong Truong
5138
Cuong Truong  
 Bid < iMA(NULL,0,1,0,0,0,0) 

I used that line of code above because I wanted the EA to limit the buy orders.

That condition will full fill, but not all the time. It happens rarely :)

ffoorr
1161
ffoorr  

Your expert has a counter trend strategy, it use filter to pin point the higher and the lower, it is easy to create an indicator with the five fllters, to see and adjust on the screen the buy and sell order zone.

Mohammad Wahdat Wassel
1650
Mohammad Wahdat Wassel  
Cuong Truong:

I used that line of code above because I wanted the EA to limit the buy orders.

That condition will full fill, but not all the time. It happens rarely :)

Hi did you have a look at the FF_ii version that ffoorr uploaded? Do you approve that?


freedom123
11
freedom123  

a person I know gave me this indi to calculate range. maybe it could be added to the EA too and make it calculate the range as it goes? i ve put the EA on demo for a week and so far only profits....

 do you think if in the near future i want to go live a 500 euro account is enough? or it risks to get blown easily? 

Cuong Truong
5138
Cuong Truong  
freedom123:

a person I know gave me this indi to calculate range. maybe it could be added to the EA too and make it calculate the range as it goes? i ve put the EA on demo for a week and so far only profits....

 do you think if in the near future i want to go live a 500 euro account is enough? or it risks to get blown easily? 

The strategy test showed a minimum of $1000 USD.
To add comments, please log in or register