Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Akow), 1,403 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
60 ema trading #409738
10/21/12 19:50
10/21/12 19:50
Joined: Oct 2012
Posts: 75
H
hughbriss Offline OP
Junior Member
hughbriss  Offline OP
Junior Member
H

Joined: Oct 2012
Posts: 75
This is possibly the best one yet...

Code:
function run() 
{   
   set(PARAMETERS);
  	BarPeriod = 1440;
  	LookBack = 99;
  	
  	while(asset(loop("EUR/USD","AUD/USD","USD/CHF","GBP/USD")))
  	{
  	Stop = optimize(2,0.5,4,0.5,0)*ATR(20);
	Profit = optimize(6,1,10,0.5,0)*ATR(20);
	
	var *ClosePrice = series(priceClose());
	var *EMA60 = series(EMA(ClosePrice,60));
		
	if(ClosePrice[0] > EMA60[0])
	  enterLong();
	if(ClosePrice[0] < EMA60[0])
	  enterShort();
   }    
}


Re: 60 ema trading [Re: hughbriss] #409757
10/22/12 07:17
10/22/12 07:17
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Make it a habit to always test out of sample, the fastest way is horizontal splitting. In sample tests give too optimistic results, even when you only manually optimized the parameters.

For checking the consistency you can test and train also with different split combinations, f.i. SKIP1 for training and SKIP2+SKIP3 for testing.


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1