Script Test gives error 055 - No History

Posted By: Cobus

Script Test gives error 055 - No History - 03/31/20 11:25

Hi all,

I'm trying to run a very simple script but Zorro can't find the history data. I've spcecified 'EUR/USD" and a StartDate and EndDate but still nothing.
It says it's looking for 2020 data?

Any help please?
Posted By: AndrewAMD

Re: Script Test gives error 055 - No History - 03/31/20 13:12

Well, do you have historical data? What is the date range of the historical data you have, and what did you set for StartDate and EndDate?
Posted By: Cobus

Re: Script Test gives error 055 - No History - 03/31/20 15:51

Thank you for the reply AndrewAMD. I only have the data that came with the installation.
I have now downloaded the 1GB data file with the 28 forex pairs from 2010 onwards.

If I don't specify a start and date, only the asset, I see the output says "2010-2015"... where does that come from? The .t6 files run from 2005 to 2019.
Posted By: AndrewAMD

Re: Script Test gives error 055 - No History - 03/31/20 16:19

Please post your script.
Posted By: Cobus

Re: Script Test gives error 055 - No History - 04/02/20 11:45

Code
function run()
{
  asset("EUR/USD");
  BarPeriod=60;
  var* Price = series(price()); //not sure if I need this here
  StartDate=2010;
  EndDate=2020;
  vars dim=series(MinusDI(8));
  vars dip=series(PlusDI(8));
  if (crossOver(dip,dim)) enterLong();
  if (crossOver(dim,dip)) enterShort();
}
Posted By: AndrewAMD

Re: Script Test gives error 055 - No History - 04/02/20 11:52

If you know your data ends at 2019, why are you backtesting up to 2020?
Posted By: Cobus

Re: Script Test gives error 055 - No History - 04/02/20 11:57

The data pack I downloaded from Zorro has data to 2020 so I changed to that.
I attached the Zorro output. It doesn't give me that particular error but the date is still wrong and I don't have any trade result.

Attached picture Annotation 2020-04-02 135212.png
Posted By: jcl

Re: Script Test gives error 055 - No History - 04/02/20 12:28

Because you got the settings the wrong way around. First set the bar and test periods, then you can load the asset for that period. Not the other way around.

https://manual.zorro-project.com/asset.htm
Posted By: Cobus

Re: Script Test gives error 055 - No History - 04/02/20 12:47

Thank you jcl. I changed it the other way around but still no happiness here.
Here is my code. Zorro still runs the test from 2015..2020 and the log doesn't show any trades.
Code
function run()
{
  set(LOGFILE);
  BarPeriod=60;
  StartDate=20100101;
  EndDate=20191231;
  vars dim=series(MinusDI(8));
  vars dip=series(PlusDI(8));
  Stop=PIP*50;
  asset("EUR/USD");
  
  if (crossOver(dip,dim)) enterLong();
  if (crossOver(dim,dip)) enterShort();
  
	
	}
Posted By: jcl

Re: Script Test gives error 055 - No History - 04/02/20 12:53

Well, it's now another wrong way around. The order of commands matters in programming. Here's how it should probably look:

Code
function run()
{
  BarPeriod=60;
  StartDate=2010;
  EndDate=2020;

  asset("EUR/USD");
  vars dim=series(MinusDI(8));
  vars dip=series(PlusDI(8));
  Stop=PIP*50;
  if (crossOver(dip,dim)) enterLong();
  if (crossOver(dim,dip)) enterShort();
}
Posted By: Cobus

Re: Script Test gives error 055 - No History - 04/02/20 13:02

It works! But with a horrible annual return lol.
Okay jcl what have you done differently? What was I missing here?
Posted By: AndrewAMD

Re: Script Test gives error 055 - No History - 04/02/20 13:23

He changed the order of your code.
Posted By: Cobus

Re: Script Test gives error 055 - No History - 04/02/20 15:46

Thanks for the help and suggestions
© 2024 lite-C Forums