Experts: Expert Ichimoku

 

Expert Ichimoku:

An Expert Advisor based on the iIchimoku (Ichimoku Kinko Hyo) indicator.

Expert Ichimoku

Author: Vladimir Karputov

 
Stop loss does not appear to be working on this EA even though it is set up? Other than that a great EA. Thoughts on the stop loss?
 
Sorry not stop loss, that is typo. I ment its trailing stop does not appear to be managed by the EA even when set up.
 
Automated-Trading:

Expert Ichimoku:

Author: Vladimir Karputov

hi vladimir,


tried compiling your source code but got an error showing as seen below/the attached file.. i'm just new to the mt5 environment and hope to try your strategy.. response from you much appreciated.. thank you very much!

'INIT_FAILED' - expression not boolean Ichimoku-vladimir.mq5 335 20

'INIT_FAILED' - expression not boolean Ichimoku-vladimir.mq5 341 17

 

error-code

 
Jomer Damalerio :

hi vladimir,


tried compiling your source code but got an error showing as seen below/the attached file.. i'm just new to the mt5 environment and hope to try your strategy.. response from you much appreciated.. thank you very much!

'INIT_FAILED' - expression not boolean Ichimoku-vladimir.mq5 335 20

'INIT_FAILED' - expression not boolean Ichimoku-vladimir.mq5 341 17

 

Thank you for message. Version 1.001 published in the Russian forum

Expert Ichimoku
Expert Ichimoku
  • www.mql5.com
Советник работает по индикатору iIchimoku (Ichimoku Kinko Hyo). Если последняя позиция была закрыта с убытком, тогда следующая будет с увеличенным объемом (увеличение объема одноразовое, наращивания объема нет). Входные параметры Stop Loss - Стоп Лосс; Take Profit - Тейк Профит; Trailing Stop - трейлинг; Trailing Step - шаг трейлинга; Maximum...
 
Vladimir Karputov #:

Thank you for message. Version 1.001 published in the Russian forum

Hi Vladimir

I learned a lot from this expert and thank you for sharing this with us.

This expert work fine with must pairs but Why it doesn't work with BTC and other cryptos?

I have Alpari Demo and live account and every thing is fine with other pairs.

Thanks

 
amin ghanbari # :

Hi Vladimir

I learned a lot from this expert and thank you for sharing this with us.

This expert work fine with must pairs but Why it doesn't work with BTC and other cryptos?

I have Alpari Demo and live account and every thing is fine with other pairs.

Thanks

Enable code debugging and test step by step. 

 
Vladimir Karputov #:

Enable code debugging and test step by step. 

Thanks for your response.

I Do debugging and found that incorrect SL due to high spread caused this problem.

 
amin ghanbari # :

Thanks for your response.

I Do debugging and found that incorrect SL due to high spread caused this problem.

The code inside the Expert Advisor is correct - but if at the moment of placing the price makes a strong movement, the POSITION will not be opened.

 
Vladimir Karputov #:

The code inside the Expert Advisor is correct - but if at the moment of placing the price makes a strong movement, the POSITION will not be opened.

I think this section should modified for crypo:


//--- tuning for 3 or 5 digits
   int digits_adjust=1;
   if(m_symbol.Digits()==3 || m_symbol.Digits()==5)
      digits_adjust=10;
   m_adjusted_point=m_symbol.Point()*digits_adjust;

   ExtStopLoss    = InpStopLoss     * m_adjusted_point;
   ExtTakeProfit  = InpTakeProfit   * m_adjusted_point;
   ExtTrailingStop= InpTrailingStop * m_adjusted_point;
   ExtTrailingStep= InpTrailingStep * m_adjusted_point;


When I use RISK for deteminig lot I see getpointer error and i have to use fix LOT:

//+------------------------------------------------------------------+
//| Lots or risk in percent for a deal from a free margin            |
//+------------------------------------------------------------------+
bool LotsOrRisk(const double lots,const double risk,const int digits_adjust)
  {
   if(lots<0.0 && risk<0.0)
     {
      Print(__FUNCTION__,", ERROR: Parameter (\"lots\" or \"risk\") can't be less than zero");
      return(false);
     }
   if(lots==0.0 && risk==0.0)
     {
      Print(__FUNCTION__,", ERROR: Trade is impossible: You have set \"lots\" == 0.0 and \"risk\" == 0.0");
      return(false);
     }
   if(lots>0.0 && risk>0.0)
     {
      Print(__FUNCTION__,", ERROR: Trade is impossible: You have set \"lots\" > 0.0 and \"risk\" > 0.0");
      return(false);
     }
   if(lots>0.0)
     {
      string err_text="";
      if(!CheckVolumeValue(lots,err_text))
        {
         Print(__FUNCTION__,", ERROR: ",err_text);
         return(false);
        }
     }
   else
      if(risk>0.0)
        {
         if(m_money!=NULL)
            delete m_money;
         m_money=new CMoneyFixedMargin;
         if(m_money!=NULL)
           {
            if(!m_money.Init(GetPointer(m_symbol),Period(),m_symbol.Point()*digits_adjust))
               return(false);
            m_money.Percent(risk);
           }
         else
           {
            Print(__FUNCTION__,", ERROR: Object CMoneyFixedMargin is NULL");
            return(false);
           }
        }
//---
   return(true);
  }
//+------------------------------------------------------------------+
 
amin ghanbari # :

***

When I use RISK for deteminig lot I see getpointer error and i have to use fix LOT:

You see your mistake - think: what value of risk are you setting?