From theory to practice - page 532

 
Igor Makanu:

I.e., it's easier to check ideas in Matlab (or make them from scratch in MQL), but if you want to port an idea to MQL, you'll have to study ALGLIB.

What for? Besides Alglib there are plenty of well documented libs and packages. Both in R and in Python. And it's much wider than Alglib. Almost all of it is in C++. Port and use.

Generally speaking, without preliminary modelling on the side any more or less complex strategy in MQL is unlikely. And then you won't even want to translate it into MQL.)).

SZZ Over the past 10 years for various reasons I have changed several terminals and came to the conclusion that the ATS should not depend on the terminal. And now I am working with 2 different terminals. The terminal should only be the data provider and "executor" of requests.

 
Yuriy Asaulenko:

Why? There are plenty of well-documented libs and packages besides Alglib. Whether in R or under Python. And much wider than Alglib. Almost everything is in C++. Port and use.

Generally speaking, without preliminary modelling on the side any more or less complex strategy in MQL is unlikely. And then you won't even want to translate it into MQL.)).

SZZ Over the past 10 years for various reasons I have changed several terminals and came to the conclusion that the ATS should not depend on the terminal. And now I am working on 2 different terminals. The terminal should only be a data provider and "executor" of requests.

Well, I have ported AlgLib as a practice of programming for MT5 - I am also studying it to understand the concept, so to speak, how AlgLib is built - I spent a week, the result is positive

Well, the verification of ideas - it is real to quickly port something to MT5, but to the UI, the task becomes more complicated.

Well, the no less important advantage of Matlab is that it has a lot of ready-made stuff on the web, alas one would have no desire to understand R and Python, it will take another 3-4 months of reading and testing )))).

SZS: Someone wrote on the forum that IT companies now value not the quality of writing code, but the speed of testing ideas. I understand why all new software is resource-hungry, but for our purposes the concept is correct!

 
Igor Makanu:

Well, the verification of ideas - something may be quickly ported to MT5, but the task becomes more complicated until the user interface, while with Matlab it is easier - here is a formula, just write it, check and visualize it.

Well, the no less important advantage of Matlab is that it has a lot of ready-made stuff on the web, alas one would have no desire to understand R and Python, it will take another 3-4 months of reading and testing )))).

SZS: Someone wrote on the forum that the IT companies now value not the quality of writing code, but the speed of testing ideas. I understand why all new software is resource-hungry, but for our purposes the concept is correct!

Well, the advantages of MathLab for modelling are not in dispute - it's fast, convenient and responsive. R, Python, etc. are not inferior in this respect, except that they are free.

Python (now trying to do something real in the background, very slowly) is liked by the fact that it is good both as a modeling and development environment. I.e. after modelling you have a ready system at once. All that remains is to connect it to the terminal. https://www.mql5.com/ru/forum/269426

Делаем торговую систему на Python для МТ.
Делаем торговую систему на Python для МТ.
  • 2018.07.30
  • www.mql5.com
Возникла мысль написать торговую систему на Python, и коли уж возникла, почему-бы не сделать эту систему общедоступной...
 
Yuriy Asaulenko:

Well, there is no disagreement about the advantages of MathLab for modelling - fast, convenient, fast. R, Python, etc. are not inferior in this respect, except that they are free.

Python (now trying to do something real in the background, very slowly) is liked by the fact that it is good both as a modeling and development environment. I.e. after modelling you have a ready system at once. All that remains is to connect it to the terminal. https://www.mql5.com/ru/forum/269426

If you have a good working knowledge of Python, you may use it as a modeling environment or you may use an old-style dll.

or try to do it 100% from scratch on pure MT4 ))))

ZS: there's no problem checking your ideas, all the platforms are quite developed - I judge by the community, any confusing question is solved during a day - a lot of Russian-language forums and active participants, but the problem is different.... in the right areas of research!

 
Igor Makanu:

but the problem is something else.... in the right direction of research!

Well, that's what modelling is for, not writing an ATC straight away.

I modelled the previous PBX for about six months. In the end it turned out to be a very simple and beautiful system. But in the process it was more than enough complications).

Here is almost no visualization. All logs are written in the Access database.

 
RRR5:

how?


how do you linearise the function y=ax2+bx+c?

take a regular multiple regression, input 2 prices - regular and squared

and the output is just the price

you just don't need it in its bare form

 
Maxim Dmitrievsky:

doesn't compile, can I have an example of how to use it?

Misunderstood. This is a debug support file. If you take it as well, it will pull a lot of things.

Uninstall this file's inlude and remove all the ASSERTs and TRACEs.

 
Georgiy Merts:

This is a debug support file.

Delete it, and delete all the ASSERTs and TRACEs.

Yeah ok, already figured it out, thanks... I don't know why I need it, just to see how smart people code)

 

In the polynomial regression indicator I posted, the regression is implemented through a function:

double regression_QRMA(int period,int shift,int price) 
  {
   double lwma= iMA(NULL,0,period,0,MODE_LWMA,price,shift);
   double sma = iMA(NULL,0,period,0,MODE_SMA,price,shift);
   double qwma= ma_qwma(period,shift,price);
   double value=3.0*sma+qwma *(10-15/(period+2))-lwma *(12-15/(period+2));
   return(value);
  }

where

double ma_qwma(int period,int shift,int price) 
  {
   double sum=0;
   int j,i;
   for(j=shift,i=1;j<shift+period; j++,i++) 
     {
      sum+=switch_getPrice(price,j)*MathPow(period-i+1,2);
     }
   double value=6.0/(period *(period+1) *(2*period+1));
   return(value*sum);
  }


double switch_getPrice(int price,int shift) 
  {
   switch(price) 
     {
      case 0:
         return(Close[shift]);
      case 1:
         return(Open[shift]);
      case 2:
         return(High[shift]);
      case 3:
         return(Low[shift]);
      case 4:
         return((High[shift]+Low[shift])/2);
      case 5:
         return((High[shift]+Low[shift]+Close[shift])/3);
      case 6:
         return((High[shift]+Low[shift]+Close[shift]+Close[shift])/4);
      default:
         return(Close[shift]);
     }
  }


is it correct?)
is it possible to implement the ISC through wizards?)

 
RRR5:
In that polynomial regression indicator I posted, the regression is implemented through a function:
is this correct?)
Is it possible to implement an ANC through a dummy?)

Well, correctness - see for yourself. I find the formula for calculating the value quite strange. It's clearly not MNC, but it may well be something in between.

About the "MOC through wizards" - very dubious. The method of least squares is a search for the approximating curve coefficients such that the sum of squares of differences of source and approximated points values is minimal.

We take the initial points, for each abscissa count the approximated ordinates, subtract the real ordinates, squared, and sum up all the squares. We differentiate this sum by each unknown (the unknowns are the coefficients of the approximating curve), and obtain a system of equations. If we approximate it by a polynomial we obtain a system of linear algebraic equations. It seems to me that no matter how you twist it, you won't get the same thing.

Reason: