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

 
Vladimir, thank you very much for your prompt reply, but it's a tricky option for me so far. I was wondering if there was a simpler example of programming reversal indicators like this?
 
zig2003:
Vladimir, thank you very much for your prompt reply, but it's a complicated option for me so far. I was wondering if there is a simpler example of programming reversal indicators like this?

This is the simplest possible option.

 
Vladimir, it turns out that first I have to modify the indicator itself, in order to pull values from its buffers into the Expert Advisor. But I'm not an expert in indicators, I'm afraid I can't do it myself. If it is easy, can you fix the indicator code? If I want just get the values from buffers for buy and for sell and do something with them. By the way, what should be done with them in this case? To compare them on the adjacent bars? Or with zero?
 
zig2003:
Vladimir, it turns out that the indicator itself has to be redesigned first so that to pull values from its buffers to the Expert Advisor. I am not an expert in indicators, and I am afraid I cannot do this myself. If it is easy, can you fix the indicator code? If I want just get the values from buffers for buy and for sell and do something with them. By the way, what should be done with them in this case? To compare them on the adjacent bars? Or with zero?

I showed you how to work in MQL5. Before it's too late, get rid of your old terminal and work in MetaTrader 5.

 
zig2003:
Vladimir, thank you very much for your prompt reply, but for me it is still a complicated option. I was thinking, maybe there is a simpler example of programming reversal of such indicators?

Don't listen to him, he got lost and got into a thread with questions on mql4 but answers with code on mql5.

Barabashka, aren't you ashamed of deleting posts with remarks to you?

 

Afternoon. I am using the function (see below). Can't figure out how to make a flag to be generated only if there are 2 pending (up and down). The main code sets 2 pending moves up and down. The point is not to set more than 2 per day.

//|  Описание : Возвращает флаг наличия ордера или позиции в истории за сегодня| //+----------------------------------------------------------------------------+ //|  Параметры:                                                                | //|    sy - наименование инструмента   (""   - любой символ,                   | //|                                     NULL - текущий символ)                 | //|    op - операция                   (-1   - любая позиция)                  | //|    mn - MagicNumber                (-1   - любой магик)                    | //+----------------------------------------------------------------------------+

//+------------------------------------------------------------------+ //|                                                                  | //+------------------------------------------------------------------+ bool ExistInHistoryToDay(string sy="", int op=-1, int mn=-1)   {    int i, k=OrdersHistoryTotal();

   if(sy=="0")sy=Symbol();    for(i=0; i<k; i++)      {       if(OrderSelect(i, SELECT_BY_POS, MODE_HISTORY))         {          if(OrderSymbol()==sy || sy=="")            {             if(op<0 || OrderType()==op)               {                if(mn<0 || OrderMagicNumber()==mn)                  {                   if(TimeDay(OrderOpenTime())==Day()                      &&  TimeMonth(OrderOpenTime())==Month()                      &&  TimeYear(OrderOpenTime())==Year())                                           return(True);                                       }               }            }         }      }    return(False);   } //+------------------------------------------------------------------+

 

Hi again,

Can you please tell me how to build a project consisting of an mq4-file and a lot of mqh-files into one, for a marketplace ?

 
Guys, all my useful indicators are written in MQL4, so the 5th version is not relevant yet. And the problem should be solved, especially since there are a lot of single-buffer, single-line indices, and how to deal with them in an easier way?
 
zig2003:
Guys, all my useful indicators are written in MQL4, so the 5th version is not relevant yet. And the problem should be solved, especially since there are a lot of such single-buffer, single-line indices, and how to deal with them in an easier way?
And where is the indicator anyway?
 
Artyom Trishkin:
Where's the indicator anyway?

There:

Любые вопросы новичков по MQL4 и MQL5, помощь и обсуждение по алгоритмам и кодам
Любые вопросы новичков по MQL4 и MQL5, помощь и обсуждение по алгоритмам и кодам
  • 2020.01.02
  • www.mql5.com
В этой ветке я хочу начать свою помощь тем, кто действительно хочет разобраться и научиться программированию на новом MQL4 и желает легко перейти н...
Reason: