a trading strategy based on Elliott Wave Theory - page 296

 
Andre69

Have you tried additional manipulation of the wavelet transform coefficients.
End up with something like this:
 
Guys, work for the good of the motherland, do science, come up with something useful, finally show your ambition
 
Colleagues, there is a small question. How should I put it correctly - is it possible to dynamically expand the number of elements in an array. For example, I am looking for stable channels in some area starting from zero bar. I don't know their number since the beginning of the search and I may never find any. From the documentation I've read, I think I've figured out that you can't. Is this true, or is there a more subtle way?

PS: So far I've come up with several variants in MT (MathCAD doesn't have such a problem):

(1). I create a parameter (int count=0;) I loop through the range and check criteria; if it meets them, count=count+1. Next, I create an array with the obtained count, and repeat everything all over again: I write the calculated parameters to the array and select the optimal channel.

(2) Create an array for channel parameters according to the original range length.
 
grasn
... How can I put it correctly - is it possible to dynamically expand the number of elements in the array. For example, I am looking for stable channels at some area from zero bar. I do not know their number at the beginning of the search and I may not find any.

Frankly speaking, the question is not quite clear. The number of elements in an array (size) is dynamically changed with ArrayResize. If you actually want to create structures, they are promised only in MT5.
Purely by the consonance of words - I was solving the problem of additional order properties, we did not know exactly their number and the number of properties (the same 40 indicators) was also not known beforehand. Three functions were used but new properties had to be added to each of them manually, with subsequent recompilation. I don't know if this is right or wrong, but just in case, here is the code of the last version
//+------------------------------------------------------------------+
//| Изменение размеров массивов свойств ордера                       |
//+------------------------------------------------------------------+
int ResizeOrdArrays() {
  ArrayResize(OrdID,OrdArrSize);
  ArrayResize(OrdTicket,OrdArrSize);
//  ArrayResize(OrdData1,OrdArrSize);
//  ArrayResize(OrdData2,OrdArrSize);
//  ArrayResize(OrdData3,OrdArrSize);
//  ArrayResize(OrdData4,OrdArrSize);
  return(0);
}
//+------------------------------------------------------------------+
//| Добавление ордера в список ордеров                               |
//+------------------------------------------------------------------+
int AddOrder(int ID) {
  OrdInd=OrdNum;
  OrdNum++;
  if (OrdNum > OrdArrSize) {
    OrdArrSize = OrdNum;
    ResizeOrdArrays();
  }
  OrdID[OrdInd] = ID;
  OrdTicket[OrdInd] = ticket;
//  OrdData1[OrdInd] = 123.45;
//  OrdData2[OrdInd] = 123.45;
//  OrdData3[OrdInd] = 123.45;
//  OrdData4[OrdInd] = 123.45;
  return(0);
}
//+------------------------------------------------------------------+
//| Исключение ордера из списка ордеров                              |
//+------------------------------------------------------------------+
int CutOrder() {
  OrdNum--;
  if (OrdInd < OrdNum) {
    OrdID[OrdInd] = OrdID[OrdNum];
    OrdTicket[OrdInd] = OrdTicket[OrdNum];
//    OrdData1[OrdInd] = OrdData1[OrdNum];
//    OrdData2[OrdInd] = OrdData2[OrdNum];
//    OrdData3[OrdInd] = OrdData3[OrdNum];
//    OrdData4[OrdInd] = OrdData4[OrdNum];
  }
  return(0);
}



P.S. By the way, I used the same "structure" for my channels.

 
<br / translate="no"> ...The number of elements in an array (size) is changed dynamically with ArrayResize. ...


Doesn't changing the size of an already created array resize it to zero?
 
No. This is checked with a print.
 
No. This is checked with a print. <br / translate="no">


Thank you. I must have written the print wrong somehow. :о)
 
Hm, I haven't checked it myself for a long time, but firstly it seems to work fine, and secondly Renat has explicitly assured that this property can be considered documented, i.e. to be supported in all new versions.
 
Confirmed. If you increase the size of the array by 1, a new null element is added to the end of the array. The other elements remain unchanged.
When the matrix is resized, a null row is added to the matrix.
 
Thank you. It's safe to say that I've messed up the code. OK. This feature makes it a lot easier.