Questions from Beginners MQL5 MT5 MetaTrader 5 - page 505

 
Leanid Aladzyeu:
0 is for the notion of whether these levels are lost in case of loss the variables will be 0 .

https://docs.mql4.com/ru/globals

not to lose and spit

Глобальные переменные клиентского терминала - Документация на MQL4
  • docs.mql4.com
Глобальные переменные клиентского терминала - Документация на MQL4
 
Karputov Vladimir:

Have you seen the help in MetaEditor?

The work with functions, scope of variables and freeing memory in local arrays has also changed. Since the changes turned out to be quite significant, it was decided to introduce a new property #property strict in order to maximize compatibility with the old approach to writing MQL4 programs. When creating a new MQL4 program using the MQL4 Wizard, this property is always added to the template.

And so on:

Table of differences between compilers:

So why all this "mess" if everything can be well programmed with good old MQL4 without losing flexibility and new solutions?
 

2016.01.26_21:28 GMT+3. Hello all!!! Gentlemen Administrators. Can you

answer, -- how long will it be possible to use procedural .mq4 files ? Я

I don't ask this key question to MetaQuotes support, because I may not

I may not get an answer. Otherwise, you write a file, and after a month you will have to rewrite everything in a OOP

file. And I am even less skilled in OOP than in procedural programming. For now

that's it. I'm waiting for an answer. 21:35 GMT+3.

 
Николай Никитюк:

2016.01.26_21:28 GMT+3. Hello all!!! Gentlemen Administrators. Can you

answer, -- how long will it be possible to use procedural .mq4 files ? Я

I don't ask this key question to MetaQuotes support, because I may not

I may not get an answer. Otherwise, you write a file, and after a month you will have to rewrite everything in a OOP

file. And I am even less skilled in OOP than in procedural programming. Bye

that's it. Waiting for an answer. 21:35 GMT+3.

I think always. every year you have to run through the compiler to update for builds.

and Administrators don't respond here .

 

Greetings! Such a problem, in principle I'll figure it out sooner or later anyway, but if someone has already encountered it...

On offline chart the Expert Advisor is working, or rather not working. I did it the old-fashioned way and found out that the zero value of Time[0] array is not updated. It means the value of time of the last candle opened at the moment of EA loading is kept there all the time. Can someone tell me why it happens? The Expert Advisor works on On-Timer, to avoid unnecessary questions, the exact same Expert Advisor I have is working on H4. So the problem is specifically related to the nature of the offline charts...

 
void CheckForOpen()
 {if(ModLots())
  {
      //-----Ставим ордер на покупку.
    if(SignalCurrent<MacdCurrent && SignalMAPrevious<SignalMAThis && 
      Ask>SignalParabolic && SignalStochastic_5<MainStochastic_5&&SignalStochastic<MainStochastic)
      {
       ticket=OrderSend(NULL,OP_BUY,Lots,Ask,slippage,0,0,exptime,magic,0,Blue);
       if(ticket>0)
          return;
      }
//-----Ставим ордер на продажу.
    if(SignalCurrent>MacdCurrent && SignalMAPrevious>SignalMAThis && 
      Bid<SignalParabolic && SignalStochastic_5>MainStochastic_5&&SignalStochastic>MainStochastic)
      {
       ticket=OrderSend(NULL,OP_SELL,Lots,Bid,slippage,0,0,exptime,magic,0,Red);
       if(ticket>0)
          return;
      }
  }
 }
//+------------------------------------------------------------------+
int CountTrades()
  {
   int count=0;
   for(int i=OrdersTotal()-1;i>=0;i--)
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
        {
         if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic)
            count++;
        }
     }
   return(count);
  }
//+------------------------------------------------------------------+
double ModLots()
  {
   double lot;
   for(int i=OrdersHistoryTotal()-1;i>=0;i--)
     {
      if(!OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)) continue;
      if((OrderMagicNumber()==magic) && (OrderSymbol()==Symbol()))
        {
         if(OrderProfit()<0)
           {lot=OrderLots()*LotMarti;  break;}
         else { lot=Lots; break;}
        }
     }
   return(0);
  }
//+------------------------------------------------------------------+
I can't get Martin to work at all today with this combination.Help.
 
Hello all! Can you explain where the quotes in the web terminal are coming from?
 
svarog16:
Hello all! Can you explain where the quotes in the web terminal here come from?
Shaitanama, nasyanika...
 
svarog16:
Hello all! Can you explain where the quotes in the web terminal here come from?
Gerasim dictates, they call him Kolyan here...
 
Nickolay72:
Something about Martin not working at all.Today in this combination no orders have been placed at all.Help.
Look for an error in pieces of code,