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

 
Artyom Trishkin:

Try pouring the contents of the barrel into the glass.

How do you pour just the glass into the glass - avoidoverflowing the stack?
 
Ghabo:
How do you pour only a glass into a glass - avoidingoverflowing the stack?

I have already answered above - this is not your case. To pour only a glass into a glass, you need to control the amount of liquid poured into it, not "quickly clean up the excess spilled on the floor".

 
Artyom Trishkin:

Hiding the joints is the easy solution?

What are the lines? Where do they come from? When are they built? What do they do?

Yes)))

I don't know, I can't find the cause of them. Where do they come from over time and when you switch t\f

 
Ghabo:

Yes)))

I don't know, I can't find a reason for them. The coordinates where they come from over time and when switching t\f

Is the indicator yours?

 
Artyom Trishkin:

Is the indicator yours?

Author unknown)

What's wrong with SendMessageA?

 
Ghabo:

Author unknown)

What's wrong with SendMessageA?

Figure it out. Not interested in mashing up caci - childish it is.

 
Artyom Trishkin:

Figure it out. It's not interesting to cover caci - it's childish.

It's not about the lines.

The question is why the compiler is swearing at"MetaTrader4_Internal_Message" in the line

SendMessageA(hwnd, RegisterWindowMessageA("MetaTrader4_Internal_Message"), 14, WindowExpertName());
 

Greetings.

Can you tell me how this can happen and how to deal with it? In the code there is a variable go change of which it is prescribed to output to the log. But sometimes, only when testing on all ticks, it changes without displaying a message about it, and the algorithm, respectively, also changes. Here is an example of how it should be:

And here's how it happens:



All at the link:

https://cloud.mail.ru/public/3hFn/acNemAU3f

Here is a part of the code where this fragment does not fit in all of them, please do not get hung up on the stylistics

if (go==4)
   {Print("go== ", go, " Last2OrdersBuyProfit()== ", Last2OrdersBuyProfit(), " Orders5Profit()== ", Orders5Profit());
   if (Last2OrdersBuyProfit()<=0)
      {
         Print("Last2OrdersBuyProfit()<=0 == ", Last2OrdersBuyProfit(), "  Last2OrdersBuyClose()"); Last2OrdersBuyClose();  
         
         ticketB4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, 0, 0, "", Magic, 0, Blue);   
         if (ticketB4) {Print("ticketB4== ", ticketB4);}
         else {Print("go OP_BUY ERR ", GetLastError());} 
                  
         ticketB4 = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, 0, 0, "", Magic, 0, Blue);   
         if (ticketB4) {Print("ticketB4== ", ticketB4);}
         else {Print("go OP_BUY ERR ", GetLastError());} 
                  
         ticketS4 = OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage, 0, 0, "", Magic, 0, Red);   
         if (ticketS4) {Print("ticketS4== ", ticketS4);}
         else {Print("go OP_SELL ", GetLastError());} 
         
         price2=(Ask+Bid)/2; go=3; Print("go = 4 to ", go, " price2= ", price2);
      }
   if (Orders5Profit()>=0)
      { 
      Print("go== ", go, " Orders5Profit()>=0 ==", Orders5Profit(), "  count5== ", count5, "  OrdersClose4()"); 
      OrdersClose4(); price1=(Ask+Bid)/2; go=2; trall2=0 ;  Print("go == 4 to ", go, " price1= ", price1);
      }
   }   
Файл из Облака Mail.Ru
Файл из Облака Mail.Ru
  • cloud.mail.ru
Облако Mail.Ru - это ваше персональное надежное хранилище в интернете. Все нужные файлы всегда под рукой, доступны в любой точке мира с компьютера или смартфона.
 
Andrey Sokolov:

Greetings.

Can you tell me how this can happen and how to deal with it? In the code there is a variable go change of which it is prescribed to output to the log. But sometimes, only when testing on all ticks, it changes without displaying a message about it, and the algorithm, respectively, also changes. Here is an example of how it should be:

And here's how it happens:



All at the link:

https://cloud.mail.ru/public/3hFn/acNemAU3f

Here is a part of the code where this fragment does not fit in all of them, please do not get hung up on the stylistics

Not everything can be displayed in the tester log - there are skips to speed things up. View the full log via the PCM

 
Artyom Trishkin:

Not everything can be output to the tester log - there are skips to speed things up. See full log via PCM

right?