Experts: ZigZag EA - page 2

 
kwlin_089:

Для моего использования есть проблема, которую я пытался настроить, но это не сработало, STOP LOSS и TAKE PROFIT не позиционируются.

Пример: TAKE PROFIT = 100% и STOP LOSS 0.0%, как указано на изображении ниже, но не останавливайте или не извлекайте прибыль.

1. Проверяйте пожалуйста на нормальном символе. Например на EURUSD.

 

Vladimir Karputov

I figured out what the EA problem is, in fact, it is working with the inverted fibonacci retraction tool, you need to check this out.

For example: when placing the STOP LOSS in 0.0% of the FIBONACCI, the stop should go to the bottom of the zigzag down, but this is happening instead, I have to put 100% of the FIBONACCI to go to the bottom, it is precisely by For this reason, TAKE PROFIT is not positioned because 0.0% is exactly in the order opened in which case 161.8% is inverted and it is not possible to adjust TAKE PROFIT.

This EA needs to be updated to work properly!

Thank's for your time!

 

Below I leave two images, the first as it should be for TAKE PROFIT work, and the second image as EA is actually doing, making it impossible to position TAKE PROFIT with the fibonacci points correctly.

you can check on your MT5 and you will see that the fibonacci is actually being traced incorrectly!

Files:
 
Hi, can you enter the CCI to confirm the purchase?
example
if CCi + -100 then buy / sell

thank you

ALex

 
Alessandro Ronci :
Hi, can you enter the CCI to confirm the purchase?
example
if CCi + -100 then buy / sell

thank you

ALex

The Expert Advisor places pending orders - so no one can say at what time the pending order will trigger. So no one can find out what value the CCI indicator will have at the moment the order triggers.

Your idea is impossible - it is from science :)

 

The Fibo calculation is not wrong, its just a bug.

Change the lines in OnTick() for TakeProfit to add GetFibo

from 

StopLoss=(int)((size_corridor/100.0*GetFibo(Fibo_StopLoss))/m_symbol.Point());//  ???
TakeProfit=(int)(((size_corridor/100.0*Fibo_TakeProfit)-size_corridor)/m_symbol.Point());//  ???

 to

StopLoss=(int)((size_corridor/100.0*GetFibo(Fibo_StopLoss))/m_symbol.Point());//  ???
TakeProfit=(int)(((size_corridor/100.0*GetFibo(Fibo_TakeProfit))-size_corridor)/m_symbol.Point());//  ???


Nice Code :-)

 
deanheslington :

The Fibo calculation is not wrong, its just a bug.

Change the lines in OnTick() for TakeProfit to add GetFibo

from 

StopLoss=( int)((size_corridor/ 100.0*GetFibo(Fibo_StopLoss))/m_symbol. Point()); //  ???
TakeProfit=( int)(((size_corridor/ 100.0*Fibo_TakeProfit)-size_corridor)/m_symbol. Point ());//  ???

 to

StopLoss=( int)((size_corridor/ 100.0*GetFibo(Fibo_StopLoss))/m_symbol. Point()); //  ???
TakeProfit=( int)(((size_corridor/ 100.0*GetFibo(Fibo_TakeProfit))-size_corridor)/m_symbol. Point()); //  ???


Nice Code :-)

What is it?

 
error compiling, INIT FAILED is not bolean expression
 
Rodrigo Silva :
error compiling, INIT FAILED is not boolean expression

The MQL5 language has become more rigorous - so only now has this error occurred.

The alternative solution was this:

         if(!m_money.Init(GetPointer(m_symbol),Period(),m_symbol.Point()*digits_adjust))
            return(INIT_FAILED);
         m_money.Percent(risk);
        }
      else
        {
         Print(__FUNCTION__,", ERROR: Object CMoneyFixedMargin is NULL");
         return(INIT_FAILED);
        }
     }
//---
   return(true);
  }
//+------------------------------------------------------------------+ 
//| Create the horizontal line| 
//+------------------------------------------------------------------+ 

do the following:

         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);
  }
//+------------------------------------------------------------------+ 
//| Create the horizontal line| 
//+------------------------------------------------------------------+ 
 
Corrected version 1.003: ZigZag EA
ZigZag EA
ZigZag EA
  • www.mql5.com
Опубликовал: Vladimir Karputov Просмотров: 990 Рейтинг: Опубликован: 2018.07.17 14:49 Обновлен: 2019.11.23 07:13 Советник использует данные с пользовательского индикатора "ZigZag". По данному индикатору определяется канал, и по границам канала выставляются отложенные ордера Buy Stop и Sell Stop. После срабатывания отложенного ордера для...