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

 
Mihail Marchukajtes:
Fuck it to be honest....
Good point, I support you. :) People have been given a very good hint, and they do not understand. For they are very far from the market and understanding of the processes that occur on it. And even simple things to them sound like heresy and Chinese literacy. But they create neural networks. :)
 

Guys, please help me with a seemingly elementary thing, but I do not know how to implement it, and I could not properly formulate a question in English to google it...

I have a normal loop that goes through a vector, say, from 1 to 1000

for(i in 1:1000) {

# how can i make a logical condition that will be triggered every n iterations of the loop, say every 17 iterations

}

 
mytarmailS:

Guys, please help me with a seemingly elementary thing, but I do not know how to implement it, and I could not properly formulate a question in English to google it...

I have a regular loop that goes through a vector of, say, 1 to 1000

for(i in 1:1000) {

# how can i make a logical condition that will be triggered every n iterations of the loop, say every 17 iterations

}

This is done using the"remainder of division" operation:

//+------------------------------------------------------------------+
//|                                                         Test.mq5 |
//|                              Copyright © 2016, Vladimir Karputov |
//|                                           http://wmua.ru/slesar/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2016, Vladimir Karputov"
#property link      "http://wmua.ru/slesar/"
#property version   "1.000"
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
   for(int i=0;i<100;i++)
     {
      int iteration=i%17;
      if(iteration==0)
         Print(i);
     }
  }
//+------------------------------------------------------------------+

and the result:

2016.10.20 09:16:35.542 Test (GBPJPY,D1)        0
2016.10.20 09:16:35.543 Test (GBPJPY,D1)        17
2016.10.20 09:16:35.543 Test (GBPJPY,D1)        34
2016.10.20 09:16:35.543 Test (GBPJPY,D1)        51
2016.10.20 09:16:35.543 Test (GBPJPY,D1)        68
2016.10.20 09:16:35.543 Test (GBPJPY,D1)        85
Files:
Test.mq5  2 kb
 
Karputov Vladimir:

This is done with the operation"remainder of division":

Thank you, kind man...

Everything worked out

for(i in 1:100){
   if(i%%17==0)  print(i)


[1] 17
[1] 34
[1] 51
[1] 68
[1] 85
 
mytarmailS:

Thank you, kind man...

Everything worked out

for(i in 1:100){
   if(i%%17==0)  print(i)


[1] 17
[1] 34
[1] 51
[1] 68
[1] 85
And when will you start working in MetaTrader 5 already?
 
Karputov Vladimir:
When are you going to start working in MetaTrader 5?

I don't know, I just don't see any reason to switch, and there are several reasons not to switch, and they are objective...

1) I'm at the stage of market research using machine learning (ML), and it's better to research something using ML tools through "R", in part, it was created for this purpose. When I have a ready working idea, the time of selling the robot in trade will come, I will think how and using what to implement it: mql or S# or tslab or..... or.... I will think about what to do with it, either mql or s#, or tslab or or on what...

2) I'm from Ukraine and I trade on the Russian derivatives market - FORTS , I can not trade Russia directly by the law, but some of our brokers have created some "crutches" that we could trade FORTS , but none of these brokers does not provide access to MT5, as far as I know

I started with forex back in the shitty years and I will never trade on this pseudo-market again. It is principled and rational, because I have already seen much and have something to compare it with...

I tried to explain my way of thinking as clearly as possible.

 
BlackTomcat:
Literate position, I support. :) People were given a very good hint, and they do not understand. Because they are very far from the market and understanding of the processes that occur on it. And even simple things to them sound like heresy and Chinese literacy. But they create neural networks. :)
F And I think that they have used it, if all are quiet at once. They must be training....
 
mytarmailS:

I don't know, so far I just don't see any reason to switch, and there are several reasons not to switch, and they are objective...

...

2... I'm from Ukraine and I trade Russian derivatives - FORTS, I can not trade Russia directly for the law, but some of our brokers created some "crutches" that we could trade FORTS, but none of these brokers do not provide access to MT5, as far as I know

...

As far as I remember it's not so hard to do:

  • make a copy of your passport and notarize it
  • go to any brokerage house in Russia (for example, to "Otkritie")
  • there you open an account.
But it is better to call the office beforehand (thanks to Skype you can call foreign numbers for free).

 
I will tell you about my brokerage service and my broker's role in it:

As far as I remember, it's not that hard to do:

  • Make a copy of your passport and have it notarized
  • You go to any broker's office in Russia (for example, to "Otkritie")
  • There you open an account.
But it's better to call the office beforehand (thanks to Skype you can call foreign landlines for free).

Well, firstly, you can't, because I'm not a resident of the Russian Federation and, therefore, I have no right to trade according to Russian law.

Secondly, if you imagine purely hypothetically that it is possible, just imagine! I have to go to another country to register with a broker just to trade through MT5, do not you think it's a little funny or a little crazy? :) Be honest :)

 
mytarmailS:

Well, firstly, it will not work, because I am not a resident of the Russian Federation and, therefore, I have no right to trade according to the law of the Russian Federation.

I have to go to another country to register with a broker just to trade through MT5, don't you think it's even a little funny or a little crazy? :) Be honest :)

There's no need to make hypothetical conclusions - I pointed out to you the most real and legal way.