Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, aliswee), 835 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
PRELOAD flag #475249
11/29/18 12:47
11/29/18 12:47
Joined: Nov 2018
Posts: 4
S
schcsaba Offline OP
Guest
schcsaba  Offline OP
Guest
S

Joined: Nov 2018
Posts: 4
It seems to me that the PRELOAD flag is only effective in live trading and not in training. Is this true?
Thank you for your answer.

Re: PRELOAD flag [Re: schcsaba] #475252
11/29/18 13:45
11/29/18 13:45
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
From the manual:
Quote:
PRELOAD
Use Zorro's historical price data, rather than loading price data from the broker's price server or from external data sources. For filling the LookBack period at [Trade] start, the data span between the end of the history and the current time is loaded from the broker or data source. This flag is useful for reducing the trading start time of a system, for overcoming history limitations of broker servers, or for extremely long lookback periods. Recent price history files from the current and the last year must be available; use the Download script for getting the most recent data. Setting this flag also suppresses the warning message in [Test] mode when the lookback period is too long for a normal trading session.

https://zorro-project.com/manual/en/mode.htm

Re: PRELOAD flag [Re: AndrewAMD] #475273
11/29/18 19:30
11/29/18 19:30
Joined: Nov 2018
Posts: 4
S
schcsaba Offline OP
Guest
schcsaba  Offline OP
Guest
S

Joined: Nov 2018
Posts: 4
Thank you for your answer. Yes, I have read this in the manual but based on it I was not completely sure if the flag works in Train mode or not. It doesn't tell anything about training, so I guess it means that it doesn't work in training. However it would be useful if it worked. Thanks again. Csaba

Re: PRELOAD flag [Re: schcsaba] #475274
11/29/18 19:34
11/29/18 19:34
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
What exactly are you hoping would happen in [Train] mode?

[Train] and [Test] already use existing historical data in your History folder and don't even touch your broker plugin.

Re: PRELOAD flag [Re: AndrewAMD] #475280
11/29/18 20:23
11/29/18 20:23
Joined: Nov 2018
Posts: 4
S
schcsaba Offline OP
Guest
schcsaba  Offline OP
Guest
S

Joined: Nov 2018
Posts: 4
I have downloaded historical data with the Download script through the Metatrader bridge. In the History folder I have a full M1 .t6 file for 2018, but for 2017 I have data only from 11.28 to 12.31. I have no data from the previous years (2013-2016), but the Download script still created 10KB files for those years. However when I run the script below (modified from https://www.financial-hacker.com/binary-options-scam-or-opportunity/), I get "not enough bars" error. I am very new to Zorro, therefore it is quite possible that there are errors in the code.

Code:
var objective()
{
	return ((var)(NumWinLong+NumWinShort))/(NumLossLong+NumLossShort);
}

function run()
{
	BarPeriod = 5;
	LookBack = 100;
	NumWFOCycles = 20;
	NumCores = -1;
	
	set(BINARY);
	WinPayout = 94.2;
	LossPayout = 0;

	set(PARAMETERS);
	int TimePeriod = optimize(20,10,100);
	var m = optimize(0.01, 0.001, 0.05);
	var Threshold = m*(HH(TimePeriod)-LL(TimePeriod));

	if(NumOpenLong+NumOpenShort == 0) 
	{
		LifeTime = 1;
		if(HH(TimePeriod) - priceClose() < Threshold)
		{
			enterShort();
		}
		else if(priceClose() - LL(TimePeriod) < Threshold)
		{
			enterLong();
		}
	}
}


Re: PRELOAD flag [Re: schcsaba] #475284
11/30/18 03:39
11/30/18 03:39
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
Two things:

* You have limited historical data, courtesy of MT4/5, so it's probably smart to set StartDate and EndDate.
* Also consider sourcing historical data from other sources if Metatrader's supply is insufficient. For example, FXCM and Oanda give you free data via their demo accounts. Also, check the downloads page to see if it has the data you need.

Re: PRELOAD flag [Re: AndrewAMD] #475285
11/30/18 07:58
11/30/18 07:58
Joined: Nov 2018
Posts: 4
S
schcsaba Offline OP
Guest
schcsaba  Offline OP
Guest
S

Joined: Nov 2018
Posts: 4
I have set StartDate and EndDate and now it works. Thank you very much!


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1