First steps in AI

Posted By: MatPed

First steps in AI - 06/30/18 10:00

I am moving my first steps in the AI world.
Training to optimize the limit a vary basic addition to workshop 7. I get exactly the same value for any Limit. It seems that AdviseLong find exactly the same patterns that generate the same trades independently by that value.

What am I missing?

Ciao
Code:
function run()
{
	BarPeriod = 60; // 1-hour bars
	NumCores = -2;
	set(RULES+ALLCYCLES+PARAMETERS);
	NumYears = 10;
	NumWFOCycles = 10;
//	NumSampleCycles = 4;
	MaxLong = MaxShort = 1; // only 1 open trade

	if(Train) {
		Hedge = 2;	  // allow simultaneous long + short trades 
		Detrend = TRADES; // detrend on trade level
	} else {
		Hedge = 1;	// long trade closes short and vice versa
		Detrend = 0;	
	}
	var Limit = optimize (40., 20., 80.);
	ExitTime = 4;
	
	if(between(lhour(CET),9,13))  // European business hours
	{
		if(adviseLong(PATTERN+FAST+2,0, // train patterns with trade results
		priceHigh(2),priceLow(2),priceClose(2),
		priceHigh(1),priceLow(1),priceClose(1),
		priceHigh(1),priceLow(1),priceClose(1),
		priceHigh(0),priceLow(0),priceClose(0)) > Limit)
			enterLong();	

    if(adviseShort() > Limit)
      enterShort();
  }
}

Posted By: Dalla

Re: First steps in AI - 07/01/18 15:03

Check this page in the manual:
http://zorro-project.com/manual/en/training.htm

and read specifically the section "Combining rules and parameters"
Posted By: MatPed

Re: First steps in AI - 07/08/18 16:26

Thank You. I missed your hint. I totally missed that section! I owe you a drink!
© 2024 lite-C Forums