Machine learning in trading: theory, models, practice and algo-trading - page 474

 
Aleksey Vyazmikin:

Well, how can we help if you haven't answered what variables you need to call?

And for iCustom, you need to create a handle - i.e. bind it to a variable.

I do it approximately like that in my Expert Advisor (the principle is the same in the indicator, in general...).

//Хендали - мать их
int handle_iMomentum;

int OnInit()
  {
//Хендаль объявляем iMomentum
   handle_iMomentum=iMomentum(Symbol(),0,100,0);
   if(handle_iMomentum==INVALID_HANDLE)
     {
      PrintFormat("Failed to create handle of the iMomentum indicator for the symbol %s/%s, error code %d",
                  Symbol(),EnumToString(Period()),GetLastError());
      return(INIT_FAILED);
     }

   return(INIT_SUCCEEDED);
  }

void OnTick()
  {
double Momentum=Momentumf(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
double Momentumf(const int index)
  {
   double MA[1];
   ResetLastError();
   if(CopyBuffer(handle_iMomentum,0,index,1,MA)<0)
     {
      PrintFormat("Failed to copy data from the iMA indicator, error code %d",GetLastError());
      return(0.0);
     }
   return(MA[0]);
  }


I do it like this, but it doesn't want to be displayed... :-( Ok, let's try it....

 
Mihail Marchukajtes:


It seems to have started everything, but it doesn't want to be displayed... :-( Ok, we'll figure it out....


Show me the code where you did it. It is not in the old code.

 
Dr. Trader:
I did it this way - created a new column where I combined date and time, and then searched for matches of such values in different tables.

And also discarded bars introduce errors in ohlc values, i.e. bar closed at one price, and then because of the deleted bar the next one in the table will open at a different price, and High and low of the deleted bar will be lost at all. High, low and close of the deleted bar should be compared with the previous non-removed bar and update it if necessary.
I was just working with open prices, so I did not bother with them that much.

Thank you! I will look into it... And the falling out of several bars is not critical there will be a lot of smoothing...
 
Aleksey Vyazmikin:

Show me the code where you started it. The old code does not have it.

Files:
ChekParam.mq5  11 kb
 
Mihail Marchukajtes:

I don't have an indicator from the code - I can't check it.

But, here is an example made for you on MAschka on the traces of your code


PS: I changed the file was wrong

Files:
ChekParam.mq5  7 kb
 

I dabble in deep learning. I do everything with the library https://www.microsoft.com/en-us/cognitive-toolkit/ Its advantage is that it can be connected to MT5. But only 64 bit. That is why I need 64 bit Windows. The library is made for this kind of wind. I have tried two obvious approaches to forecasting price of the next bar and zigzag reversals. I have been feeding the network with price changes and bar lengths. I have not obtained good results using both approaches. I use recurrent nets. To whom it may interest https://github.com/RandomKori/Forex I need some fresh ideas what can be tested. You have the idea and I will do the realization.

Microsoft Cognitive Toolkit
Microsoft Cognitive Toolkit
  • www.microsoft.com
A free, easy-to-use, open-source, commercial-grade toolkit that trains deep learning algorithms to learn like the human brain. Microsoft Cognitive Toolkit (formerly known as CNTK) version 2.0 is now available to Developers and Data Scientists. Cognitive Toolkit is a free, easy-to-use, open-source toolkit that trains deep learning algorithms...
 
Grigoriy Chaunin:

I dabble in deep learning. I do everything with the library https://www.microsoft.com/en-us/cognitive-toolkit/ Its advantage is that it can be connected to MT5. But only 64 bit. That is why I need 64 bit Windows. The library is made for this kind of wind. I have tried two obvious approaches to forecasting price of the next bar and zigzag reversals. I have been feeding the network with price changes and bar lengths. I have not obtained good results using both approaches. I use recurrent nets. To whom it may interest https://github.com/RandomKori/Forex I need some fresh ideas what can be tested. You come up with the idea and I will do the implementation.


I should look what you have done there... But it is cool, I wanted to try it too, but i have not got to it yet.

Maybe you could write an article about how to connect this library with MT5 and an example of some ns?

 

I am not a master of writing articles. I gave you a link to a githab where all the code is. Here will be examples. I will answer your questions if I know the answer. I'm just beginning to get to grips with the library. I'm not very well with documentation on it so far. Especially for C++. And it's impossible to connect it to MT without it.

 

Summary of caret

Files:
 
Grigoriy Chaunin:

I dabble in deep learning. I do everything with the library https://www.microsoft.com/en-us/cognitive-toolkit/ Its advantage is that it can be connected to MT5. But only 64 bit. That is why I need 64 bit Windows. The library is made for this kind of wind. I have tried two obvious approaches to forecasting price of the next bar and zigzag reversals. I have been feeding the network with price changes and bar lengths. I have not obtained good results using both approaches. I use recurrent nets. To whom it may interest https://github.com/RandomKori/Forex I need some fresh ideas what can be tested. You come up with the idea and I will try to make it work.

I propose to try the data from FORTS. And not only the price (maybe even not so much), but also other flows coming from the exchange. If it's interesting, I'll send you the data, but tell me in what format.