Hi everyone,
The problem is that when I try use the .t1 data in my strategy, I get Error 047: USD/JPY no valid ticks
Every time I ran it with a date range of ~2 months it always says there is 'insufficient history(2 ticks, 300 LookBack)'.
But when I run it with anything more than that I get the insuffiecient memory error (061)
Error 060: Can't allocate 134848350 USD/JPY ticks
I also think these many ticks occur in about a year not a few months.
However it works fine when running with the EUR/USD.t1 data given by zorro. I can't figure out why it doesnt work with the converted data.
This is the beginning of my run() function:
StartDate = 20170301;
EndDate = 20170515;
LookBack = 300;
Spread = 0.5*PIP;
Slippage = 0;
set(LOGFILE, PLOTNOW);
set(PARAMETERS);
set(TICKS);
History = "*.t1";
asset("USD/JPY");
NumWFOCycles = 10;
NumCores = -2;
vars prices = series(priceC());
//FILTERS
vars RawPD = series(PD(28));
//Normalise PD
int NPDNUMBER = 50;
vars NPD = series(FisherN(RawPD, 50));
//Define max loss
var StopAspect = (6*PIP);
// Only trade if ATR is above certain amount;
var LossMinimiser = (5.1*PIP);
int PeriodATR = 5;
//var LossMinimiser = (optimize(5.1, 2, 6, 0.1)*PIP);
//int PeriodATR = optimize(5, 3, 20, 1);
I downloaded USD/JPY tick data from dukascopy, set it to the right timezone and then converted it to '.t1' from CSV using the following code in lite-c:
string InName = "USDJPY.csv";
string OutName = "USDJPY_%i.t1";
string Format = "+u30%Y.%m.%d %H:%M:%S.000,f,f,f";
void main()
{
int Year;
for(Year = 2018; Year <= 2024; Year++) {
dataNew(1,0,0); // Reset the dataset for each year
// Parsing with a year-specific filter
int Records = dataParse(1, Format, InName, strf("\n%i",Year));
printf("\n%i - %d rows read", Year, Records);
if(Records) {
dataSave(1, strf(OutName, Year)); // Save for each year
}
}
}
It is what is already given in zorro strategy folder. The downloaded files for each year are large as expected with the size of each file varying from about 200-800 MB.
The data is in the right folder with the .t6 data as well, and the names of the data are correct.
Any help is appreciated. Thank You.