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

 
Maxim Dmitrievsky:

the task is to achieve that the two pieces were indistinguishable (the same errors, etc.), in this context, the definition of what wiggles at all loses all meaning

Actually, maybe you're right, real experience can only provide an objective answer in our trade)

 
FxTrader562:

It is showing some error: "Event handing function not found"

no errors

 
FxTrader562:

yes

 
FxTrader562:

Actually, it would be really great if you could do some changes here...

which changes

 
FxTrader562:

Actually, it would be great if you could change here:

I tried this ... but I didn't know if I did something wrong:

Please see the code and suggest if we can do something similar to improve the pip expectancy per trade

Better if you change here

//+------------------------------------------------------------------+
//|Get trade signal                                                  |
//+------------------------------------------------------------------+
double CRLAgent::getTradeSignal(double &featuresValues[])
  {
   if(!random_policy) {
      double kerfeatures[];
      ArrayResize(kerfeatures,ArrayRange(bestFeatures,0));
      ArrayInitialize(kerfeatures,0);
      
      for(int i=0;i<ArraySize(kerfeatures);i++) {
         kerfeatures[i] = featuresValues[0]/featuresValues[(int)bestFeatures[i][1]];
        }
            
      CLogit::MNLProcess(Lmodel,kerfeatures,Lout);
      return Lout[1];
     }
   else if(rand()/32767.0<0.5) return 0; else return 1;
  }

if(fast MA> slow MA)if(rand()/32767.0<0.8) return 0; else return 1;

if(fast MA< slow MA)if(rand()/32767.0<0.8) return 1; else return 0;

or something like this, any indicator as filter

 
Maxim Dmitrievsky:

Better if you change here

if (fast MA > slow MA) if ( rand () / 32767.0 < 0.8 ) return 0 ; else return 1 ;

if (fast MA < slow MA) if ( r and() / 32767.0 < 0.8 ) return 1 ;else return 0 ;

or something like this, any indicator as filter

Well, I tried to change here...but messing up anything with "Signals" messes up the whole results...

 
FxTrader562:

Indicator I didn't try yet ...

but I tried " if ( rand () / 32767.0 < 0.8 )"...t hen, it showed random behavior, because we need to change here also:

if you filter this with MA, it means he will sample buy or sell signals with 0.8 probability when up or down trend, so trades will be much longer, dont need to change signals filter

I will think how to improve reward func. Tomorrow )
 
Maxim Dmitrievsky:

Better if you change here

if(fast MA> slow MA)if(rand()/32767.0<0.8) return 0; else return 1;

if(fast MA< slow MA)if(rand()/32767.0<0.8) return 1; else return 0;

or something like this, any indicator as filter

we seem to do similar things (or come to similar conclusions)

Something like "if deterministic algorithms lose when there is a lack of information (in the improving market), then we may let probabilities do the work" :-)

 
Maxim Kuznetsov:

we seem to do similar things (or come to similar conclusions)

Approximately "if deterministic algorithms lose when there is a lack of information (in the improving market), then we can let probabilities do the work" :-)

this is a little different (preparation of marked data for NS training), but it seems so

the question is how to best markup the data in a pseudo-random way

 
FxTrader562:

Ok, let's see...))

Actually, I am getting pretty impressive results in back-testing so far:))

But the main problem with forward testing:((((

maybe it will never work fine :)

Reason: