Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Nymphodora, AndrewAMD, TipmyPip, Quad, Imhotep), 846 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
CFD Trading Issues / Crash #463975
01/10/17 18:28
01/10/17 18:28
Joined: Aug 2016
Posts: 95
Wien
T
trenki2 Offline OP
Junior Member
trenki2  Offline OP
Junior Member
T

Joined: Aug 2016
Posts: 95
Wien
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


Last edited by trenki2; 01/10/17 18:29.
Re: CFD Trading Issues [Re: trenki2] #463983
01/11/17 15:58
01/11/17 15:58
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
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.

Re: CFD Trading Issues [Re: jcl] #463986
01/11/17 17:23
01/11/17 17:23
Joined: Aug 2016
Posts: 95
Wien
T
trenki2 Offline OP
Junior Member
trenki2  Offline OP
Junior Member
T

Joined: Aug 2016
Posts: 95
Wien
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.

Last edited by trenki2; 01/13/17 15:21.
Re: CFD Trading Issues [Re: trenki2] #464067
01/19/17 15:22
01/19/17 15:22
Joined: Aug 2016
Posts: 95
Wien
T
trenki2 Offline OP
Junior Member
trenki2  Offline OP
Junior Member
T

Joined: Aug 2016
Posts: 95
Wien
Hi jcl! Could you look into this issue?

Re: CFD Trading Issues [Re: trenki2] #464078
01/20/17 12:20
01/20/17 12:20
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
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.



Re: CFD Trading Issues [Re: jcl] #464090
01/20/17 16:46
01/20/17 16:46
Joined: Aug 2016
Posts: 95
Wien
T
trenki2 Offline OP
Junior Member
trenki2  Offline OP
Junior Member
T

Joined: Aug 2016
Posts: 95
Wien
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.


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1