Errors, bugs, questions - page 2371

 

Is it possible to pull history.csv out of the Signals with the Sockets?

Документация по MQL5: Сетевые функции / SocketCreate
Документация по MQL5: Сетевые функции / SocketCreate
  • www.mql5.com
//|                                                SocketExample.mq5 | //|                        Copyright 2018, MetaQuotes Software Corp. | //|                                             https://www.mql5.com | //| Отправка команды на сервер                                       |...
 

MT5, build 1971, synthetic example (script).

If we do it this way, the wrong value in the second output in the log:

class TestAccumulation
{
   private:
      double m_sum;
            
   public:
      TestAccumulation(double value)
      {
         m_sum += value;
         Print("sum = ", m_sum);
      }
};

class AClass
{
   public:
      void Run()
      {
         TestAccumulation a(0.1);
      }
};

class BClass
{
   public:
      void Run()
      {
         TestAccumulation b(0.2);
      }
};

void OnStart()
{
   AClass AInstance;
   BClass BInstance;

   AInstance.Run(); // gives the output as '0.1' when expected '0.1' -> right
   BInstance.Run(); // gives the output as '0.3' when expected '0.2' -> wrong
}

And if we do it this way, it is correct:

class TestAccumulation
{
   private:
      double m_sum;
            
   public:
      TestAccumulation(double value)
      {
         m_sum += value;
         Print("sum = ", m_sum);
      }
};

class AClass
{
   public:
      void Run()
      {
         TestAccumulation a(0.1);
      }
};

class BClass
{
   public:
      void Run()
      {
         TestAccumulation b(0.2);
      }
};

void OnStart()
{
   AClass AInstance;   
   AInstance.Run(); // gives the output as '0.1' when expected '0.1' -> right
   
   BClass BInstance;
   BInstance.Run(); // gives the output as '0.2' when expected '0.2' -> right
}

P.S. popped up as a result of an oversight - we forgot to initialize some member with an empty value in the constructor (in the example it would be m_sum). But it doesn't cancel the irrelevance of mutual influence of two classes on each other.

 
Kindergarten.

Forum on trading, automated trading systems and trading strategy testing

Cleaning an array of given element(s)

Sergey Dzyublik, 2018.11.13 11:38

Riddle: How many apples will Pinocchio have if Malvina gives him two and Papa Carlo gives him three apples?
Answer: ten. The source variables need to be initialized.


 

Sergey Eremin:

But this does not invalidate the irrelevance of the mutual influence of the two classes on each other.

Where is this information coming from? What you are doing is UB, the EA can display an obscene word on the screen and will be right, any assumptions about the logic of this algorithm are groundless.

 

Hello!

When creating an indicator in mql4, you can specify the window parameter, in which it will be displayed: #property indicator_chart_window or #propertyindicator_separate_window.

Can you make the indicator be displayed both in the main window and in a separate one?

For example, a sliding indicator in the main window and a histogram in a separate one.

 
giros:

Hello!

When creating an indicator in mql4, you can specify the window parameter, in which it will be displayed: #property indicator_chart_window or #propertyindicator_separate_window.

Can you make the indicator be displayed both in the main window and in a separate one?

For example, a sliding indicator in the main window and a histogram in a separate one.

NO.
 

Emails from MQL5 Marketplace: Updates on the website come the same, products don't change at all....


Notifications of blog posts in my personal account come in like this

Blogs:
Added new comment to post VR Smart Grid advisor with automatic and semi-automatic modes + multi-level grid algorithm..:
vladmedd: <div class="fquote"><strong><span><span title="VOLDEMAR" style="color:#42639c;">Vladimir Pastushak</span>:</strong><br /> <p>Euro dollar pair, H1 timeframe</p></div><p>Thank you!</p>
https://www.mql5.com/ru/blogs/post/716698

 

In what cases can genetic optimisation trigger the calculation of any combinations of parameters, if a full optimisation was previously performed, and re-running it (full optimisation) instantly lifts all the results from the cache?

Why would genetics recalculate anything?

Build 1970

 
Andrey Khatimlianskii:

In what cases can genetic optimisation trigger the calculation of any combinations of parameters, if a full optimisation was previously performed, and running it again (full optimisation) instantly picks up all the results from the cache?

Why would genetics recalculate something?

Build 1970.

It makes sense if genetics would return the entire cache full in such situations.

 
fxsaber:

It makes sense if in such situations, the genetics would return the entire cache complete.

It is logical if it works according to its own algorithm, but it will not recalculate the finished data, it will just grind the numbers from the cache.

Reason: