Machine learning script - no trades in Trade mode

Posted By: Fiber

Machine learning script - no trades in Trade mode - 12/22/16 12:13

Machine learning test script in Train and Test mode generates about 50 trades per day. When I run this script in Trade mode on FXCM demo account - 0 trades for 3 days (12/19-12/21). After I downloaded historical data for these 3 days (12/19-12/21) and run Test (without Training) I got 78 trades for these three days.
Another experiment I did, while in Trade mode, manually edited rules file .c and replaced code with my rules: enter Long if close(1) lower then close(0) and opposite for Short trade
Code:
int eqF(float);
double eq0(float);
double belowF(double,double);

int EURUSD_L(float* sig)
{
  if(sig[5]<sig[11])
  return 99;
}
int EURUSD_S(float* sig)
{
  if(sig[5]>sig[11])
  return 99;
}


On the next bar after Zorro uploaded new rules it started opening trades in Trade mode.

Why script do not trade on learned rules, any ideas?

Code:
// Machine Learning Test
function run()
{
  StartDate = 20161201;
  BarPeriod = 5;
  LookBack = 3;
  NumWFOCycles = 5;
  set(RULES+TESTNOW);
  Hedge = 2;
  LifeTime = 1;
 
  if(adviseLong(PATTERN+2,0,
   priceHigh(2),priceLow(2),priceClose(2),
   priceHigh(1),priceLow(1),priceClose(1),
   priceHigh(1),priceLow(1),priceClose(1),
   priceHigh(0),priceLow(0),priceClose(0)) > 0)
   enterLong(1);
  if(adviseShort() > 0)
   enterShort(1);
}

Posted By: gtell

Re: Machine learning script - no trades in Trade mode - 12/23/16 09:42

Hi Fiber, as JCL already wrote me, you can't use prices as signals.
Please have a look to the following thread:

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Main=55561&Number=462142#Post462142
Posted By: Finstratech

Re: Machine learning script - no trades in Trade mode - 12/23/16 19:54

It won't take any trades because you have LifeTime=1. That essentially means life time 0 from my experience.

Try life time 2 and higher.
Posted By: gtell

Re: Machine learning script - no trades in Trade mode - 01/07/17 19:09

Sorry, the thread I mentioned was for NEURAL prediction.
© 2024 lite-C Forums