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

 
geratdc:

What is the % similarity between MQL 4 and MQL 5 ?


This article https://www.mql5.com/ru/articles/81 may be useful
Переход с MQL4 на MQL5
Переход с MQL4 на MQL5
  • 2010.05.11
  • Sergey Pavlov
  • www.mql5.com
Данная статья, построенная в форме справочника по функциям MQL4, призвана помочь переходу с MQL4 на MQL5. Для каждой функции языка MQL4 приведено описание и представлен способ ее реализации на MQL5, что позволит вам значительно ускорить перевод своих программ с MQL4 на MQL5. Для удобства функции разбиты на группы, как в документации по MQL4.
 
Snest:

This article may be useful https://www.mql5.com/ru/articles/81

Yes, it seems to be the right one, thank you. Let's go and study the translator.
 

Where can I see a list of character codes? I can't find it.

 
geratdc:

Yes, that seems to be what we need, thank you. Let's go study the translator.


I understand you need to find max and min for n bars, then it is easier and less resource consuming to

//+------------------------------------------------------------------+
//|                                                       test11.mq5 |
//|                                                   Sergey Gritsay |
//|                         https://www.mql5.com/ru/users/sergey1294 |
//+------------------------------------------------------------------+
#property copyright "Sergey Gritsay"
#property link      "https://www.mql5.com/ru/users/sergey1294"
#property version   "1.00"

input int TotalBar=10; // Количество баров для анализа
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---

//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---

  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
   double hist_high[];
   double hist_low[];
   double min_price=0.0;
   double max_price=0.0;

   if(CopyLow(_Symbol,PERIOD_CURRENT,0,TotalBar,hist_low)>=TotalBar)
     {
      min_price=NormalizeDouble(hist_low[ArrayMinimum(hist_low)],_Digits);
     }
   if(CopyHigh(_Symbol,PERIOD_CURRENT,0,TotalBar,hist_high)>=TotalBar)
     {
      max_price=NormalizeDouble(hist_high[ArrayMaximum(hist_high)],_Digits);
     }

   Comment("\n min_price = ",min_price,"\n max_price = ",max_price);
  }
//+------------------------------------------------------------------+

....

 

Hello, I would like to see the code for placing orders on graphical objects provided by the indicator,

For example the indicator draws a line "N" on which an order should be placed SL-"Nsl" and TP-"Ntp".

 
Eduard Bulatov:

Hello, I would like to see the code for placing orders on graphical objects provided by the indicator,

For example, the indicator draws the line "N" on which orders should be placed SL-"Nsl" and TP-"Ntp".

If the indicator draws not buffers, but by graphical objects, then by the name of this graphical object we have to know its (object-line) price, and from this price we have to put a pending order.

The price of the horizontal line can be obtained by ObjectGetDouble(0,obj_name,OBJPROP_PRICE,0); Where 0 is the identifier of the current chart and obj_name is the name of the indicator line object.

 
Andrey Dik:

Where can I see a list of character codes? I can't find it.

I guess the question is too complicated...
 
Andrey Dik:
apparently the question is too complicated...


This ?

https://docs.mql4.com/ru/constants/objectconstants/wingdings

https://www.mql5.com/ru/articles/1474
Wingdings - Константы объектов - Стандартные константы, перечисления и структуры - Справочник MQL4
Wingdings - Константы объектов - Стандартные константы, перечисления и структуры - Справочник MQL4
  • docs.mql4.com
Wingdings - Константы объектов - Стандартные константы, перечисления и структуры - Справочник MQL4
 
Andrey Dik:
apparently the question is too complicated...
Is this it?
 

Yes, thank you!

Alexey Viktorov:
This one?
No, but thanks anyway!)
Reason: