[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 362

 
CLAIN:
And another question, how do you add up several numbers in a row? For example, several closing prices to get something like an SMA? I think it could be done through a loop, but for some reason I don't have such knowledge in my head...


for (i=barn;i<=bar0;i--) {sum=sum+Close[i];} //bar0 is the number of the first bar to examine, barn is the last bar to examine

 
FelixFX:


for (i=barn;i<=bar0;i--) {sum=sum+Close[i];} //bar0 - number of the first examined bar, barn - number of the last bar


sorry...mistake

for (i=barn;i>=bar0;i--) {sum=sum+Close[i];} //bar0 is the number of the first bar to be examined, barn is the last bar to be examined

 

I have a serious question for the pros:

Is it worth upgrading to MQL5? What advantages do you see for yourself in this language?

 
nadya:

should you switch to MQL5? What advantages do you see for yourself in this language?


You don't need to switch to it, you need to know it just like MQL4.

The brokerage companies will be using MT4 for a long time. But MT5 has much more possibilities concerning both terminals and servers for brokerage companies. That's why every brokerage company will have two terminals for MT4 and MT5 clients.

Speaking about advantages of MQL5 vs MQL4, MQL5 beats 4 at the very start and by a large margin.

 
sergeev:

You don't have to switch, you have to know as well as MQL4.
The brokerage companies will use MT4 for a long time to come. But MT5 has much more possibilities both in terms of terminal and in terms of servers for the brokerage companies. That's why every brokerage company will have two terminals for MT4 and MT5 clients.
Much more possibilities - that's clear. But what possibilities do you distinguish? For me the most interesting is the possibility to test multicurrency. But this is the only advantage that I know. I would like to know more.
 
nadya:

I have a serious question for the pros:

Is it worth upgrading to MQL5? What advantages do you see for yourself in this language?

A programming language is a means, not an end. If I'm going to switch to it, I would prefer high-level languages like C++.

As long as there is nothing to do in MQL5, the MQL5 language is not necessary. Why waste your time on it? But there is a C++ language that will always be.

 
nadya:
much more opportunities - that's clear. But what opportunities are you highlighting for yourself? For me, the most interesting thing is the ability to test multicurrencies. But that's the only advantage I know. I would like to know more.

I join the question: is there any comparative information somewhere?
 
Zhunko:

A programming language is a means, not an end. If I'm going to switch, it should be to high-level languages like C++.

As long as there is nothing to do in MT5, there is no need in MQL5. Why waste your time on it? But there is C++ that will always be.


I'm not good at programming...

So you want to say that any program can be written in С++ and then somehow converted into mql and run in MT?

 
Zhunko:

A programming language is a means, not an end. If I'm going to switch, it should be to high-level languages like C++.

As long as there is nothing to do in MT5, there is no need in MQL5. Why waste your time on it? But there is a C++ language that will always be.

I must be terribly illiterate. But how can C++ help me in such a narrow specialisation as FOREX? I know that programmers put calculations somewhere outside, but I'm not really interested in it yet, and I'm not going to do programming as such.
 
FelixFX:


I'm not good at programming...

So you are saying that any program can be written in C++ and then somehow converted to mql and run in MT?

Anything can be written in C++ without any restrictions. All the calculations will be in a DLL. From there you import your functions into MQL. The calculations are 20 times faster. Debugging facilities are hundreds of times friendlier.

It is better not to be locked into MT. You should write your own terminal and program it in C++.

Reason: