AUD/CAD all zeros in Assets.dta

Posted By: GPEngine

AUD/CAD all zeros in Assets.dta - 08/04/14 18:30

I have FXCM Demo account
When I run Download.c with AUD/CAD in the loop, the following line is consistently. I tried on several different days of the week including just now (Monday ~ 2pm EDT)

I am suspicious of this line and I believe it causes unrealistic backtest (once copied to AssetsFix.dta).

Name Price Spread RollLong/Short PIP PIPCost Margin Lot
AUD/CAD 0.00000 0.00000 0.0000 0.0000 0.0000 0.00000 0.000 0.0

There are other lines where Price is 0 but at least there are positive values for Spread, etc. I am hoping that Price is not used -- I can't imagine what it would be used for.
AUD/USD 0.00000 0.00023 0.4600 -0.9600 0.0001 0.10000 24.000 1000.0
EUR/CHF 0.00000 0.00026 0.0300 -0.2400 0.0001 0.11168 32.000 1000.0
EUR/TRY 0.00000 0.00287 -6.0200 1.0500 0.0001 0.04688 80.000 1000.0
GBP/CHF 0.00000 0.00035 0.1500 -0.4000 0.0001 0.11168 38.000 1000.0
GBP/USD 0.00000 0.00026 0.0700 -0.1500 0.0001 0.10000 38.000 1000.0
USD/CAD 0.00000 0.00024 -0.3600 0.1700 0.0001 0.09380 20.000 1000.0
USD/NOK 0.00000 0.00175 -0.5800 0.1700 0.0001 0.01616 20.000 1000.0

Before I contact FXCM, is this a known issue? How should I phrase my question?
Posted By: GPEngine

Re: AUD/CAD all zeros in Assets.dta - 08/04/14 18:31

Rather, it causes an error message like "AUD/CAD not found" during Train/Test, which is reasonable considering the data file line.
Posted By: jcl

Re: AUD/CAD all zeros in Assets.dta - 08/06/14 10:12

I confirm that there is something wrong with the FXCM server again. New subscribed assets contain no data. I'll forward this to FXCM.
Posted By: jcl

Re: AUD/CAD all zeros in Assets.dta - 08/08/14 14:13

Ok, problem found. It is indeed an API issue and happens when prices are requested the first time in a session. The second and further requests are ok.

We'll implement a workaround, but until then, you can get the AUD/CAD parameters with a script that just connects and then waits a few bars before exiting.
Posted By: GPEngine

Re: AUD/CAD all zeros in Assets.dta - 08/08/14 14:49

Thanks laugh
Posted By: Mithrandir77

Re: AUD/CAD all zeros in Assets.dta - 08/12/14 14:28

Any news or workaround about this? I am experiencing a similar issue with Copper, I tried several times using Download script but nevertheless this is my Assets.dta:

Code:
Name      Price   Spread  RollLong/Short PIP   PIPCost Margin Lot
AUD/USD   0.90705 0.00024 0.3100 -0.6300 0.0001 0.07182 5.000 1000.0
Copper    0.00000 0.00000 0.0000 0.0000 0.0000 0.00000 0.000 0.0
EUR/CHF   1.21554 0.00025 0.0400 -0.1300 0.0001 0.08228 5.000 1000.0



And then when I want to just run this code:

Code:
function run(){
	BarPeriod = 60*24;
	StartDate = 2011;
	asset("Copper");
	set(PLOTNOW);
	vars Prices = series(price());
	plot("Price",Prices[0],MAIN,BLACK);
}




prices compiling................
BackTest: prices XAG/USD 2011..2014
Generate Chart - please wait... ok

It says:

Asset Copper not found
No Copper prices

Even though I have copper history from 2011-2014 and tried the workaround that JCL told in the previous message by modifying the download script like this:

Code:
#ifdef ADD_ASSET // add single asset
	static int i = 0;
	name = ADD_ASSET;	
	asset(name);	
	loadHistory(name,1);
	i = i + 1;	
#else
....
#endif
	if (i == 7)		
		quit("Done!")


Posted By: jcl

Re: AUD/CAD all zeros in Assets.dta - 08/13/14 11:15

You can insert this line for Copper in AssetsFix.dta:

Copper 3.1380 0.00200 0.0000 0.0000 0.0010 0.07486 5.000 100.0

The next Zorro version, with the workaround, will be released in a few days.
Posted By: Mithrandir77

Re: AUD/CAD all zeros in Assets.dta - 08/14/14 02:12

Originally Posted By: jcl
You can insert this line for Copper in AssetsFix.dta:

Copper 3.1380 0.00200 0.0000 0.0000 0.0010 0.07486 5.000 100.0

The next Zorro version, with the workaround, will be released in a few days.


jcl, thanks for your response, I finally got it working while trying to code your suggestion, I didn't understand what you mean by 'waiting a few bars before exiting' since when suscribing the asset and using NumYears=-1 there aren't any bars, what I tried was using another asset like EUR/USD for having bars but to no avail.

Today I tried again with this script

Click to reveal..
Code:
#define ADD_ASSET "Copper"

//int i;

function run()
{
//	if (is(INITRUN))
//		i = 0;	
//	NumYears = -1;	
//	string name = ADD_ASSET;
//	asset(name);
//	loadHistory(name,1);	
//	msg("%d",i);
//	i += 1;
//	if (i == 7){	
//		msg("hola");
//		
//		quit("Done!");
//	}
	static int i;
	if (is(INITRUN)){
		i =0;	
   	NumYears = -1; 
   	loadHistory("Copper",1);
   	msg("primero");
	}
	if (i < 4){
		msg("%d",i);
		NumYears = -1;
		loadHistory("Copper",1);
	}	
	NumYears = 6;		
   i = i + 1;  
   if (i==7)
  		quit("Done!");
	
}



and Assets.dta was set with

Copper 3.4000 2.0000 0.0000 0.0000 0.0100 0.10000 5.000 1.0

Is this ok? I see that the lot size is 100 times smaller than yours, is this because of the lot size changes of FXCM in january for CFDs?

Anyway, I trust you laugh and I will use your values for my tests.
Posted By: jcl

Re: AUD/CAD all zeros in Assets.dta - 08/14/14 08:33

No, the lot size difference is due to a different account type. You can use both, but yours will be closer to the live trading result with your account.
Posted By: GPEngine

Re: AUD/CAD all zeros in Assets.dta - 08/20/14 01:40

I think there is a larger problem than what you described.
Posted By: GPEngine

Re: AUD/CAD all zeros in Assets.dta - 08/20/14 01:41

In my experiments, Zorro just copies whatever is in AssetsFix.dta into Assets.dta. That is scary.
Posted By: jcl

Re: AUD/CAD all zeros in Assets.dta - 08/20/14 13:34

???
Posted By: Mithrandir77

Re: AUD/CAD all zeros in Assets.dta - 09/09/14 03:22

I am seeing the same effect GPEngine mentioned above though I don't know if the cause is what he stated. I am downloading from FXCM using the Download.c script, it updated Assets.dta BUT IT DIDN'T DOWNLOAD ANY PRICE HISTORY and the last time I downloaded Copper prices was on August 12...

Download compiling................
Login FXCM.. at UTC 09.09. 03:09
Copper updated to Assets.dta
Done!
Logout... ok
Copied to Clipboard!

and in both Assets.dta and AssetsFix.dta I have

Copper 3.1380 0.00200 0.0000 0.0000 0.0010 0.07486 5.000 100.0

but the price was not 3.1380:



Could you please take a look at this? Thank you as always!

EDIT: I have experienced the same with XAG/USD and EUR/USD, their history files for 2014 are not updating... frown
Posted By: jcl

Re: AUD/CAD all zeros in Assets.dta - 09/09/14 12:58

Yes, this was already reported. The current Zorro version does not update Assets.dta with the Download script. So the prices and also the other parameters are unchanged.

This will be fixed in the next Zorro version. Until then, one workaround is using a script that accesses the prices. A simple alternative is editing AssetsFix with a text editor and copying the parameters from the TS.
Posted By: Mithrandir77

Re: AUD/CAD all zeros in Assets.dta - 09/09/14 17:25

Thank you jcl, I look forward to the new version then.

Concerning the issue of Download.c not downloading prices...I feel embarassed, the reason was:

Quote:

//#define PRICE_HISTORY
// uncomment for downloading the price history (otherwise, update Assets.dta only)


Seems it was late and forgot to uncomment that line sorry!
© 2024 lite-C Forums