Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
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
0 registered members (), 1,429 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Results with and without optimize function #439426
04/02/14 17:38
04/02/14 17:38
Joined: Aug 2013
Posts: 8
California
R
ron17 Offline OP
Newbie
ron17  Offline OP
Newbie
R

Joined: Aug 2013
Posts: 8
California
Following is the code I am using.
-------------------
function run()
{
set(PARAMETERS);
StartDate = 20080101;
EndDate = 20131231;
//BarPeriod = optimize(15,5,20,1); //after optimize, value for BarPeriod is 18
//Test shows annual loss of -219p
BarPeriod = 18; //Test without any optimization, test shows +257p
LookBack = 100*5;

vars Price = series(price());
vars Trend = series(LowPass(Price,1000));

if(valley(Trend))
enterLong();
else if(peak(Trend))
enterShort();
}
-------------------

Following are steps for testing it
1) Executed the script in Train mode and found the value for BarPeriod is 18 stored in abc_EURUSD.par file
2) Ran Test, results showed annual loss of -219p
3) Commented the line to optimize BarPeriod, and hard-coded BarPeriod = 18, and saved the file
4) Removed abc_EURUSD.par from Data directory
5) Ran Test, results showed annual profit of +257p

I am confused why the results are different when I used the value provided by optimize function. Any thoughts ?.

Re: Results with and without optimize function [Re: ron17] #439459
04/03/14 08:41
04/03/14 08:41
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Your -219p loss was with a bar period of 15, not 18.

Parameters such as Barperiod, which are already needed for price loading at script start, must be optimized in a special way, if at all. Look here (under "Remarks"): http://manual.zorro-trader.com/optimize.htm

Re: Results with and without optimize function [Re: jcl] #439504
04/04/14 03:19
04/04/14 03:19
Joined: Aug 2013
Posts: 8
California
R
ron17 Offline OP
Newbie
ron17  Offline OP
Newbie
R

Joined: Aug 2013
Posts: 8
California
Thanks JCL. Yes indeed the manual has details for BarPeriod. Lot more to learn and try. Appreciate your help.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1