CFD Trading Issues / Crash

Posted By: trenki2

CFD Trading Issues / Crash - 01/10/17 18:28

I wanted to try out trading stock CFDs with Zorro on an FXCM account. Unfortunately it seems not to work for demo accounts. Does anyone know a way to make it work there? I get the error 053.

I then went on to try it out on my real fxcm account and ran into a bug. My Zorro 1.50.6 SE crashed.

I have the following code:

Code:
function run()
{
	StartDate = 2005;
	BarPeriod = 1440;
	Capital = 10000;
	Lots = 1;
	
	assetList("AssetsFXCMCFD.csv");
	assetHistory("EBAY", FROM_YAHOO);
    
	while (asset(loop("EBAY")))
	{
		if (NumOpenLong == 0)
			enterLong();
	}
}



It is supposed to buy 1 share of EBAY. It requires the associated AssetsList file:

Code:
Name,Price,Spread,RollLong,RollShort,PIP,PIPCost,MarginCost,Leverage,LotAmount,Commission,Symbol
AAPL,119.220,0.01,0,0,0.01,0.01,0,10,1,0,AAPL.us
FB,125.120,0.01,0,0,0.01,0.01,0,10,1,0,FB.us
AMZN,794.630,0.19,0,0,0.01,0.01,0,10,1,0,AMZN.us
MSFT,63.040,0.01,0,0,0.01,0.01,0,10,1,0,MSFT.us
GOOG,807.190,0.29,0,0,0.01,0.01,0,10,1,0,GOOG.us
IBM,166.400,0.06,0,0,0.01,0.01,0,10,1,0,GOOG.us
EBAY,30.340,0.01,0,0,0.01,0.01,0,10,1,0,EBAY.us



When I hit trade Zorro connects, downloads the asset prices and then crashes immediately without buying any shares.

How can this be fixed? Is there a way to make it work with the demo account?

The windows crash report give this information:

Code:
Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	Zorro.exe
  Application Version:	1.5.0.0
  Application Timestamp:	57e240da
  Fault Module Name:	StackHash_9711
  Fault Module Version:	0.0.0.0
  Fault Module Timestamp:	00000000
  Exception Code:	c0000005
  Exception Offset:	PCH_B7
  OS Version:	6.3.9600.2.0.0.256.48
  Locale ID:	3079
  Additional Information 1:	9711
  Additional Information 2:	9711f951f5ef49fc39034f383bd4f4da
  Additional Information 3:	4f3c
  Additional Information 4:	4f3c8abdae3bab8ccecea80d171a6350

Posted By: jcl

Re: CFD Trading Issues - 01/11/17 15:58

Your code is mostly ok, but I don't think that you can trade EBAY on an FXCM account. It will produce an error message. And maybe even a crash inside the FXCM API when you attempt downloading prices of nonexisting assets.

Check with your broker which assets you can trade. If you run into a problem with a really existing asset, please post again.
Posted By: trenki2

Re: CFD Trading Issues - 01/11/17 17:23

I have an FXCM Account and in MetaTrader 4 i can list the available symbols. There under USD Shares i find stock CFDs where "EBAY.us" is one of them. The asset "EBAY.us" is also in the FXCM reference.

I can place an order in MetaTrader 4 just fine for this asset in my real account.

Zorro also finds the symbol and actually starts downloading the price history data but crashes in the process. If the symbol data was not available or the data can not be downloaded as is the case for a demo account I get the error "Error 053: XXX unavailable at this time".

Here is the FXCM reference (you will find EBAY.us in it):
Internationale Aktien handeln
Share Liste

The script is able to buy an EBAY share via the MT4 Bridge, so this is definitely a bug with Zorro or the FXCM Api.
Posted By: trenki2

Re: CFD Trading Issues - 01/19/17 15:22

Hi jcl! Could you look into this issue?
Posted By: jcl

Re: CFD Trading Issues - 01/20/17 12:20

I can not trade EBAY.us with the FXCM API. Zorro will not crash with a wrong asset, but possibly the FXCM API crashes. Please check with FXCM if you can trade EBAY CFDs with their API, and if also with a demo account, and at which market time. Then contact Zorro Support. They'll look into it.


Posted By: trenki2

Re: CFD Trading Issues - 01/20/17 16:46

Demo account definitly does not work. I cannot trade EBAY.us on MetaTrader 4 demo account either.

But I can trade EBAY.us on my FXCM real account with MetaTrader4. It also works fine when I trade it with Zorro using the MT4 bridge but not with the FXCM Api. There it crashes.

I will contact support.
© 2024 lite-C Forums