Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 311

 
Nauris Zukas:

I've done it this way for now, but if you've suggested differently, correct me:

datetime Paused;

void OnTimer()
 {
 // код 1
  if(Paused<=TimeCurrent()) {
    // код 2
    Paused=TimeCurrent()+2; // 2 секунды
  }
 }

But again, there will be some inaccuracies

 
Youri Lazurenko:

Don't think I'm being cheeky, but I still want to get to the bottom of it. I downloaded these indicators again from the page of the author of the strategy on Forex Factory (free access, the whole package, for 2012). I compared them to mine, I do not see any difference. Will the decompiler be published there too. If you can, or need, I can attach the files (I will not immediately so as not to break the taboo).

Don't, you will be punished.
 
Youri Lazurenko:

Don't think I'm being cheeky, but I still want to get to the bottom of it. I downloaded these indicators again from the page of the author of the strategy on Forex Factory (free access, the whole package, for 2012). I compared them to mine and see no difference. Will the decompiler be published there too. If you can, or need, I can attach the files (I will not immediately so as not to break the taboo).

Read at your leisure

Не могу участвовать во Фрилансе.
Не могу участвовать во Фрилансе.
  • 2017.09.18
  • www.mql5.com
Я, как разработчик, не могу подать заявку на выполнение работы. Внизу описания заказчика у меня активно только две ссылки "В карман" и "Жалоба...
 
Vitaly Muzichenko:

But again, there will be some uncertainties

I see, thank you!

 
Vitaly Muzichenko:

Read it at your leisure

I have read it, thank you. I've seen similar (variant of example), never thought it was a decompiler. Although, in my non-professional opinion, it is very doubtful to judge whether it is a decompiler or not by its appearance. Why, for example, in my case you can say that it is a decompiler only by its outer appearance? Why are all other indicators of this strategy normal, but this one is not? Especially on the author's page, especially since this indicator is not the main one and moreover, all three versions (simple, v1 and v3) are written in the same style. All decompilers? What's the point? Especially everything, from strategy to indicators, is freely available.

 
Youri Lazurenko:

Read it, thank you. I've seen similar (example variant), never thought of it as a decompiler. Although, in my non-professional opinion, it is very doubtful to judge whether it is a decompiler or not by its appearance. Why, for example, in my case you can say that it is a decompiler only by its outer appearance? Why are all other indicators of this strategy normal, but this one is not? Especially on the author's page, especially since this indicator is not the main one and moreover, all three versions (simple, v1 and v3) are written in the same style. All decompilers? What's the point? Especially everything, from strategy to indicators, is freely available.

A lot of indicators are collected on the open spaces, a system is built on them and the authorship is declared. But he who declared himself the author of TS, didn't write any of the indicators, that's your answer.

I think there is no need to discuss how good or bad decompilation is.

 

Good afternoon connoisseurs.

Objective - to extract data from the indicator

int OnInit()
  {
//--- create timer
   MA_handle=iCustom(Symbol(),Period(),"Top1.ex5");//,PRICE_MEDIAN
//--- if the handle is not created 

Task (problem) - the indicator has the "Apply to" - Median Price parameter

When you attach it to the default is - "Apply to" - Close

How do I change the default?

 MA_handle=iCustom(Symbol(),Period(),"Top1.ex5",PRICE_MEDIAN);// выдает ошибку
 
Top2n:

Good afternoon connoisseurs.

Objective - to extract data from the indicator

Task (problem) - the indicator has the "Apply to" - Median Price parameter

When you attach it to the default is - "Apply to" - Close

How to change the default?

If it is a question about mql5, then you have to enter ALL parameters in the order they are listed in the indicator.

If the question on mql4, you must carefully enter the name of the indicator and ALL parameters in the order they are listed in the indicator.

 

Hello again. Please have a look at the EA code in post. Can't solve the problem

 
voron_026:

Hello again. Please take a look at the EA code in post. Can't solve the problem.


Look for an error in the function - it doesn't return the up arrow condition.

//+------------------------------------------------------------------+
//    Функция паттерна Доджи
//+------------------------------------------------------------------+
int Doji()
{
//Параметры Дожи
   double Open1 = iOpen(Symbol(), PERIOD_H4,1);
   double Close1 = iClose(Symbol(), PERIOD_H4,1);
   double High1 = iHigh(Symbol(), PERIOD_H4,1);
   double Low1 = iLow(Symbol(), PERIOD_H4,1);
   
//Параметры предыдущей свечи
   double Open2 = iOpen(Symbol(), PERIOD_H4,2);
   double Close2 = iClose(Symbol(), PERIOD_H4,2);
   double High2 = iHigh(Symbol(), PERIOD_H4,2);
   double Low2 = iLow(Symbol(), PERIOD_H4,2);
   
//Параметры индикатора волотильности ATR для нахожденя относительно большой свечи перед Доджи
   double ATR = iATR(Symbol(),PERIOD_H4,14,1);
   
   
//Математическое описание патерна Дожи
   if(Close1 < High1 -0.3*(High1-Low1) && 
      Open1 < High1 -0.3*(High1-Low1) && 
      Close1 > Low1 -0.7*(High1-Low1) && 
      Open1 > Low1 -0.7*(High1-Low1) && 
      MathAbs((Close1-Open1) < 0.2*(High1-Low1))&&
      MathAbs((Close2-Open2) > 0.7*ATR))
      {
         if(Close2 - Open2 > 0){Print ("Down"); return(-1);}// Условие для продаж
         if(Close2 - Open2 < 0){Print ("Up"); return(1);}// Условие для покупок
      }
      return(0);
}
Reason: