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

 
Vizard_:

For experiments just unload to text file and read from there.
And you can also use code from p and python in one notebook... etc...

I understand about the unloading, but it's not very interesting for me, because I also want to use catbust as a source of models, which can be combined (preliminary experiments gave good results), but for this I need the model code.

 
            if(Test_P!=1245)if(DonProc>=5.5 && TimeH< 10.5 && Levl_High_H4s1< 1.5) CalcBuy=CalcBuy+1; //(0.22513089 0.30366492 0.47120419)
            if(Test_P!=2030)if(Povtor_Low_M1>=0 && TimeH>=10.5 && TimeH< 21.5 && BB_iD_Center_H1< 0 && Levl_Close_D1>=-2.5 && Levl_Support_W1s1< 4.5 && LastBarPeresekD_Down_M15< 4.5) CalcBuy=CalcBuy+1; //(0.09111617 0.51252847 0.39635535)
            if(Test_P!=2537)if(Povtor_High_M1>=0 && rLevl_Down_iD_RSI< -6.5 && TimeH< 14.5) CalcBuy=CalcBuy+1; //(0.1990172 0.3832924 0.4176904)
            if(Test_P!=3243)if(Levl_Close_H1>=0 && TimeH<10.5 && Levl_Support_W1<-3.5) CalcBuy=CalcBuy+1; //(0.1153846 0.1538462 0.7307692)
            if(Test_P!=3314)if(Levl_Close_H1>=0 && TimeH< 10.5 && Levl_Low_W1s1N< 4.5 && Levl_Support_W1< -3.5) CalcBuy=CalcBuy+1; //(0.1153846 0.1538462 0.7307692)
            if(Test_P!=3583)if(Povtor_Type_M1>=0 && TimeH< 10.5 && Levl_Close_W1< -3.5) CalcBuy=CalcBuy+1; //(0.11428571 0.20000000 0.68571429)
            if(Test_P!=3857)if(Povtor_Type_M1>=0 && TimeH<10.5 && Levl_Support_W1<-3.5) CalcBuy=CalcBuy+1; //(0.07142857 0.17857143 0.75000000)
            if(Test_P!=6546)if(Povtor_Type_H1< 0 && Levl_Close_H1s1N>=0 && Levl_Close_H1s1N< 2.5 && Levl_High_W1s1>=2.5 && DonProc_M15>=5.5) CalcBuy=CalcBuy+1; //(0.1228070 0.4210526 0.4561404)
            if(Test_P!=6676)if(Povtor_Type_H1< 0 && Levl_Close_H1s1N>=0 && Levl_Close_MN1< 4.5 && TimeH< 21.5 && BB_iD_Center_H1< 0 && Povtor_Type_M15>=0 && Levl_Down_DC_M15>=-2.5) CalcBuy=CalcBuy+1; //(0.10619469 0.42477876 0.46902655)
            if(Test_P!=8673)if(Levl_Close_H1s1< 0 && Levl_Close_H1s1N>=0 && Part_H4>=2.5 && TimeHG< 3 && Levl_first_W1s1>=0.5) CalcBuy=CalcBuy+1; //(0.11607143 0.40178571 0.48214286)
            if(Test_P!=8840)if(TimeHG>=1.5 && RSI_Open_M1< 0.5 && BB_Peresek_Last_M1< 0.5 && RSI_Open_M1>=-0.5 && Levl_Support_W1s1>=-4.5 && Povtor_Low_H1>=0 && Levl_Support_H4>=0 && RegressorSpeed< 1.5) CalcBuy=CalcBuy+1; //(0.1606218 0.4145078 0.4248705)
            if(Test_P!=10002)if(rOpen_WormsDown>=0 && BB_Peresek_Last_M1< 0.5 && rDeltaWorms< 2.5 && DonProcVisota< 4.5 && Part_D1< 3.5 && BB_iD_Center_H1< 0 && Levl_Close_H1s1N>=0) CalcBuy=CalcBuy+1; //(0.1890244 0.3963415 0.4146341)
            if(Test_P!=10395)if(rOpen_WormsDown>=0 && Povtor_Type_M15>=0 && Levl_Low_H1< -4.5 && Levl_Close_H1s1N>=0) CalcBuy=CalcBuy+1; //(0.1990741 0.3888889 0.4120370)
            if(Test_P!=14244)if(rPeresek_Up<0.5 && BB_Peresek_Last_M1<0.5 && Polozhenie_M1>=0 && Povtor_High_H1<-2.5) CalcBuy=CalcBuy+1; //(0.1948052 0.3506494 0.4545455)
            if(Test_P!=14462)if(rPeresek_Up<0.5 && BB_Peresek_Last_M1<0.5 && Polozhenie_M1>=0 && DonProc_M15<9.5 && Levl_Support_H4s1<4.5 && Povtor_High_H1<-2.5) CalcBuy=CalcBuy+1; //(0.2112676 0.3239437 0.4647887)
            if(Test_P!=17944)if(Levl_Low_H1s1N< -1.5 && Levl_Close_H4>=0 && Levl_Close_H1s1N>=0 && BB_iD_Center_H1< 0 && Part_H1< 2.5) CalcBuy=CalcBuy+1; //(0.1408451 0.3239437 0.5352113)
            if(Test_P!=18382)if(Povtor_Low_M15< 3.5 && LowPerekH1s1_1< 0.5 && Polozhenie_M1>=0 && BB_iD_Down_M1>=-5.5 && DonProcVisota>=3.5 && Povtor_Low_M15< 1.5 && BB_iD_Down_M1>=-1.5) CalcBuy=CalcBuy+1; //(0.1659389 0.3842795 0.4497817)
            if(Test_P!=19123)if(rPeresek_Down< 0.5 && Povtor_Low_M15< 3.5 && LowPerekH1s1_1< 0.5 && Polozhenie_M1>=0 && rCalcLvlWorms< 1.5 && DonProcVisota>=3.5 && rLevl_UpPeresek_iD_RSI< 1.5 && RegressorCalc_S1>=-1.5 && Levl_first_W1s1>=-0.5) CalcBuy=CalcBuy+1; //(0.1225490 0.4313725 0.4460784)
            if(Test_P!=26038)if(Levl_Support_H1s1>=-3.5 && Part_H4< 2.5 && LowPerekH1s1_0>=0.5 && Part_H1>=1.5) CalcBuy=CalcBuy+1; //(0.1912568 0.4153005 0.3934426)

If it is an ironclad/fixed code for the entire period (from 5 years), then my advice is irrelevant.

 
Vizard_:

He who seeks shall find. + If you have a 0 well predicted and a series of targeting
goes 1 0 -1 0 1 rather than 1 0 1 0 -1, then the problem comes down to binary classification,
you just have to predict 0 qualitatively...

It is true, zero is predicted quite well, as in R you can find a bunch of leaves with more than 55% probability, as well as in the ketbust, and it is generally clear - zeros, i.e. flat movements, exceed trend movements 1 to 3 approximately, therefore it is easier to detect them, but it takes effort to prevent the small volume of trends from being sucked into zero.

I do not understand why everybody is trying to find a model that describes the market perfectly. My approach is different, the model has 4 states - buy/not trade/sell/don't know what to do and the last one will be proportional to the second one, i.e. no action, but due to not completely covering the whole sample (the whole market) one can get more acceptable results where the model knows what it needs to do.

 
Farkhat Guzairov:

If it's an ironclad/fixed-period code (5 years and up), then my advice is irrelevant.

This is a code for a model to buy without leaves-filters - here I selected 5 pieces of leaves-filters

            if(Test_P!=16772)if(BB_Peresek_Last_M1>=0.5 && Polozhenie_M1>=0 && Levl_High_H1>=1.5 && HighPerekH1s1_1<0.5 && Levl_High_H4<3.5) CalcBuy=0; //(0.1987013 0.4805195 0.3207792)
            if(Test_P!=28430)if(Levl_High_H1s1>=4.5 && LastBarPeresekD_Down_M15>=1.5 && rDeltaWorms_M15>=1.5 && rLevl_Down_iD_RSI_H1< -3.5 && Levl_Close_D1s1N< 1.5 && Levl_Close_H4s1< 3.5) CalcBuy=0; //(0.2746269 0.5522388 0.1731343)
            if(Test_P!=2124)if(Povtor_Low_M1<0 && Povtor_High_M1<1.5 && TimeH<21.5 && Levl_Down_DC>=-7.5 && TimeH<16.5 && Povtor_High_M15>=-2.5 && Levl_Close_D1s1<1.5) CalcBuy=0; //(0.30515298 0.55877617 0.13607085)
            if(Test_P!=9513)if(rOpen_WormsDown>=0 && TimeH<21.5 && Levl_High_H1s1N>=1.5 && Levl_Close_H1s1N>=0 && Levl_High_H1s1<6.5 && Levl_Down_DC>=-4.5 && Levl_Close_H1s1N<1.5) CalcBuy=0; //(0.2894212 0.4950100 0.2155689)
            if(Test_P!=3188)if(Levl_Close_H1< 0 && Levl_Up_DC>=0 && Levl_Down_DC>=-7.5 && TimeH< 21.5 && TimeH< 16.5 && Levl_Close_D1< 7.5 && rCalcLvlWorms_M15< 3.5 && Levl_Close_D1s1< 1.5 && Levl_High_W1< 2.5 && rLevl_Up_iD_RSI< 1.5) CalcBuy=0; //(0.54545455 0.21212121 0.24242424)

For the model for sale found more leaves, and the filters will be more.

Accordingly, it is not supposed to make any edits to the model as we go along.

 

This 84-sheet model

//Buy
if(Test_P!=1245)if(DonProc>=5.5 && TimeH< 10.5 && Levl_High_H4s1< 1.5) CalcBuy=CalcBuy+1; //(0.22513089 0.30366492 0.47120419)
if(Test_P!=2030)if(Povtor_Low_M1>=0 && TimeH>=10.5 && TimeH< 21.5 && BB_iD_Center_H1< 0 && Levl_Close_D1>=-2.5 && Levl_Support_W1s1< 4.5 && LastBarPeresekD_Down_M15< 4.5) CalcBuy=CalcBuy+1; //(0.09111617 0.51252847 0.39635535)
if(Test_P!=2537)if(Povtor_High_M1>=0 && rLevl_Down_iD_RSI< -6.5 && TimeH< 14.5) CalcBuy=CalcBuy+1; //(0.1990172 0.3832924 0.4176904)
if(Test_P!=3243)if(Levl_Close_H1>=0 && TimeH<10.5 && Levl_Support_W1<-3.5) CalcBuy=CalcBuy+1; //(0.1153846 0.1538462 0.7307692)
if(Test_P!=3314)if(Levl_Close_H1>=0 && TimeH< 10.5 && Levl_Low_W1s1N< 4.5 && Levl_Support_W1< -3.5) CalcBuy=CalcBuy+1; //(0.1153846 0.1538462 0.7307692)
if(Test_P!=3583)if(Povtor_Type_M1>=0 && TimeH< 10.5 && Levl_Close_W1< -3.5) CalcBuy=CalcBuy+1; //(0.11428571 0.20000000 0.68571429)
if(Test_P!=3857)if(Povtor_Type_M1>=0 && TimeH<10.5 && Levl_Support_W1<-3.5) CalcBuy=CalcBuy+1; //(0.07142857 0.17857143 0.75000000)
if(Test_P!=6546)if(Povtor_Type_H1< 0 && Levl_Close_H1s1N>=0 && Levl_Close_H1s1N< 2.5 && Levl_High_W1s1>=2.5 && DonProc_M15>=5.5) CalcBuy=CalcBuy+1; //(0.1228070 0.4210526 0.4561404)
if(Test_P!=6676)if(Povtor_Type_H1< 0 && Levl_Close_H1s1N>=0 && Levl_Close_MN1< 4.5 && TimeH< 21.5 && BB_iD_Center_H1< 0 && Povtor_Type_M15>=0 && Levl_Down_DC_M15>=-2.5) CalcBuy=CalcBuy+1; //(0.10619469 0.42477876 0.46902655)
if(Test_P!=8673)if(Levl_Close_H1s1< 0 && Levl_Close_H1s1N>=0 && Part_H4>=2.5 && TimeHG< 3 && Levl_first_W1s1>=0.5) CalcBuy=CalcBuy+1; //(0.11607143 0.40178571 0.48214286)
if(Test_P!=8840)if(TimeHG>=1.5 && RSI_Open_M1< 0.5 && BB_Peresek_Last_M1< 0.5 && RSI_Open_M1>=-0.5 && Levl_Support_W1s1>=-4.5 && Povtor_Low_H1>=0 && Levl_Support_H4>=0 && RegressorSpeed< 1.5) CalcBuy=CalcBuy+1; //(0.1606218 0.4145078 0.4248705)
if(Test_P!=10002)if(rOpen_WormsDown>=0 && BB_Peresek_Last_M1< 0.5 && rDeltaWorms< 2.5 && DonProcVisota< 4.5 && Part_D1< 3.5 && BB_iD_Center_H1< 0 && Levl_Close_H1s1N>=0) CalcBuy=CalcBuy+1; //(0.1890244 0.3963415 0.4146341)
if(Test_P!=10395)if(rOpen_WormsDown>=0 && Povtor_Type_M15>=0 && Levl_Low_H1< -4.5 && Levl_Close_H1s1N>=0) CalcBuy=CalcBuy+1; //(0.1990741 0.3888889 0.4120370)
if(Test_P!=14244)if(rPeresek_Up<0.5 && BB_Peresek_Last_M1<0.5 && Polozhenie_M1>=0 && Povtor_High_H1<-2.5) CalcBuy=CalcBuy+1; //(0.1948052 0.3506494 0.4545455)
if(Test_P!=14462)if(rPeresek_Up<0.5 && BB_Peresek_Last_M1<0.5 && Polozhenie_M1>=0 && DonProc_M15<9.5 && Levl_Support_H4s1<4.5 && Povtor_High_H1<-2.5) CalcBuy=CalcBuy+1; //(0.2112676 0.3239437 0.4647887)
if(Test_P!=17944)if(Levl_Low_H1s1N< -1.5 && Levl_Close_H4>=0 && Levl_Close_H1s1N>=0 && BB_iD_Center_H1< 0 && Part_H1< 2.5) CalcBuy=CalcBuy+1; //(0.1408451 0.3239437 0.5352113)
if(Test_P!=18382)if(Povtor_Low_M15< 3.5 && LowPerekH1s1_1< 0.5 && Polozhenie_M1>=0 && BB_iD_Down_M1>=-5.5 && DonProcVisota>=3.5 && Povtor_Low_M15< 1.5 && BB_iD_Down_M1>=-1.5) CalcBuy=CalcBuy+1; //(0.1659389 0.3842795 0.4497817)
if(Test_P!=19123)if(rPeresek_Down< 0.5 && Povtor_Low_M15< 3.5 && LowPerekH1s1_1< 0.5 && Polozhenie_M1>=0 && rCalcLvlWorms< 1.5 && DonProcVisota>=3.5 && rLevl_UpPeresek_iD_RSI< 1.5 && RegressorCalc_S1>=-1.5 && Levl_first_W1s1>=-0.5) CalcBuy=CalcBuy+1; //(0.1225490 0.4313725 0.4460784)
if(Test_P!=26038)if(Levl_Support_H1s1>=-3.5 && Part_H4< 2.5 && LowPerekH1s1_0>=0.5 && Part_H1>=1.5) CalcBuy=CalcBuy+1; //(0.1912568 0.4153005 0.3934426)

if(Test_P!=16772)if(BB_Peresek_Last_M1>=0.5 && Polozhenie_M1>=0 && Levl_High_H1>=1.5 && HighPerekH1s1_1<0.5 && Levl_High_H4<3.5) CalcBuy=0; //(0.1987013 0.4805195 0.3207792)
if(Test_P!=28430)if(Levl_High_H1s1>=4.5 && LastBarPeresekD_Down_M15>=1.5 && rDeltaWorms_M15>=1.5 && rLevl_Down_iD_RSI_H1< -3.5 && Levl_Close_D1s1N< 1.5 && Levl_Close_H4s1< 3.5) CalcBuy=0; //(0.2746269 0.5522388 0.1731343)
if(Test_P!=2124)if(Povtor_Low_M1<0 && Povtor_High_M1<1.5 && TimeH<21.5 && Levl_Down_DC>=-7.5 && TimeH<16.5 && Povtor_High_M15>=-2.5 && Levl_Close_D1s1<1.5) CalcBuy=0; //(0.30515298 0.55877617 0.13607085)
if(Test_P!=9513)if(rOpen_WormsDown>=0 && TimeH<21.5 && Levl_High_H1s1N>=1.5 && Levl_Close_H1s1N>=0 && Levl_High_H1s1<6.5 && Levl_Down_DC>=-4.5 && Levl_Close_H1s1N<1.5) CalcBuy=0; //(0.2894212 0.4950100 0.2155689)
if(Test_P!=3188)if(Levl_Close_H1< 0 && Levl_Up_DC>=0 && Levl_Down_DC>=-7.5 && TimeH< 21.5 && TimeH< 16.5 && Levl_Close_D1< 7.5 && rCalcLvlWorms_M15< 3.5 && Levl_Close_D1s1< 1.5 && Levl_High_W1< 2.5 && rLevl_Up_iD_RSI< 1.5) CalcBuy=0; //(0.54545455 0.21212121 0.24242424)

//Sell
if(Test_P!=3537)if(Povtor_Type_M1< 0 && Levl_Down_DC>=-7.5 && TimeH< 21.5 && TimeH>=16.5 && Levl_Support_H4>=-1.5 && rLevl_Up_iD_RSI_H1< 2.5) CalcSell=CalcSell+1; //(0.5000000 0.2105263 0.2894737)
if(Test_P!=3636)if(Povtor_Type_M1< 0 && Levl_Down_DC< -7.5 && Polozhenie_M1< 0 && rLevl_Up_iD_RSI>=7.5 && Levl_Close_D1s1>=-4.5 && Levl_Support_MN1s1< 1.5) CalcSell=CalcSell+1; //(0.58762887 0.23711340 0.17525773)
if(Test_P!=3764)if(Povtor_Type_M1< 0 && Levl_Down_DC< -7.5 && rLevl_DownPeresek_iD_RSI_M15< 4.5 && Levl_Close_H1s1N< -3.5 && Levl_Support_MN1s1< 1.5) CalcSell=CalcSell+1; //(0.56250000 0.24107143 0.19642857)
if(Test_P!=3789)if(Povtor_Type_M1< 0 && Levl_Down_DC< -7.5 && Levl_Close_H1s1N< -3.5 && rLevl_Up_iD_RSI>=7.5 && Levl_Low_W1>=-4.5 && Levl_Support_MN1s1< 1.5) CalcSell=CalcSell+1; //(0.61458333 0.22916667 0.15625000)
if(Test_P!=3842)if(Povtor_Type_M1<0 && Levl_Down_DC<-7.5 && Levl_Close_H1s1N<-3.5 && BB_iD_Center_M1>=-4.5 && Levl_Low_D1s1N>=-6.5) CalcSell=CalcSell+1; //(0.58333333 0.27777778 0.13888889)
if(Test_P!=4319)if(PolozhenieBB_M1< 2.5 && Levl_High_H1s1N>=-1.5 && TimeH< 21.5 && Levl_Low_H1>=-6.5 && TimeH>=16.5 && TimeH< 18.5) CalcSell=CalcSell+1; //(0.4501160 0.4153132 0.1345708)
if(Test_P!=5615)if(rOpen_WormsUp>=0 && TimeHG>=2.5 && Part_H4< 2.5 && Povtor_Low_M15< 2.5 && rPeresek_Up_M15< 0.5 && Levl_Low_W1s1N>=-4.5 && Levl_High_W1s1>=5.5) CalcSell=CalcSell+1; //(0.2483660 0.4640523 0.2875817)
if(Test_P!=5845)if(rOpen_WormsUp>=0 && TimeHG>=2.5 && Part_H4<2.5 && Povtor_Low_M15<2.5 && Levl_Close_H4s1<2.5 && Levl_High_W1s1>=5.5) CalcSell=CalcSell+1; //(0.2666667 0.4888889 0.2444444)
if(Test_P!=9221)if(rOpen_WormsDown< 0 && DonProcVisota< 5.5 && Levl_Close_H4s1< 2.5 && Levl_Support_D1>=-1.5 && Povtor_High_M15>=-1.5 && Levl_Close_D1s1>=0) CalcSell=CalcSell+1; //(0.3915858 0.3754045 0.2330097)
if(Test_P!=9470)if(rOpen_WormsDown< 0 && DonProcVisota< 5.5 && Levl_Close_H4s1< 2.5 && Levl_Support_D1>=-1.5 && Povtor_High_M15>=-1.5 && Povtor_Type_D1>=0) CalcSell=CalcSell+1; //(0.3922830 0.3762058 0.2315113)
if(Test_P!=9819)if(rOpen_WormsDown< 0 && DonProcVisota< 5.5 && Levl_Close_H4s1< 2.5 && Levl_Support_D1>=-1.5 && Povtor_High_M15>=-1.5 && Levl_Low_D1s1N>=-1.5 && Levl_High_H1s1N>=1.5) CalcSell=CalcSell+1; //(0.4451220 0.3292683 0.2256098)
if(Test_P!=10171)if(rOpen_WormsDown< 0 && LowPerekH1s1_1< 0.5 && Levl_Close_H1s1N>=-2.5 && Povtor_High_M15>=-1.5 && Povtor_High_H4>=-1.5 && BB_Peresek_Last_H1>=0) CalcSell=CalcSell+1; //(0.4147727 0.4090909 0.1761364)
if(Test_P!=10443)if(rOpen_WormsDown< 0 && LowPerekH1s1_1< 0.5 && Levl_Close_H1s1N>=-2.5 && Povtor_High_M15>=-1.5 && Povtor_High_H4>=-1.5 && Levl_Close_H4s1< 2.5 && Polozhenie_M15>=0) CalcSell=CalcSell+1; //(0.4357798 0.3761468 0.1880734)
if(Test_P!=12623)if(Levl_Down_DC>=-7.5 && BB_Peresek_Last_M1<0.5 && Polozhenie_M1<0 && Povtor_High_H1>=-3.5 && Levl_Low_W1s1>=-5.5 && DonProcVisota>=2.5 && Levl_Support_H4s1>=-4.5 && Levl_Low_H1s1>=-7.5 && Levl_High_H4s1N<-1.5) CalcSell=CalcSell+1; //(0.3606557 0.3333333 0.3060109)
if(Test_P!=13903)if(TimeH>=10.5 && Povtor_Type_M15< 0 && Levl_Low_H1s1N>=-1.5 && RegressorSpeed>=3.5 && Levl_Up_DC>=1.5 && Levl_first_W1>=0.5) CalcSell=CalcSell+1; //(0.4222222 0.3407407 0.2370370)
if(Test_P!=13989)if(TimeH>=10.5 && Povtor_Type_M15<0 && BB_iD_Center_M1<1.5 && Levl_Up_DC>=1.5 && Levl_High_H1<1.5 && Peresek_Total_M15<2.5) CalcSell=CalcSell+1; //(0.45806452 0.41290323 0.12903226)
if(Test_P!=14755)if(rPeresek_Up<0.5 && BB_Peresek_Last_M1>=0.5 && Part_H4<3.5 && Part_H1>=1.5 && Povtor_High_H4<0 && Levl_Low_H1s1<-2.5) CalcSell=CalcSell+1; //(0.3971119 0.4115523 0.1913357)
if(Test_P!=15074)if(BB_Peresek_Last_M1>=0.5 && Polozhenie_M1< 0 && Levl_Support_D1>=-1.5 && BB_iD_Center_M15>=-1.5 && Levl_Close_W1s1< 3.5 && Levl_Close_H4s1< 2.5 && BB_iD_Center_M15>=0 && Levl_Low_H1s1< -1.5) CalcSell=CalcSell+1; //(0.42038217 0.38853503 0.19108280)
if(Test_P!=15173)if(BB_Peresek_Last_M1>=0.5 && Polozhenie_M1< 0 && Levl_Close_H4s1< 2.5 && Levl_Low_D1s1N>=-4.5 && Povtor_High_H4>=-1.5 && Levl_Close_H1s1N< 0) CalcSell=CalcSell+1; //(0.48404255 0.35638298 0.15957447)
if(Test_P!=15320)if(BB_Peresek_Last_M1<0.5  &&  Polozhenie_M1<0  &&  rDeltaWorms<2.5  &&  DonProcVisota<5.5 && DonProcVisota>=2.5 && Levl_Low_H1s1>=-5.5 && Levl_Close_H1s1N>=-1.5 && Polozhenie_H4>=0) CalcSell=CalcSell+1; //(0.2913386 0.5393701 0.1692913)
if(Test_P!=15452)if(BB_Peresek_Last_M1>=0.5 && Polozhenie_M1< 0 && Povtor_Low_H4>=-1.5 && BB_iD_Center_M15< -1.5) CalcSell=CalcSell+1; //(0.4320988 0.3580247 0.2098765)
if(Test_P!=15662)if(BB_Peresek_Last_M1>=0.5 && Polozhenie_M1< 0 && Levl_Support_D1>=-1.5 && rDeltaWorms_H1>=3.5 && Part_D1>=2.5) CalcSell=CalcSell+1; //(0.4718615 0.3939394 0.1341991)
if(Test_P!=15676)if(BB_Peresek_Last_M1>=0.5 && Polozhenie_M1< 0 && Levl_Support_D1>=-1.5 && DonProc_M15< 4.5 && Part_D1>=2.5) CalcSell=CalcSell+1; //(0.4941176 0.3764706 0.1294118)
if(Test_P!=15712)if(BB_Peresek_Last_M1>=0.5 && Polozhenie_M1< 0 && Levl_Close_H4s1< 2.5 && Levl_Low_D1s1N>=-4.5 && Povtor_High_H4>=-1.5 && Levl_first_H4< -0.5) CalcSell=CalcSell+1; //(0.49285714 0.32142857 0.18571429)
if(Test_P!=15832)if(rPeresek_Down< 0.5 && BB_Peresek_Last_M1< 0.5 && Polozhenie_M1< 0 && rDeltaWorms< 2.5 && LastBarPeresekD_Down_M15>=1.5 && Levl_first_H1< -0.5 && Levl_Low_H1s1>=-5.5 && Levl_first_D1< -0.5) CalcSell=CalcSell+1; //(0.4337900 0.3561644 0.2100457)
if(Test_P!=15839)if(BB_Peresek_Last_M1< 0.5 && Levl_Close_H4< 0 && Levl_Low_H1s1>=-5.5 && Polozhenie_M1< 0 && rDeltaWorms< 2.5 && Levl_first_H1< -0.5 && Levl_Low_MN1>=-1.5 && Levl_Low_MN1s1N< 0) CalcSell=CalcSell+1; //(0.4708738 0.3203883 0.2087379)
if(Test_P!=16308)if(Levl_Support_H1s1>=-3.5 && Levl_Close_H1s1N< -2.5 && rDeltaWorms< 1.5 && Levl_Close_W1s1>=-1.5 && DonProc_M15< 4.5) CalcSell=CalcSell+1; //(0.4750000 0.3500000 0.1750000)
if(Test_P!=16908)if(BB_Peresek_Last_M1< 0.5 && Polozhenie_M1< 0 && rDeltaWorms< 2.5 && DonProcVisota< 5.5 && Levl_Low_W1s1>=-6.5 && DonProcVisota>=2.5 && Levl_Low_H1s1>=-5.5 && Levl_Close_H1s1N< -1.5 && Levl_Support_D1s1>=0) CalcSell=CalcSell+1; //(0.4800000 0.3666667 0.1533333)
if(Test_P!=16932)if(BB_Peresek_Last_M1< 0.5 && Polozhenie_M1< 0 && rDeltaWorms< 2.5 && DonProcVisota< 5.5 && Levl_High_W1s1N>=-2.5 && LastBarPeresekD_Down_M15>=1.5 && Levl_first_H1< -0.5 && Levl_Low_H1s1>=-5.5 && Levl_Low_MN1>=-1.5 && Levl_Low_MN1s1N< 0) CalcSell=CalcSell+1; //(0.4863014 0.3013699 0.2123288)
if(Test_P!=17143)if(BB_Peresek_Last_M1>=0.5 && Polozhenie_M1< 0 && Povtor_Low_H4>=-1.5 && rLevl_DownPeresek_iD_RSI>=-1.5 && Levl_Low_H1s1< -1.5 && Levl_first_H1< 0.5) CalcSell=CalcSell+1; //(0.4797297 0.3648649 0.1554054)
if(Test_P!=17417)if(DonProcVisota< 7.5 && Levl_Low_H1s1>=-5.5 && Levl_Close_H1s1N>=-2.5 && Povtor_High_H1< 0 && Polozhenie_M1< 0 && rDeltaWorms< 2.5 && Levl_first_H1< -0.5 && Peresek_Total_H1>=2.5 && Levl_Close_MN1>=0) CalcSell=CalcSell+1; //(0.4156627 0.3614458 0.2228916)
if(Test_P!=17806)if(BB_Peresek_Last_M1< 0.5 && rDeltaWorms< 2.5 && DonProcVisota< 5.5 && Levl_Low_W1s1>=-4.5 && Levl_first_H1< -0.5 && Levl_Low_H1s1>=-5.5 && Levl_Low_MN1>=-1.5 && rCalcLvlWorms_H1>=0.5 && Levl_Close_D1s1>=0) CalcSell=CalcSell+1; //(0.3802817 0.3732394 0.2464789)
if(Test_P!=17983)if(BB_Peresek_Last_M1< 0.5 && Polozhenie_M1< 0 && rDeltaWorms< 2.5 && DonProcVisota< 5.5 && DonProcVisota>=2.5 && Levl_Low_H1s1>=-5.5 && Levl_Close_H1s1N< -1.5 && Levl_Support_D1s1>=0) CalcSell=CalcSell+1; //(0.4484848 0.3757576 0.1757576)
if(Test_P!=18270)if(rPeresek_Down< 0.5 && Povtor_Low_M15< 3.5 && LowPerekH1s1_1< 0.5 && Polozhenie_M1< 0 && BB_PeresekN_Total_M1>=1.5 && Levl_first_H1< -0.5 && BB_iD_Up_M1< 3.5 && Povtor_Type_D1>=0) CalcSell=CalcSell+1; //(0.4232365 0.3443983 0.2323651)
if(Test_P!=18416)if(rPeresek_Down<0.5 && Povtor_Low_M15<3.5 && BB_iD_Center_M1<1.5 && Polozhenie_M1<0 && BB_PeresekN_Total_M1>=1.5 && Levl_first_H1<-0.5 && Levl_Low_H1s1>=-5.5 && Levl_Close_W1>=0) CalcSell=CalcSell+1; //(0.3723404 0.4716312 0.1560284)
if(Test_P!=18453)if(rPeresek_Down<0.5 && Povtor_Low_M15<3.5 && LowPerekH1s1_1<0.5 && Polozhenie_M1<0 && BB_PeresekN_Total_M1>=1.5 && Levl_first_H1<-0.5 && BB_iD_Up_M1<4.5 && Levl_Close_W1>=0) CalcSell=CalcSell+1; //(0.3802281 0.4828897 0.1368821)
if(Test_P!=18550)if(rPeresek_Down< 0.5 && Povtor_Low_M15< 3.5 && LowPerekH1s1_1< 0.5 && Polozhenie_M1< 0 && DonProcVisota>=2.5 && LastBarPeresekD_Down_M15>=1.5 && rLevl_Up_iD_RSI_H1< 6.5 && BB_iD_Up_M1< 3.5 && Levl_Close_D1s1N>=1.5) CalcSell=CalcSell+1; //(0.3371429 0.4285714 0.2342857)
if(Test_P!=18568)if(rPeresek_Down<0.5 && Povtor_Low_M15<3.5 && Polozhenie_M1<0 && BB_PeresekN_Total_M1>=1.5 && Levl_Low_H1s1>=-5.5 && Levl_first_H1<-0.5 && Levl_Close_W1>=0) CalcSell=CalcSell+1; //(0.3724138 0.4689655 0.1586207)
if(Test_P!=18900)if(rPeresek_Down< 0.5 && Povtor_Low_M15< 3.5 && LowPerekH1s1_1< 0.5 && Polozhenie_M1< 0 && BB_PeresekN_Total_M1>=1.5 && Levl_first_H1< -0.5 && Levl_Close_W1>=0 && Levl_Close_H4s1< 1.5 && Povtor_High_D1< 1.5) CalcSell=CalcSell+1; //(0.40458015 0.35114504 0.24427481)
if(Test_P!=18962)if(rPeresek_Down< 0.5 && Povtor_Low_M15< 3.5 && LowPerekH1s1_1< 0.5 && Polozhenie_M1< 0 && BB_PeresekN_Total_M1>=1.5 && Levl_first_H1< -0.5 && Levl_Close_W1>=0 && Levl_Low_MN1>=-1.5 && Levl_Support_MN1s1< 0) CalcSell=CalcSell+1; //(0.51764706 0.35294118 0.12941176)
if(Test_P!=19785)if(Levl_Low_H1s1N<-1.5 && Levl_Close_H1s1N<0 && Levl_Low_H1s1>=-5.5 && Levl_Close_H1s1N<-2.5 && Levl_Close_W1s1>=-2.5 && rLevl_Down_iD_RSI_H1<-2.5 && Levl_Support_MN1s1<1.5 && Levl_Low_MN1s1>=-1.5)CalcSell=CalcSell+1; //(0.70588235 0.17647059 0.11764706)
if(Test_P!=20268)if(Levl_Low_H1s1N< -1.5 && Levl_Close_H1s1N< 0 && Levl_Low_H1s1>=-5.5 && Levl_Close_H1s1N< -2.5 && Levl_Low_W1s1N>=-5.5 && Levl_Support_MN1s1< 1.5 && Povtor_Low_H1>=0)CalcSell=CalcSell+1; //(0.5380435 0.2934783 0.1684783)
if(Test_P!=22975)if(Levl_Low_H1s1>=-5.5 && Levl_Close_H1s1N>=-2.5 && LowPerekH1s1_0< 0.5 && Povtor_High_H1< 0 && Polozhenie_M1< 0 && BB_iD_Up_M1< 3.5 && BB_PeresekN_Total_M1>=1.5 && Levl_first_MN1>=-0.5 && Levl_High_D1s1N>=5.5) CalcSell=CalcSell+1; //(0.4557823 0.3605442 0.1836735)
if(Test_P!=23782)if(Levl_Close_H4< 0 && Levl_Low_H1s1>=-5.5 && Levl_Close_H1s1N>=-3.5 && Levl_Close_H1s1N< 0 && BB_iD_Up_M1< 3.5 && BB_PeresekN_Total_M1>=1.5 && Levl_Close_H4s1N< 1.5 && Levl_Close_D1s1>=-1.5 && Levl_High_MN1s1N>=2.5) CalcSell=CalcSell+1; //(0.4745763 0.3446328 0.1807910)
if(Test_P!=24450)if(Part_H4< 2.5 && rDeltaWorms< 2.5 && Polozhenie_M1< 0 && Levl_Low_H1s1>=-5.5 && Levl_Close_H1s1N>=-2.5 && LastBarPeresekD_Down_M15>=1.5 && Povtor_Type_D1>=0 && Levl_Low_H1s1< -1.5 && Levl_first_D1< -0.5) CalcSell=CalcSell+1; //(0.4883721 0.3178295 0.1937984)
if(Test_P!=26817)if(Levl_first_H1s1>=-0.5 && Levl_Close_H1s1N< 0 && Part_D1< 3.5 && rDeltaWorms< 1.5 && Levl_Low_W1s1N>=-4.5) CalcSell=CalcSell+1; //(0.4424779 0.3864307 0.1710914)
if(Test_P!=28896)if(BB_iD_Down_H1< -2.5 && HighPerekH1s1_1< 0.5 && BB_iD_Up_M1< 5.5 && Polozhenie_M1< 0 && BB_PeresekN_Total_M1>=1.5 && Levl_first_H1< -0.5 && Levl_Low_D1s1N>=-4.5 && Levl_Close_W1s1N>=0) CalcSell=CalcSell+1; //(0.4592275 0.3390558 0.2017167)
if(Test_P!=28997)if(Povtor_High_M15< 2.5 && Polozhenie_M1< 0 && BB_PeresekN_Total_M1>=1.5 && BB_iD_Up_M1< 5.5 && Levl_first_H1< -0.5 && Levl_Up_DC>=1.5 && Povtor_High_D1>=-3.5 && BB_iD_Center_H1>=-1.5 && Levl_Low_H4< -2.5 && Levl_Up_DC>=2.5) CalcSell=CalcSell+1; //(0.47500000 0.31250000 0.21250000)

if(Test_P!=22765)if(Levl_Low_H1s1>=-5.5 && Levl_Close_H1s1N>=-2.5 && LowPerekH1s1_0<0.5 && Povtor_High_H1>=0 && Levl_High_H1>=2.5 && HighPerekH1s1_1<0.5 && Levl_High_W1>=2.5) CalcSell=0; //(0.2201258 0.4968553 0.2830189)
if(Test_P!=27506)if(BB_iD_Down_M1<-5.5 && rLevl_DownPeresek_iD_RSI<-0.5 && rLevl_Up_iD_RSI_M15>=6.5) CalcSell=0; //(0.2514793 0.4940828 0.2544379)
if(Test_P!=22645)if(Levl_Close_H4>=0 && Levl_High_H4<2.5 && Part_H4<2.5 && Levl_High_H4s1N>=-5.5 && Povtor_Type_D1>=-2.5 && Part_H1>=2.5) CalcSell=0; //(0.1513859 0.5181237 0.3304904)
if(Test_P!=6342)if(rOpen_WormsUp>=0 && TimeHG>=2.5 && Part_H4>=2.5 && Levl_Low_H4s1N>=-6.5 && Levl_Low_H4s1N>=0) CalcSell=0; //(0.17410714 0.64285714 0.18303571)
if(Test_P!=15115)if(BB_Peresek_Last_M1<0.5 && Polozhenie_M1<0 && rDeltaWorms<2.5 && DonProcVisota<5.5 && Levl_Low_W1s1>=-6.5 && DonProcVisota>=2.5 && BB_iD_Down_H1<-2.5 && Levl_Low_H4<-2.5) CalcSell=0; //(0.2113821 0.4444444 0.3441734)
if(Test_P!=6613)if(Povtor_Type_H1>=0 && TimeH>=10.5 && Levl_Close_H1s1N< 0 && Levl_Up_DC>=1.5 && Levl_first_H1>=0.5) CalcSell=0; //(0.3216080 0.5276382 0.1507538)
if(Test_P!=17112)if(BB_Peresek_Last_M1>=0.5 && Polozhenie_M1< 0 && Levl_Support_D1>=-1.5 && BB_iD_Down_M15>=-5.5 && Levl_first_H1< -0.5 && Levl_Low_H1s1>=-1.5) CalcSell=0; //(0.3055556 0.5277778 0.1666667)
if(Test_P!=6523)if(rLevl_Up_iD_RSI>=5.5 && Levl_Down_DC>=-7.5 && Levl_Close_H1s1<-2.5) CalcSell=0; //(0.2307692 0.5128205 0.2564103)
if(Test_P!=19466)if(Levl_Low_H1s1N>=-1.5 && Levl_Up_DC>=1.5 && Levl_Close_H1s1N>=0 && Levl_Low_H1s1N>=0 && BB_iD_Down_H1>=-2.5)CalcSell=0; //(0.2408759 0.5669100 0.1922141)
if(Test_P!=20663)if(Povtor_Low_M15< 3.5 && LowPerekH1s1_1< 0.5 && Polozhenie_M1>=0 && Levl_High_H1>=1.5 && rCalcLvlWorms< 2.5 && DonProcVisota>=3.5 && Levl_Support_H1s1< 1.5 && Levl_Up_DC< 6.5 && Povtor_Low_D1>=-1.5 && Levl_Support_D1>=0) CalcSell=0; //(0.1601562 0.4960938 0.3437500)
if(Test_P!=23266)if(Levl_Low_H1s1>=-5.5 && Levl_Close_H1s1N>=-2.5 && LowPerekH1s1_0<0.5 && Povtor_High_H1>=0 && Levl_High_H1>=2.5 && Part_H1>=2.5 && Levl_Support_D1s1<1.5 && Levl_High_MN1s1N>=-2.5 && rLevl_Down_iD_RSI_M15<-6.5) CalcSell=0; //(0.17368421 0.65263158 0.17368421)
if(Test_P!=1876)if(Povtor_Low_M1>=0 && TimeHG>=1.5 && BB_iD_Center_H1>=0) CalcSell=0; //(0.15019763 0.55844156 0.29136081)
 

has the following result


It turns out that 84 sheets are used for 4843 completed deals, i.e. 4843/84=58 entrances on the average describe one sheet, including filters, if we assume that their areas do not touch each other, but it is not so. If we take only buying and without filters, 1952/19=103 entries per rule (sheet), which is not so little. It would be OK, but it's a little sharpened coefficient. You can sacrifice the overall financial result and significantly improve other indicators, such as profitability or percentage of profitable trades, by adding a couple more filters. And yes, the maximum continuous profit of 21k is clearly an anomaly - 2014, when the ruble was falling fast.

 

Nice fit, but not perfect.

It doesn't require so many features)

i assume these are the minutes in mt4 with a 56% history ca-ve? then you can throw them away at all
 
Maxim Dmitrievsky:

Nice fit, but not perfect.

It doesn't require that many features)

i assume these are the minutes in mt4 with the history ca-ve of 56%?

I would look at your version with so many leaves. This is MT5, the minutes, but if tested on real ticks and taking into account the commission minus 3 points per transaction and no more than that; the reality will give us two more points for slippage and the total -5 points, i.e. minus 20 000 may be easily removed.

 
Aleksey Vyazmikin:

I would look at your variant with so many leaves. If we test on real ticks and take into account the commission, then minus 3 points per transaction and no more than that, and the reality will give us two more points for slippage and total -5 points, i.e. minus 20 k on the result can be easily removed.

I mean, it's common here to show the test and the oos, separate them with dashes, everything else is irrelevant until the first one is done.

I don't know why i'm trying to get the information so i don't have to explain why i'm using splits - who needs them but you?

i.e. the signal is checked, i.e. it's not even decent to show it on artificial ticks

 
Maxim Dmitrievsky:

I mean that here it is customary to show the test and oos, separate them with dashes, all the rest does not matter until the first one is done

I don't want to go into details, what for are these tidbits with splits, who needs them but you?

I'll repeat, if the bot is running on every tick, i.e. the signal is checked, it's not even decent to show it on artificial ticks

Obviously I proposed a different concept of creating a model, perhaps something similar is used in catbust, when on a trained sample the search for rules and on a test sample the validation of those rules, so I had training on a part of the sample, then checking the obtained rules (leaves) on all the available history and the same selection, but in fact it is more efficient in terms of the number of leaves in the model. Yes, there is no test on a completely independent (not involved in creating leaves(training) and model selection ) sample. The main idea is that the fewer leaves are used to make decisions in the model, the more stable the model will be if the number of events described is large enough.

The trading system is based on bar opening, therefore ticks do not play such an important role here.

I remembered that I have only October 2018 in my file. Now I will test it on November and December - it will be an independent sample.

 
Aleksey Vyazmikin:

How do you stick it? Then you need to make some kind of bridge between python or R - for me it is a dark forest.

Does this problem seem to be solvedhere ?