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

 
mytarmailS:

Don't laugh, but get into it...

You don't need a code, you need log rules (this is a model), take these rules and paste them into your code, the sum of the predictions of the rules will be the answer of the model - "1" or "-1"

If you don't understand it then ask

while I am good ))


 condition                                                                                                       
 [1,] "X[,10]<=-0.025 & X[,10]>-0.08201612905"                                                                        
 [2,] "X[,9]>-0.057983871 & X[,9]<=-0.01129032255 & X[,10]>0.0219354839"                                              
 [3,] "X[,9]<=-0.057983871"                                                                                           
 [4,] "X[,9]>0.0702419355"                                                                                            
 [5,] "X[,8]>0.01362903225 & X[,8]<=0.0564516129 & X[,9]>0.00153225805"                                               
 [6,] "X[,8]<=0.0564516129 & X[,8]>-0.01153225805 & X[,9]<=0.0040322581 & X[,10]<=-0.00596774195"                     
 [7,] "X[,8]>-0.03370967745 & X[,8]<=-0.00403225805 & X[,10]>0.00032258065"                                           
 [8,] "X[,8]<=-0.03370967745 & X[,10]>0.02814516125"                                                                  
 [9,] "X[,8]<=-0.03370967745 & X[,10]<=0.02443548385"                                                                 
[10,] "X[,7]>-0.025 & X[,7]<=-0.00403225805 & X[,8]>-0.03370967745"                                                   
[11,] "X[,8]>-0.0266935484 & X[,8]<=-0.025"                                                                           
[12,] "X[,9]>0.0091129032 & X[,9]<=0.0277419355 & X[,10]<=-0.00096774195"                                             
[13,] "X[,9]<=0.0564516129 & X[,9]>0.03935483875"                                                                     
[14,] "X[,8]>0.02346774195 & X[,9]>-0.057983871 & X[,9]<=-0.0212903226"                                               
[15,] "X[,8]>-0.03370967745 & X[,8]<=0.0233870968 & X[,9]<=0.0233870968 & X[,10]>0.0091129032 & X[,10]<=0.02766129035"
[16,] "X[,8]>-0.03370967745 & X[,9]<=-0.00120967745 & X[,10]>-0.00596774195 & X[,10]<=0.0229032258"                   
[17,] "X[,10]>0.0012903226"                                                                                           
[18,] "X[,1]==X[,1]"                                                                                                  
      pred
 [1,] "1" 
 [2,] "-1"
 [3,] "1" 
 [4,] "-1"
 [5,] "-1"
 [6,] "-1"
 [7,] "1" 
 [8,] "-1"
 [9,] "-1"
[10,] "1" 
[11,] "-1"
[12,] "1" 
[13,] "1" 
[14,] "-1"
[15,] "1" 
[16,] "1" 
[17,] "-1"
[18,] "1"


Please don't tell me what's wrong...

As I understand it, I take the previous 10 values and go through the sliding window, if the condition at the step satisfies, for example

condition "X[,1]==X[,1]" then I add to the prediction pred [18,] "1" and so on.

p/s (added) although I misunderstood something...


Are these coefficients after training? If the characteristic of the series changes (there will be other numbers) , then we have to retrain.

 
Evgeniy Chumakov:

As I understand it, I take and pass through the sliding window on the previous 10 values, if the condition on the step satisfies, e.g.

condition "X[,1]==X[,1]" then I add to the pred prediction [18,] "1" and so on.

Yes, exactly like that...

You should only take into account that X[10] is the last candle in my case and in your mt4 it will be X[1].

Evgeniy Chumakov:

condition - are these the coefficients after the training?

Condition are rules, normal log rules, which are the result of training...


Evgeniy Chumakov:

If the characteristics of the series change (the numbers are different), then you need to retrain.

Well, another training on other data (characteristics)== other rules (other numbers)

 
mytarmailS:

Just make him a model in the form of logging rules, let him embed it in his code, why torture the man with python?

Or should I do it?

I just restarted the bot, it's testing again.
 
mytarmailS:


Only take into account that X[10] is the last candle in my case and in your mt4 it seems that the last candle is X[1].


My data is in an array. Here are the last 21 candlesticks. at the top of it is the last current value I want to predict. i.e. i need to start from 0.0925306577 .

Show me an example for the first two data, at least.

0.0116260551
0.0925306577
-0.0154483198
-0.0281892021
0.0216594999
0.0657748049
0.0471412645
-0.0226150661
0.0925306577
-0.0170409301
-0.0805860806
0.0181557573
0.0308966396
-0.0250039815
-0.0832935181
-0.0149705367
0.0227743271
-0.0060519191
0.0103519669
0.0216594999
0.0657748049
 
Maxim Dmitrievsky:
Do what you want) I just restarted the bot, it's testing again

Max, make this damn bible)). 10 minutes of time, and we'll fiddle with it!

 
mytarmailS:

Max, make this damn bible))) 10 minutes of time, and we'll be picking!

Can't you just copy the code into one file? Or do you need a package?
 
Evgeniy Chumakov:

I have data in an array. Here are the last 21 pieces. At the top there is the last current value, which I want to predict. That is to start counting from 0.0925306577 .

If you want just to check the prediction, yes

 
Maxim Dmitrievsky:
Well, can't you just copy the code into one file?)

are you sure you know how to make libraries?

 
mytarmailS:

Are you sure you know how to make libraries?

There are no libraries in python, so I don't know what you need
 
 [1,] "X[,10]<=-0.025 & X[,10]>-0.08201612905"                                                                        
 [2,] "X[,9]>-0.057983871 & X[,9]<=-0.01129032255 & X[,10]>0.0219354839"                                              
 [3,] "X[,9]<=-0.057983871"                                                                                           
 [4,] "X[,9]>0.0702419355"                                                                                            
 [5,] "X[,8]>0.01362903225 & X[,8]<=0.0564516129 & X[,9]>0.00153225805"                                               
 [6,] "X[,8]<=0.0564516129 & X[,8]>-0.01153225805 & X[,9]<=0.0040322581 & X[,10]<=-0.00596774195"                     
 [7,] "X[,8]>-0.03370967745 & X[,8]<=-0.00403225805 & X[,10]>0.00032258065"                                           
 [8,] "X[,8]<=-0.03370967745 & X[,10]>0.02814516125"                                                                  
 [9,] "X[,8]<=-0.03370967745 & X[,10]<=0.02443548385"                                                                 
[10,] "X[,7]>-0.025 & X[,7]<=-0.00403225805 & X[,8]>-0.03370967745"                                                   
[11,] "X[,8]>-0.0266935484 & X[,8]<=-0.025"                                                                           
[12,] "X[,9]>0.0091129032 & X[,9]<=0.0277419355 & X[,10]<=-0.00096774195"                                             
[13,] "X[,9]<=0.0564516129 & X[,9]>0.03935483875"                                                                     
[14,] "X[,8]>0.02346774195 & X[,9]>-0.057983871 & X[,9]<=-0.0212903226"                                               
[15,] "X[,8]>-0.03370967745 & X[,8]<=0.0233870968 & X[,9]<=0.0233870968 & X[,10]>0.0091129032 & X[,10]<=0.02766129035"
[16,] "X[,8]>-0.03370967745 & X[,9]<=-0.00120967745 & X[,10]>-0.00596774195 & X[,10]<=0.0229032258"                   
[17,] "X[,10]>0.0012903226"                                                                                           
[18,] "X[,1]==X[,1]"     

Where are X[,3], etc.? Or don't need them? I don't understand X[,1] == X[,1] meaning? You have to go through the last 10 values to predict, or 10 times with a shift of 1 over 10 values?