|
2 registered members (Quad, aliswee),
835
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: PRELOAD flag
[Re: schcsaba]
#475252
11/29/18 13:45
11/29/18 13:45
|
Joined: Feb 2017
Posts: 1,718 Chicago
AndrewAMD
Serious User
|
Serious User
Joined: Feb 2017
Posts: 1,718
Chicago
|
From the manual: 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]
#475280
11/29/18 20:23
11/29/18 20:23
|
Joined: Nov 2018
Posts: 4
schcsaba
OP
Guest
|
OP
Guest
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.
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();
}
}
}
|
|
|
|
|
|