Questions from Beginners MQL5 MT5 MetaTrader 5 - page 422

 
Alexey Viktorov:

Is this, like, you telling me how to do it right? Or am I misunderstanding something?

Actually, if I'm driving on a deserted road and I don't see any cars or tractors around, I don't turn on the turn signal.

I've added to your answer about warrants. And the rest is a clarification for those who don't fully understand what they are doing (about avoiding arrays).
 
Tapochun:
I have supplemented your answer about warrants. And the rest is a clarification for those who don't fully understand what they are doing (about array traversal).
I'm more comfortable with "you", if you don't mind. It was actually an outrage, not a reply to anyone. Anyway, I must have misunderstood...
 
Alexey Viktorov:
I'm more comfortable on a first name basis, if you don't mind. Actually, that was an outrage, not a reply to anyone. Anyway, I must have misunderstood...
I don't mind. No, I wasn't correcting you, it's just that your post was the last one.
 
-Aleks-:
So you wrote in the example what I had written in the code. I don't understand the difference here...
What are you doing in the loop? This is important.
 
Artyom Trishkin:
What do you do in the cycle? This is important.
I copy the values of an array that meet certain conditions into another array. After sorting, I trim the new array with empty values.
 
-Aleks-:
I copy the array values that meet certain conditions into another array. After sorting, I crop the new array with empty values.
Well then with any indexing direction there is no difference.
 
Artyom Trishkin:
Well then with either direction of indexing there is no difference.
Thank you.
 
//+------------------------------------------------------------------+
//|                                                         Тест.mq4 |
//|                        Copyright 2015, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2015, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
{
 return(0);
}

//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {

  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {

  }
//+------------------------------------------------------------------+

int start()
{
 int X, Y, Z;
 
 X = 1111111;
 Y = 22222222;
 
 Z = Y + X;
 
 Print(Z);
 
 return(0);
}

Hello. I wanted to check how the tester sees and understands elementary functions and hit a dead end. I asked my broker why the tester did not work and he replied that the question had been sent to the programme developers.I deleted Metatrader from my computer and then downloaded it again using the link. But it did not work. From the program below you can see that it should print the result of the sum of two numbers. But the log shows that it is running and the bars are calculated. Why is my tester not working?

1: 83747 tick events (1047 bars, 84747 bar states) processed in 0:00:00.047 (total time 0:00:00.093)


Автоматический трейдинг и тестирование торговых стратегий
Автоматический трейдинг и тестирование торговых стратегий
  • www.mql5.com
MQL5: язык торговых стратегий для MetaTrader 5, позволяет писать собственные торговые роботы, технические индикаторы, скрипты и библиотеки функций
 
Hunt1972:

Hello. I wanted to check how the tester sees and understands elementary functions and hit a dead end. I asked my broker why the tester did not work and he replied that the question had been sent to the programme developers.I deleted Metatrader from my computer and then downloaded it again using the link. But it did not work. From the program below you can see that it should print the result of the sum of two numbers. But the log shows that it is running and the bars are calculated. Why is my tester not working?

Please make a correct code in the post:Insert code correctly in the forum
 
Hunt1972:

Hello. I wanted to check in the tester how it sees and understands the elementary functions and hit a dead end. I asked my broker why the tester did not work and he replied that the question had been sent to the programme developers.I deleted Metatrader from my computer and then downloaded it again using the link. But it did not work. From the program below you can see that it should print the result of the sum of two numbers. But the log shows that it is running and the bars are calculated. Why is my tester not working?

//+------------------------------------------------------------------+

//| Tester.mq4 |

//| Copyright 2015, MetaQuotes Software Corp. |

//| https://www.mql5.com |

//+------------------------------------------------------------------+

#property copyright "Copyright 2015, MetaQuotes Software Corp."

#property link "https://www.mql5.com"

#property version "1.00"

#property strict

//+------------------------------------------------------------------+

//| expert initialization function |

//+------------------------------------------------------------------+

int init()

{

return(0);

}


//+------------------------------------------------------------------+

//| Expert deinitialization function |

//+------------------------------------------------------------------+

void OnDeinit(const int reason)

{

}

//+------------------------------------------------------------------+

//| expert tick function |

//+------------------------------------------------------------------+

void OnTick()

{

}

//+------------------------------------------------------------------+

int start()

{

int X, Y, Z;

X = 1111111;

Y = 22222222;

Z = Y + X;

Print(Z);

return(0);

}

2015.08.29 19:32:19.534 EURUSD,H1: 83747 tick events (1047 bars, 84747 bar states) processed in 0:00:00.047 (total time 0:00:00.093)


See "Experts" magazine
Reason: