Обсуждение статьи "Автоматический поиск дивергенций и конвергенций" - страница 2

 

Oui ça fonctionne parfaitement, il faut mettre le paramètre Alerts_bar1 ou Alerts_bar0.

Merci, bonjour chez vous.

 

Здравствуйте,

Не подскажите как реализовать Определение экстремума по пороговому значению. на МТ4.? Прочитал Вашу стать, покопался в коде приложенных файлов, но так и не понял как можно использовать только данную функцию на МТ4.

Спасибо.

 
Здавсвуйте, может я что-то делаю не так но индикатор не запускается.
 

Good:


Thank you very much for your article, the truth is that I am learning a lot from everything you have elaborated and I appreciate your time.


I am currently trying to import the buf_buy and buf_sell buffers using icustom:


 double SIGNALS_HANDLE_B1 = iCustom ( Symbol (), Period (), "DIVERGENCE.ex5" ,Alerts_off, 3 ,ExtrBars, 2 ,- 1 , 5 , 0 , 0 , true , true , true ,Green,Red, "CUSTOM INDICATOR" , 14 , 14 , 14 , 1 , 1 , 0 , 0 , 1 );
double SIGNALS_HANDLE_S1 = iCustom ( Symbol (), Period (), "DIVERGENCE.ex5" ,Alerts_off, 3 ,ExtrBars, 2 ,- 1 , 5 , 0 , 0 , true , true , true ,Green,Red, "CUSTOM INDICATOR" , 14 , 14 , 14 , 1 , 1 , 0 , 0 , 2 );


If I have not written correctly, it is in buffer 1 and 2 respectively.


I understand that the content of these buffers is 0 to say that there is no buy / sell signal and 1 to say that there is a buy / sell signal. Is that so?


What I want to do, I have been looking at the code and I think I am applying something wrong or I have raised the wrong solution and it would be the following:



If there is an interpreted signal 1 that is buy / sell it is:

 if (SIGNALS_HANDLE_B1 = 1 )


----
---
--
///BUY CODE///

---
---
---

I think the buffer contains other data from the custom indicator that I apply to see the differences in it. I don't know how to tell you that if there is a buy / sell signal, it is that "1". I have also looked at the code part:


   int cnt;   
   
   if (prev_calculated== 0 ){
      cnt=rates_total;
   }
   else { 
      cnt=rates_total-prev_calculated+ 1 ; 
   }
   
   if ( CopyBuffer (h, 0 , 0 ,cnt,buf_osc)<= 0 ){
       return ( 0 );
   }   

   diver.Calculate(  rates_total,
                     prev_calculated,
                     time,
                     high,
                     low,
                     buf_osc,
                     buf_buy,
                     buf_sell);
                     
   if (ArrowsOnChart || DrawLines){
       ChartRedraw ();
   

      
   }

   return (rates_total);                
}   

I think that converts this calculation through CNT and "diver.Calculate" ... there I got stuck and I've been trying for days to solve and understand my mistake.


I appreciate any hint or generic example. I don't need you to solve me, I just want to learn your codes.


Very thankful.

 
Совершенно не против на все вопросы ответить, но дело в том, что не всегда получается их заметить. Если что, если долго нет ответа - пишите в личку, что мол там-то и там-то висит вопрос...
 
odlambda:


No escriba ".ex5" al final del nombre del indicador para la función iCustiom ().

1. Obtener el mango. Hazlo en la función OnInit ().

2. Copia de búfer. Utilice la función CopyBuffer () para ello.

3. Por lo general, la flecha existe si el valor no es igual a 0 y no es igual a EMPTY_VALUE.

Ver artículos (english):

https://www.mql5.com/en/articles/37

https://www.mql5.com/en/articles/43

https://www.mql5.com/en/articles/31

https://www.mql5.com/en/articles/127

O busque artículos en español: https://www.mql5.com/es/articles/mt5/page15

¿Para qué terman haces? MT4 o MT5?
 
odlambda:

///

In MT5 function iCustom() returns type int, not double.
 
::) 
 

Thanks , yes its for MT5 and EA.I read all your info, very thanks!!!!in this days i write you!


Very very thanks!!!!

 

Hello again:


I was able to fix the program at the end and find the error, I had to take the data from buffer 1 and 2 and transfer it to the buffer using “CopyBuffer” and say that it is not “0” for EMPTY_VALUE .

Also add an “If” with a larger and smaller than, as it had other variables.


Correct what you said about the int type, instead of the double, completely ignore this function, I am very grateful to you.


For a beginner, it cost me a little, but in the end it turned out to be easier than I imagined, and this greatly complicated me.


On the other hand:

I am trying to create prices of another index in one indicator. Instead of the RSI or MACD oscillator showing me linearly the price of an asset (future, currency), etc. But let's see how I can find a solution :)


Thank you very much for the information, very useful and what I noted.

Причина обращения: