Mastering DoubleUp: Your Go-To EA for MetaTrader 5

Mike 2017.01.20 02:09 13 0 0
Attachments

Created by: HazemMQL5 Code Author: barabashkakvn.

The real challenge with this code lies in comparing the iCCI and iMACD values against the "Buy Sell Level" variable. You might find that these indicator values differ significantly, sometimes by multiples.

Take a look at the example for pairs like EURUSD, USDJPY, and USDSEK across all timeframes available in MetaTrader 5:

iCCI max min

iMACD max min

As you can see, the iCCI readings are relatively stable, while iMACD is heavily influenced by the price action of the symbol. To tackle this, we can adjust iMACD values by multiplying them with a ratio:

void OnTick()
  {
//----
   m_ext_lot=NormalizeDouble(m_account.Balance()/50001.0,2);
   if(m_ext_lot<0.1)
      m_ext_lot=0.1;

   m_cci=iCCIGet(0);
   m_macd=iMACDGet(MAIN_LINE,0)*1000000;

   m_buy_total=0;
   m_sell_total=0;

DoubleUp2 Open and Close

Pro Tip: Try using EURUSD on the M30 timeframe for optimal results.

Here are the results from January 8, 2016, to November 6, 2016, using EURUSD on the M30 timeframe with an initial deposit of $10,000:

DoubleUp2 Open and Close tester

 

List
Comments 0