problem with newly created bar file

Posted By: aaaaaaaaaaaa

problem with newly created bar file - 06/12/17 07:17

I'm trying to import from "SieraCharts" 1minute bars (DAX-future) into Zorro,
for that I adapted Convert.c and created DAX_2017_06_1m.bar which worked well;

at least it seems so because ZHistoryEditor has no problem to show this file
then I inserted the file in AssetsCur.csv and tried to run this little script:

function run()
{
set(LOGFILE);

BarPeriod = 1;

StartDate = 20170511;
MaxBars = 12000;

vars Open = series( priceOpen( ) );
//vars EMA_30 = series( EMA( Open, 30 ) );
//vars EMA_300 = series( EMA( Open, 300 ) );

printf( "nBar %i of %i", Bar, NumBars );

//TakeProfit = 10;

/*if ( crossOver( EMA_30, EMA_300 ) )
enterLong( );
if ( crossUnder( EMA_30, EMA_300) )
enterShort( );*/
}

I get these error codes:

Bar 0 of 0
V 1.580 on Mon 17-06-12 16:27:54
Error 055: DAX_2017_06_1m 2017 price history missing
Error 055: no DAX_2017_06_1m 2017..2017 prices
Error 055: No DAX_2017_06_1m prices

any ideas?
Posted By: Dalla

Re: problem with newly created bar file - 06/12/17 07:27

By default, Zorro uses AssetsFix, not AssetsCur.
So either insert your asset in AssetsFix, or in your script load AssetsCur using the
assetList function
Posted By: aaaaaaaaaaaa

Re: problem with newly created bar file - 06/12/17 08:04

did that same result
Posted By: Dalla

Re: problem with newly created bar file - 06/12/17 08:29

Please post line from AssetsFix/AssetsCur for this asset
Posted By: aaaaaaaaaaaa

Re: problem with newly created bar file - 06/12/17 10:10

this the line from AssetsFix.cvs:

DAX_2017_06_1m,10884,1,-0.1,0,1,0.1,6,0,0.1,0,
Posted By: Dalla

Re: problem with newly created bar file - 06/12/17 10:45

Some things that come to mind:
The asset is named DAX_2017_06_1m, and you mentioned DAX_2017_06_1m.bar
That looks wierd, although I'm not familiar with the .bar format.
Why did you put year (and month?) in the asset name?

Atleast my 1 minute data is in .t6 format, and files are divided per year only.
So for EUR/USD, files are named EUR/USD_2016.t6, EUR/USD_2017.t6 etc.

Perhaps nothing is wrong with using the .bar, but I would at least try changing the asset name to something like just DAX, and the file to DAX_2017.bar
Posted By: jcl

Re: problem with newly created bar file - 06/12/17 13:58

Yes, by default Zorro expects a file name like "DAX_2017.t6" for 2017 historical data. You can use exotic file names, but must then declare that in the script.

You can find a description of the format in the manual under "Export".
© 2024 lite-C Forums