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

 
double Dopen1 = iOpen(NULL,TimeFr,1);
   double Dclose1 = iClose(NULL,TimeFr,1);
   double Dopen2 = iOpen(NULL,TimeFr,2);
   double Dclose2 = iClose(NULL,TimeFr,2);
   double Dopen3 = iOpen(NULL,TimeFr,3);
   double Dclose3 = iLow(NULL,TimeFr,3);

   Dmax=iHigh(NULL,TimeFr,1); // high прошлой свечи
   Dmin=iLow(NULL,TimeFr,1); // low прошлой свечи
   TempT=iTime(NULL,TimeFr,1); // время прошлой свеч 

Здравствуйте подскажите какие можно еще добавить или заменить торговые сигналы?
 

Romal001:

Здравствуйте подскажите какие можно еще добавить или заменить торговые сигналы?

Are there any trading signals out there?

 
Artyom Trishkin:

Are there any trading signals out there?


No, but what can you add or change, there are bars.
 
Romal001:

No, what you can add or change, there are bars.

Add salt, pepper. You could also add some sauce.

You can also read here - a lot of useful information.

 
Romal001:

No, what can be added or changed, there are bars there.


Add MarketInfo, with all request identifiers )))))

...... and AccountInfoDouble also with all

 

You have to know what you need from the beginning.

And ask how to get it.

 

Can you tell me why the lines are not drawn at the intersection of MA and next to each other? Because if you run it as a script, it draws all right

//+------------------------------------------------------------------+
//|                                      подсчет пересечений Ma .mq4 |
//|                        Copyright 2017, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2016, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict

extern int Баров = 500;  // Баров для подсчета пересечений МА
extern int MA_1  =10;
extern int MA_2  =100;

void OnTick()
{
  int Бар, Счетчик;
  double MA_1_Предыдущая, MA_2_Предыдущая,
         MA_1_Следующая,  MA_2_Следующая;

  ObjectsDeleteAll(); // Удалить вертикальные линии

  for(Счетчик=0, Бар=0; Бар<Баров; Бар++) // Начинаем с послнего бара
  {
    MA_1_Предыдущая = iMA(Symbol(),PERIOD_M5,MA_1,0,MODE_SMA,PRICE_CLOSE,Бар+1);
    MA_1_Следующая  = iMA(Symbol(),PERIOD_M5,MA_1,0,MODE_SMA,PRICE_CLOSE,Бар);
    MA_2_Предыдущая = iMA(Symbol(),PERIOD_M5,MA_2,0,MODE_SMA,PRICE_CLOSE,Бар+1);
    MA_2_Следующая  = iMA(Symbol(),PERIOD_M5,MA_2,0,MODE_EMA,PRICE_CLOSE,Бар);

    if((MA_1_Предыдущая>=MA_2_Предыдущая && MA_1_Следующая<=MA_2_Следующая) ||
       (MA_1_Предыдущая<=MA_2_Предыдущая && MA_1_Следующая>=MA_2_Следующая))
    {
      Счетчик++;
      Alert(Счетчик, "  Бар = ", Бар, "  T = ",Time[Бар]);

      // Создать вертикальную линию
      ObjectCreate( (string)Счетчик+"_"+(string)Бар,OBJ_VLINE,0,Time[Бар],0);

      if(Счетчик == 5) break;  // 5 линий есть - выход
    }
  }
}
 

Any questions from newbies on MQL4, help and discussion on algorithms and codes

I don't understand why you have to create such a topic if you have nothing to say. I think it's better to keep quiet when you have nothing to say. I understand when you have nothing to say it's better to keep silent) And not to send them to read general phrases!
 
Romal001:

Any questions from newbies on MQL4, help and discussion on algorithms and codes

I don't understand why you have to create such a topic if you have nothing to say. I think it's better to keep quiet when you have nothing to say. I understand when you have nothing to say it's better to keep silent) And not to send them to read general phrases!
If you want an intelligent answer, ask an intelligent question!
 
A smart person who understands this would have answered the question. They would not say that "the question is not smart" for lack of knowledge and information. Simply put, we are good at pouring nothing into nothing) Peace be with you.
Reason: