Ticarette makine öğrenimi: teori, pratik, ticaret ve daha fazlası - sayfa 1862

 
Roma :

Tercihler -> Genel -> Ekle() ve Kapanış }])'"
Belki bu yardımcı olur?

Veya derlemek.
Ardından, Hatalar sekmesinde ilk hataya çift tıklayın.
İmleç, kapatma parantezinin olmadığı yere gidecektir.
Ve böylece her parantez, hataya çift tıklayın, parantez koyun, derleyin.

görev, python'da çalışan bir mql kodu oluşturmaktır, neden rahatsız

neredeyse bitti

 
Roma :

Tercihler -> Genel -> Ekle() ve Kapanış }])'"
Belki bu yardımcı olur?

Veya derlemek.
Ardından, Hatalar sekmesinde ilk hataya çift tıklayın.
İmleç, kapatma parantezinin olmadığı yere gidecektir.
Ve böylece her bir parantez, hataya çift tıklayın, parantez koyun, derleyin.

Sanırım çevrimdışı olmanın bir yolu olmadığı noktasına geldim ....

evrak çantası bir escho parçası ki ....

 

işte

düzenlemek için hata ayıklayıcıda yıpranır: D

alabileceğin en büyük ağaç değil

 double decision_tree( double &features[]) { 
     if ( features[ 11 ] <= 0.000385 )  {
         if ( features[ 9 ] <= - 0.000275 )  {
             if ( features[ 9 ] <= - 0.000465 )  {
                 if ( features[ 5 ] <= 0.00034 )  {
                     if ( features[ 10 ] <= - 0.00034 )  {
                         return 2 ; }
                     if ( features[ 10 ] > - 0.00034 )  {
                         if ( features[ 11 ] <= - 0.00031 )  {
                             return 1 ; }
                         if ( features[ 11 ] > - 0.00031 )  {
                             return 2 ; } } }
                 if ( features[ 5 ] > 0.00034 )  {
                     return 1 ; } }
             if ( features[ 9 ] > - 0.000465 )  {
                 if ( features[ 4 ] <= - 0.000465 )  {
                     return 1 ; }
                 if ( features[ 4 ] > - 0.000465 )  {
                     if ( features[ 9 ] <= - 0.000425 )  {
                         if ( features[ 5 ] <= - 0.00015 )  {
                             return 1 ; }
                         if ( features[ 5 ] > - 0.00015 )  {
                             return 2 ; } }
                     if ( features[ 9 ] > - 0.000425 )  {
                         if ( features[ 8 ] <= - 0.000165 )  {
                             if ( features[ 4 ] <= - 0.000395 )  {
                                 if ( features[ 5 ] <= - 0.00033 )  {
                                     return 1 ; }
                                 if ( features[ 5 ] > - 0.00033 )  {
                                     return 2 ; } }
                             if ( features[ 4 ] > - 0.000395 )  {
                                 return 2 ; } }
                         if ( features[ 8 ] > - 0.000165 )  {
                             if ( features[ 8 ] <= - 4.5 e- 05 )  {
                                 return 1 ; }
                             if ( features[ 8 ] > - 4.5 e- 05 )  {
                                 return 2 ; } } } } } }
         if ( features[ 9 ] > - 0.000275 )  {
             if ( features[ 3 ] <= 0.000605 )  {
                 if ( features[ 1 ] <= - 0.00036 )  {
                     return 2 ; }
                 if ( features[ 1 ] > - 0.00036 )  {
                     if ( features[ 9 ] <= - 0.000115 )  {
                         if ( features[ 2 ] <= 0.000165 )  {
                             if ( features[ 4 ] <= - 0.000125 )  {
                                 if ( features[ 7 ] <= - 0.00014 )  {
                                     if ( features[ 6 ] <= - 0.000265 )  {
                                         if ( features[ 8 ] <= - 0.0003 )  {
                                             return 1 ; }
                                         if ( features[ 8 ] > - 0.0003 )  {
                                             return 2 ; } }
                                     if ( features[ 6 ] > - 0.000265 )  {
                                         return 1 ; } }
                                 if ( features[ 7 ] > - 0.00014 )  {
                                     if ( features[ 10 ] <= - 0.00015 )  {
                                         return 1 ; }
                                     if ( features[ 10 ] > - 0.00015 )  {
                                         return 2 ; } } }
                             if ( features[ 4 ] > - 0.000125 )  {
                                 return 1 ; } }
                         if ( features[ 2 ] > 0.000165 )  {
                             return 2 ; } }
                     if ( features[ 9 ] > - 0.000115 )  {
                         if ( features[ 1 ] <= - 0.000175 )  {
                             if ( features[ 8 ] <= 0.000145 )  {
                                 return 1 ; }
                             if ( features[ 8 ] > 0.000145 )  {
                                 if ( features[ 2 ] <= - 9.5 e- 05 )  {
                                     return 0 ; }
                                 if ( features[ 2 ] > - 9.5 e- 05 )  {
                                     return 2 ; } } }
                         if ( features[ 1 ] > - 0.000175 )  {
                             if ( features[ 11 ] <= 0.000195 )  {
                                 if ( features[ 11 ] <= - 5.5 e- 05 )  {
                                     if ( features[ 5 ] <= 9.5 e- 05 )  {
                                         return 1 ; }
                                     if ( features[ 5 ] > 9.5 e- 05 )  {
                                         if ( features[ 2 ] <= - 2.5 e- 05 )  {
                                             return 0 ; }
                                         if ( features[ 2 ] > - 2.5 e- 05 )  {
                                             return 1 ; } } }
                                 if ( features[ 11 ] > - 5.5 e- 05 )  {
                                     if ( features[ 8 ] <= - 8.5 e- 05 )  {
                                         if ( features[ 2 ] <= 2.5 e- 05 )  {
                                             return 1 ; }
                                         if ( features[ 2 ] > 2.5 e- 05 )  {
                                             return 2 ; } }
                                     if ( features[ 8 ] > - 8.5 e- 05 )  {
                                         return 1 ; } } }
                             if ( features[ 11 ] > 0.000195 )  {
                                 if ( features[ 4 ] <= - 0.00024 )  {
                                     return 0 ; }
                                 if ( features[ 4 ] > - 0.00024 )  {
                                     if ( features[ 2 ] <= 0.00021 )  {
                                         if ( features[ 1 ] <= 1.5 e- 05 )  {
                                             return 1 ; }
                                         if ( features[ 1 ] > 1.5 e- 05 )  {
                                             return 1 ; } }
                                     if ( features[ 2 ] > 0.00021 )  {
                                         if ( features[ 5 ] <= 0.00024 )  {
                                             return 0 ; }
                                         if ( features[ 5 ] > 0.00024 )  {
                                             return 1 ; } } } } } } } }
             if ( features[ 3 ] > 0.000605 )  {
                 if ( features[ 11 ] <= 0.000195 )  {
                     return 2 ; }
                 if ( features[ 11 ] > 0.000195 )  {
                     return 0 ; } } } }
     if ( features[ 11 ] > 0.000385 )  {
         if ( features[ 11 ] <= 0.00049 )  {
             if ( features[ 3 ] <= 0.000155 )  {
                 if ( features[ 8 ] <= 0.00036 )  {
                     return 0 ; }
                 if ( features[ 8 ] > 0.00036 )  {
                     return 1 ; } }
             if ( features[ 3 ] > 0.000155 )  {
                 if ( features[ 11 ] <= 0.00041 )  {
                     if ( features[ 5 ] <= 0.00047 )  {
                         return 0 ; }
                     if ( features[ 5 ] > 0.00047 )  {
                         return 1 ; } }
                 if ( features[ 11 ] > 0.00041 )  {
                     return 1 ; } } }
         if ( features[ 11 ] > 0.00049 )  {
             if ( features[ 4 ] <= - 0.00022 )  {
                 return 1 ; }
             if ( features[ 4 ] > - 0.00022 )  {
                 if ( features[ 2 ] <= 0.000345 )  {
                     return 0 ; }
                 if ( features[ 2 ] > 0.000345 )  {
                     if ( features[ 7 ] <= 0.00061 )  {
                         return 1 ; }
                     if ( features[ 7 ] > 0.00061 )  {
                         return 0 ; } } } } }


 return 3 ; }
 

Ağacın aynı şekilde çalıştığını kontrol etmek.

mql'de:

 2020.07 . 11 23 : 17 : 15.120 code check (EURUSD,M5)  Result 2.0
2020.07 . 11 23 : 17 : 15.121 code check (EURUSD,M5)   0.00000    0.00030    0.00031    0.00019    0.00005 - 0.00009 - 0.00014 - 0.00014 - 0.00008 - 0.00025 - 0.00014 - 0.00038

Python'da:

lll = [ 0.00000 ,   0.00030 ,   0.00031 ,   0.00019 ,   0.00005 , - 0.00009 , - 0.00014 , - 0.00014 , - 0.00008 , - 0.00025 , - 0.00014 , - 0.00038 ]
lll = np.array(lll).reshape( 1 ,- 1 )
clf.predict(lll)

>>> clf.predict(lll)
array([ 2 ])
 
Renat Akhtyamov :

Sanırım çevrimdışı olmanın bir yolu olmadığı noktasına geldim ....

evrak çantası bir escho parçası ki ....

çevrimdışı yaşam normları, test edildi

ceket sarıldığı sürece

aptalca bir hataydı

Roman , kendinde bir hata ara, tarihte iyi çalışmalı

;)

buharlı, 7 yıl önce

bulundu, stratejide bir kusur buldu !!!

günde 10x'e kadar ön test

o ne olacak.....

 
@Maxim Dmitrievsky'nin hala bir ayrıştırıcıya ihtiyacı var mı?
Dosyalar:
parser.zip  2 kb
 
Renat Akhtyamov :

çevrimdışı yaşam normları, test edildi

ceket sarıldığı sürece

aptalca bir hataydı

Roman , kendinde bir hata ara, tarihte iyi çalışmalı

;)

buharlı, 7 yıl önce

bulundu, stratejide bir kusur buldu !!!

günde 10x'e kadar ön test

o ne olacak.....

O yüzden tarihe geçmez demedim :))
Hikaye için bitirmediğimi söyledim ve şu ana kadar geliştirmeyi erteledim.
Dolayısıyla tarihsel verilerin hazırlanması önemli aşamalardan biridir.
Ve tüm modeller, geçmiş dikkate alınarak inşa edilir, test edilir.
aynı istatistik
Her şeyin yolunda gitmesine sevindim.

 
Nanix :
@Maxim Dmitrievsky'nin hala bir ayrıştırıcıya ihtiyacı var mı?

teşekkürler, parantezler hala eksik, örneğin burada

 if (L_55_1  >   0.00047 ) {
     if (L_30_1  <= 0.00044 )
        { return 2 ;}
     if (L_30_1  >   0.00044 ) {
         if (L_25_1  <= 0.00047 ) {
             if (L_5_1  <= 0.00012 )
                { return 0 ;}
             if (L_5_1  >   0.00012 )
                { return 2 ;} }
         if (L_25_1  >   0.00047 ) return 2 ; } }

kırmızı - olması gerektiği gibi

benimki her şeyi alt üst eder. Aksi takdirde şartlar çarpık işleyecek ve ağaç saymayacaktır.

 
Maksim Dmitrievski :

teşekkürler, parantezler hala eksik, örneğin burada

kırmızı - olması gerektiği gibi

benimki her şeyi alt üst eder. Aksi takdirde şartlar çarpık işleyecek ve ağaç saymayacaktır.

Kodlarınıza dayanarak, ağaçların nasıl çalıştığını kabaca anlamaya başladım. Bir polinomla karşılaştırıldığında zayıf bir algoritma, benim için öyle ....
 
Michael Marchukajtes :
Kodlarınıza dayanarak, ağaçların nasıl çalıştığını kabaca anlamaya başladım. Bir polinomla karşılaştırıldığında zayıf bir algoritma, benim için öyle ....

saçma sapan konuşma