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

 
Galim_V to initialise an array of structures

Curses

implicit conversion from 'number' to 'string' Roller.mq4 64 12


struct Li
{
        string poli;
        double lot;
        double price;
};

Li ne[] = {{"", 0.0, 0.0}, {"", 0.0, 0.0}, {"", 0.0, 0.0}};
 
Koldun Zloy #:

Why so complicated?

void  ZeroMemory( 
   void & variable      // обнуляемая переменная 
   );
ZeroMemory

Note

If a function parameter is a string, this call is equivalent to specifying NULL for it.
For simple types and their arrays, as well as structures/classes consisting of such types, this is a simple null.
For objects containing strings and dynamic arrays, ZeroMemory() is called for each member.
For any arrays that are not protected by const modifier, all elements are zeroed.
For arrays of complex objects ZeroMemory() is called for each member.

 
Koldun Zloy #:

Yes.) Thank you!

 

Greetings. Can you please advise me.

I have an mt4 robot, I need to create a solution so that trades of this robot are duplicated on binance exchange.
So far I only worked with MQL.
What tools to use and where to start to understand?

 
MakarFX #:

In this case too, it may not be possible to open a third order in the grid...

Good day, Makar. Please explain in your own words what these functions are for and what role they play in this EA.



EventSetMillisecondTimer(100);
 EventKillTimer();
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- create timer
   EventSetMillisecondTimer(100);

//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//--- destroy timer
   EventKillTimer();
  // ObjectsDeleteAll(0,"AveragePriceLine");
  }
 
EVGENII SHELIPOV #:

Makar

Perhaps personal messages are best written in private messages.

 
EVGENII SHELIPOV #:

Makar good day Please explain in your own words what these functions are for and what role they play in this advisor

They are timer start and stop, can be removed
 
Andrey Sokolov #:

It may be better to write personal messages in private messages.

Could have answered...the question is not personal)
 
Andrey Sokolov #:

It may be better to write personal messages in private messages.

I just didn't know how to upload some of the code to private messages.

 
MakarFX #:
It is a timer start and stop, can be deleted

What this timer is for